A session is the main user access path to the database. The
Session class models such a session.
Session extends Context
getMapping(Object parameter, Function(Object err, Object mapping) callback);
Get the mappings for a table or class.
parameter may be a table name, a
mapped constructor function, or a domain object. This function
returns a fully resolved
Creates a new, empty batch for collecting multiple operations to be executed together. In an application, you can invoke this function similarly to what is shown here:
var nosql = require("mysql-js"); var myBatch = nosql.createBatch();
Return an array whose elements consist of all current batches belonging to this session.
Get the current
void close(Function(Object error) callback);
Close this session. Must be called when the session is no longer needed.
Returns true if this session is closed.
void setLockMode(String lockMode);
Set the lock mode for read operations. This takes effect
immediately and remains in effect until the session is closed or
this method is called again.
must be one of
Array listTables(databaseName, callback);
List all tables in database
TableMetadata getTableMetadata(String databaseName, String tableName, callback);
Fetch metadata for table