class SqljsEntityManager
extends EntityManager
import { SqljsEntityManager } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/entity-manager/SqljsEntityManager.ts";
A special EntityManager that includes import/export and load/save function that are unique to Sql.js.
Constructors
new
SqljsEntityManager(connection: Connection, queryRunner?: QueryRunner)Properties
private
driver: SqljsDriverMethods
exportDatabase(): Uint8Array
Returns the current database definition.
loadDatabase(fileNameOrLocalStorageOrData: string | Uint8Array): Promise<void>
Loads either the definition from a file (Node.js) or localstorage (browser) or uses the given definition to open a new database.
saveDatabase(fileNameOrLocalStorage?: string): Promise<void>
Saves the current database to a file (Node.js) or localstorage (browser) if fileNameOrLocalStorage is not set options.location is used.