python - SqlAlchemy get all strings (don't cast to boolean or datetime) -


how can change way sqlalchemy cast return values of select, returns strings, instead of booleans or datetime objects? i'm reading postgresql db.

for example i'm getting this:

>>>result = connection.execute("select * some_table").first() >>>result (123, 'some string field', true, datetime.datetime(2015, 06, ....)) 

when this:

>>>result ('123', 'some string field', 'true', '2015-06-13....')  

how about:

result = tuple([str(col_value) col_value in result]) 

if conversion happen on db side, have perform cast(...) function on each column separately.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -