node-persist icon indicating copy to clipboard operation
node-persist copied to clipboard

Node.js ORM framework supporting MySQL and SQLite 3 relational databases.

Results 39 node-persist issues
Sort by recently updated
recently updated
newest added

Some code could be better expressed with blocking database queries. Could we implement blocking versions of persist's query functions?

In https://github.com/nearinfinity/node-persist/blob/master/lib/type.js

MySQL provides `SELECT ... FOR UPDATE`, a locking read. It would be nice for Node apps to access this through node-persist rather than a raw SQL command. http://dev.mysql.com/doc/refman/5.0/en/innodb-locking-reads.html

MySQL allows for multiple `ORDER BY` keys. It would be nice to access these through node-persist rather than using raw SQL commands. http://dev.mysql.com/doc/refman/5.1/en/order-by-optimization.html

``` js User = persist.define("User", { 'email': {'type': 'string', 'primaryKey': true}, 'name': 'string', }) .on("beforeSave", function(self) { // have to save and restore email, because // last_id is assigned to...

The events do however get fired when calling update() on a model instance. I understand that in the Model.update() case we don't have an instance to pass to the event...

Could we extend include() to go arbitrarily deep?

If persist supports INNER JOIN queries, could we supply an example query in the README? If not, could we add it?

Seems like it is missing, specifically for mysql?