bmuller / twistar

Twistar is an object-relational mapper (ORM) for Python that uses the Twisted library to provide asynchronous DB interaction.
http://findingscience.com/twistar
Other
132 stars 38 forks source link

Unique and only specified fields in .find() #57

Closed morfair closed 9 years ago

morfair commented 9 years ago

How can I get only specified fields in .find() method? Can I get only unique rows?

bmuller commented 9 years ago

You cannot specify the fields you want in find. What is returned is an object containing properties for all of the fields. Since twistar is an ORM, every row should be unique (because each row will have either a unique ID or it will be a join table with unique combos of IDs).

I'm happy to answer any other questions you have - feel free to email me at the address listed on my profile page.

morfair commented 8 years ago

@bmuller I mean how to do "SELECT DISTINCT(column) ..."