-
Notifications
You must be signed in to change notification settings - Fork 0
SqliteWrapper
@gavinhsmith/simpledb / lib/wrapper / SqliteWrapper
SqliteWrapper:
object
Defined in: lib/wrapper.ts:15
A wrapper around sqlite for clean up use.
Cancel the current operation if one exists and shut down the database.
A promise that always resolves when done. May contain an error in paramater, but will not reject.
readonlyexec: (sql,params?) =>Promise<void>
Execute a query on the database, does not return any data.
string
The SQL query to execute.
Paramaters to inject. Uses $name format in SQL, so use { $key: replacement }.
Promise<void>
A promise that resolves when completed, or rejects if an error occurs.
readonlygetInstance: () =>SQLiteDatabase
Gets the instance of sqlite3 being used.
SQLiteDatabase
The internal instance of the sqlite3 Database.
readonlyquery: <ResponseType>(sql,params?) =>Promise<ResponseType[]>
Execute a query on the database, returns all fetched data.
• ResponseType
string
The SQL query to execute.
Paramaters to inject. Uses $name format in SQL.
Promise<ResponseType[]>
A promise that resolves into the requested rows, or rejects if an error occurs.