1602 / jugglingdb

Multi-database ORM for nodejs: redis, mongodb, mysql, sqlite3, postgresql, arango, in-memory...
http://1602.github.io/jugglingdb/
2.05k stars 241 forks source link

Question on expressions #395

Closed neilstuartcraig closed 10 years ago

neilstuartcraig commented 10 years ago

Hi

Firstly, thanks for all your hard work on jugglingdb, it;s definitely my favoured ORM for Node :-)

I wanted to ask if it's (currently) possible to use expressions in (presumably) findAll() - something like you'd get in native MySQL or perhaps Zend Framework DB (http://framework.zend.com/manual/1.12/en/zend.db.select.html#zend.db.select.building.columns-expr).

My context for this is that i'm building an authentication system so i'd like to salt and hash the user-supplied password in my authentication function, ideally in one DB transaction. There are obviously workarounds but i'd like to know my options before i plan this part.

Any help/links/ideas would be very much appreciated.

Cheers! Neil

1602 commented 10 years ago

Hi Neil, transaction not supported at the moment. You can talk to @dgsan (maintainer of mysql-adapter) about his experience and plans on implementing this feature. Regarding expressions - i agree this is nice to have, but not priority, because it's just syntactic sugar. If you like to implement it - we can chat about api. Open another issue explaining api proposal when ready. Thanks!

neilstuartcraig commented 10 years ago

Thanks Anatoliy, it was really expressions i was looking at. I think for the moment i will work around it and once i have my project a little further down the line i'll revisit expressions and discuss ideas with you.

Thanks for your help