Abstract
Construct a new store.
The set of schema functions to apply to a database. The ordering of this array determines the schema number.
Options to supply to the PostgreSQL client, such as url
.
Readonly
sqlProtected
getProtected
updateGenerated using TypeDoc
PostgreSQL datastore abstraction which can be inherited by a specialised bridge class.
Example
class MyBridgeStore extends PostgresStore { constructor(myurl) { super([schemav1, schemav2, schemav3], { url: myurl }); }
async getData() { return this.sql
SELECT * FROM mytable
} }// Which can then be used by doing const store = new MyBridgeStore("postgresql://postgres_user:postgres_password@postgres"); store.ensureSchema(); const data = await store.getData();