-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d79e397
commit a25f48d
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
export = Database; | ||
/** | ||
* Database represents a connection that can prepare and execute SQL statements. | ||
*/ | ||
declare class Database { | ||
/** | ||
* Creates a new database connection. If the database file pointed to by `path` does not exists, it will be created. | ||
* | ||
* @constructor | ||
* @param {string} path - Path to the database file. | ||
*/ | ||
constructor(path: string, opts: any); | ||
db: any; | ||
memory: boolean; | ||
readonly: boolean; | ||
name: string; | ||
open: boolean; | ||
sync(): void; | ||
/** | ||
* Prepares a SQL statement for execution. | ||
* | ||
* @param {string} sql - The SQL statement string to prepare. | ||
*/ | ||
prepare(sql: string): any; | ||
/** | ||
* Returns a function that executes the given function in a transaction. | ||
* | ||
* @param {function} fn - The function to wrap in a transaction. | ||
*/ | ||
transaction(fn: Function): (...bindParameters: any[]) => Promise<any>; | ||
pragma(source: any, options: any): any; | ||
backup(filename: any, options: any): void; | ||
serialize(options: any): void; | ||
function(name: any, options: any, fn: any): void; | ||
aggregate(name: any, options: any): void; | ||
table(name: any, factory: any): void; | ||
loadExtension(...args: any[]): void; | ||
/** | ||
* Executes a SQL statement. | ||
* | ||
* @param {string} sql - The SQL statement string to execute. | ||
*/ | ||
exec(sql: string): any; | ||
/** | ||
* Closes the database connection. | ||
*/ | ||
close(): void; | ||
/** | ||
* Toggle 64-bit integer support. | ||
*/ | ||
defaultSafeIntegers(toggle: any): this; | ||
unsafeMode(...args: any[]): void; | ||
} | ||
declare namespace Database { | ||
export { SqliteError }; | ||
} | ||
import SqliteError = require("./sqlite-error"); | ||
//# sourceMappingURL=promise.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export = SqliteError; | ||
declare function SqliteError(message: any, code: any, rawCode: any): SqliteError; | ||
declare class SqliteError { | ||
constructor(message: any, code: any, rawCode: any); | ||
code: string; | ||
rawCode: any; | ||
name: string; | ||
} | ||
//# sourceMappingURL=sqlite-error.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.