Merge "Added engine options to disable input/output data conversion"
This commit is contained in:
commit
2d08340e69
@ -67,7 +67,9 @@ def _setup_context(data, context, finalizer, convention):
|
||||
@specs.inject('engine', yaqltypes.Engine())
|
||||
@specs.name('#finalize')
|
||||
def finalize(obj, limiter, engine):
|
||||
if engine.options.get('yaql.convertOutputData', True):
|
||||
return utils.convert_output_data(obj, limiter, engine)
|
||||
return obj
|
||||
|
||||
context.register_function(limit)
|
||||
context.register_function(finalize)
|
||||
|
@ -161,7 +161,10 @@ class Statement(Function):
|
||||
if context is None or context is utils.NO_VALUE:
|
||||
context = yaql.create_context()
|
||||
if data is not utils.NO_VALUE:
|
||||
if self.engine.options.get('yaql.convertInputData', True):
|
||||
context['$'] = utils.convert_input_data(data)
|
||||
else:
|
||||
context['$'] = data
|
||||
return self(utils.NO_VALUE, context, self.engine)
|
||||
|
||||
def __str__(self):
|
||||
|
Loading…
Reference in New Issue
Block a user