Closed gimzani closed 3 years ago
yes, there is api - openDb(dbName: string)
which can be used to openDb. You cal also use initDb which will take dbschema as defined in documentation.
FYI - multiple database will be supported in version 4.
@gimzani jsstore v4 is launched. Now you can use multiple database with multiple connection.
var connection1 = new Connection();
var connection2 = new Connection();
connection1.initDb(dbSchema1);
connection2.initDb(dbSchema2);
Consider this:
I have 2 iDB databases connected to jsStore. connection.initDb() will create them, but I need a way to switch between them.
I see in the documentation that is says that the connection can only handle 1 DB at a time - but I do NOT see any way to switch between them. Is there a way to "open" the database so that the connection is connected to the desired DB?
Something like: connection.openDb('my-db-name');
Thanks!