Closed morfair closed 8 years ago
You could get the columns/attributes using https://github.com/bmuller/twistar/blob/master/twistar/dbconfig/base.py#L311 and then call toHash
. Otherwise, just use dir(obj)
and pull out the ones you want.
@bmuller Sometimes columns can be very much. I do not want to specify its manually.
@bmuller On what obj I should call getSchema? Can I get example?
After initializing the Registry use Registry.getConfig().getSchema(tablename)
. See http://findingscience.com/twistar/apidoc/twistar.dbconfig.base.InteractionBase.html#getSchema for more information.
@bmuller I did this in @inlineCallbacks function (def): q = yield Registry.getConfig().getSchema("clients") print q
And got empty arr []
@morfair If you think you've found a bug, please open a ticket and make sure to include your entire script demonstrating the issue. Thanks!
How to make obj.toHash(all) without specify all columns?