DBMS / 05. Troubleshooting
Updated: 18. March 2019
Author: Peter Širka

05. Troubleshooting

Professional Support Chat with contributors

Quick navigation::


Reading a dynamic value for filtering

All data are stored in the instance of DBMS() and you can read some values for future filtering with db.get(path).

var db = DBMS();

db.read('users').make(function(builder) {
    builder.where('id', 100);
}).find('orders').make(function(builder) {
    builder.in('userid', db.get('users.id'));
    builder.set('orders');
}).data(function(user) {
    // user.orders will contain user orders
});

How to execute stored procedure/function?

Execution of stored procedure is very easy, you can execute procedure or function via db.query() method. Example:

var db = DBMS();

db.query('call sp_something($1, $2)', ['Peter', 34]);

Transactions don't work

Transactions can be used with Pooling. So if you don't use pools then transactions won't work.