* Port from SA-0.3 to SA-0.4.
This commit is contained in:
parent
d78e862657
commit
6c871c4536
1 changed files with 2 additions and 3 deletions
|
@ -93,8 +93,7 @@ class SABase(object):
|
||||||
pass
|
pass
|
||||||
return props
|
return props
|
||||||
|
|
||||||
@jsonify.when("isinstance(obj, sqlalchemy.orm.query.Query)" \
|
@jsonify.when("isinstance(obj, sqlalchemy.orm.query.Query)")
|
||||||
" or isinstance(obj, sqlalchemy.ext.selectresults.SelectResults)")
|
|
||||||
def jsonify_sa_select_results(obj):
|
def jsonify_sa_select_results(obj):
|
||||||
'''Transform selectresults into lists.
|
'''Transform selectresults into lists.
|
||||||
|
|
||||||
|
@ -107,7 +106,7 @@ def jsonify_sa_select_results(obj):
|
||||||
element.jsonProps = obj.jsonProps
|
element.jsonProps = obj.jsonProps
|
||||||
return list(obj)
|
return list(obj)
|
||||||
|
|
||||||
@jsonify.when("isinstance(obj, sqlalchemy.orm.attributes.InstrumentedList)")
|
@jsonify.when("isinstance(obj, sqlalchemy.orm.attributes.InstrumentedAttribute)")
|
||||||
def jsonify_salist(obj):
|
def jsonify_salist(obj):
|
||||||
'''Transform SQLAlchemy InstrumentedLists into json.
|
'''Transform SQLAlchemy InstrumentedLists into json.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue