@types/better-sqlite3
Advanced tools
Comparing version 3.1.3 to 5.0.0
@@ -1,89 +0,95 @@ | ||
// Type definitions for better-sqlite3 3.1 | ||
// Type definitions for better-sqlite3 5.0 | ||
// Project: http://github.com/JoshuaWise/better-sqlite3 | ||
// Definitions by: Ben Davies <https://github.com/Morfent> | ||
// Mathew Rumsey <https://github.com/matrumz> | ||
// Santiago Aguilar <https://github.com/sant123> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
import Integer = require('integer'); | ||
import Integer = require("integer"); | ||
interface RunResult { | ||
changes: number; | ||
lastInsertROWID: Integer.IntLike; | ||
} | ||
declare class Statement { | ||
database: Database; | ||
source: string; | ||
returnsData: boolean; | ||
constructor(db: Database, sources: string[]); | ||
database: Database; | ||
source: string; | ||
returnsData: boolean; | ||
constructor(db: Database, sources: string[]); | ||
run(...params: any[]): RunResult; | ||
get(...params: any[]): any; | ||
all(...params: any[]): any[]; | ||
each(params: any, cb: (row: any) => void): void; | ||
each(cb: (row: any) => void): void; | ||
each(...params: any[]): void; | ||
pluck(toggleState?: boolean): this; | ||
bind(...params: any[]): this; | ||
safeIntegers(toggleState?: boolean): this; | ||
run(...params: any[]): Database.RunResult; | ||
get(...params: any[]): any; | ||
all(...params: any[]): any[]; | ||
each(params: any, cb: (row: any) => void): void; | ||
each(cb: (row: any) => void): void; | ||
each(...params: any[]): void; | ||
pluck(toggleState?: boolean): this; | ||
bind(...params: any[]): this; | ||
safeIntegers(toggleState?: boolean): this; | ||
} | ||
declare class Transaction { | ||
database: Database; | ||
source: string; | ||
constructor(db: Database, sources: string[]); | ||
database: Database; | ||
source: string; | ||
constructor(db: Database, sources: string[]); | ||
run(...params: any[]): RunResult; | ||
bind(...params: any[]): this; | ||
safeIntegers(toggleState?: boolean): this; | ||
run(...params: any[]): Database.RunResult; | ||
bind(...params: any[]): this; | ||
safeIntegers(toggleState?: boolean): this; | ||
} | ||
interface DatabaseOptions { | ||
memory?: boolean; | ||
readonly?: boolean; | ||
fileMustExist?: boolean; | ||
} | ||
interface RegistrationOptions { | ||
name?: string; | ||
varargs?: boolean; | ||
deterministic?: boolean; | ||
safeIntegers?: boolean; | ||
} | ||
interface Database { | ||
memory: boolean; | ||
readonly: boolean; | ||
name: string; | ||
open: boolean; | ||
inTransaction: boolean; | ||
memory: boolean; | ||
readonly: boolean; | ||
name: string; | ||
open: boolean; | ||
inTransaction: boolean; | ||
prepare(source: string): Statement; | ||
transaction(sources: string[]): Transaction; | ||
exec(source: string): this; | ||
pragma(source: string, simplify?: boolean): any; | ||
checkpoint(databaseName?: string): this; | ||
register(cb: (...params: any[]) => any): this; | ||
register(options: RegistrationOptions, cb: (...params: any[]) => any): this; | ||
close(): this; | ||
defaultSafeIntegers(toggleState?: boolean): this; | ||
prepare(source: string): Statement; | ||
transaction(sources: string[]): Transaction; | ||
exec(source: string): this; | ||
pragma(source: string, simplify?: boolean): any; | ||
checkpoint(databaseName?: string): this; | ||
register(cb: (...params: any[]) => any): this; | ||
register( | ||
options: Database.RegistrationOptions, | ||
cb: (...params: any[]) => any | ||
): this; | ||
close(): this; | ||
defaultSafeIntegers(toggleState?: boolean): this; | ||
} | ||
declare class SqliteError implements Error { | ||
name: string; | ||
message: string; | ||
code: string; | ||
constructor(message: string, code: string); | ||
name: string; | ||
message: string; | ||
code: string; | ||
constructor(message: string, code: string); | ||
} | ||
interface DatabaseConstructor { | ||
new(filename: string, options?: DatabaseOptions): Database; | ||
(filename: string, options?: DatabaseOptions): Database; | ||
prototype: Database; | ||
new (filename: string, options?: Database.Options): Database; | ||
(filename: string, options?: Database.Options): Database; | ||
prototype: Database; | ||
Integer: typeof Integer; | ||
SqliteError: typeof SqliteError; | ||
Integer: typeof Integer; | ||
SqliteError: typeof SqliteError; | ||
} | ||
declare namespace Database { | ||
interface RunResult { | ||
changes: number; | ||
lastInsertRowid: Integer.IntLike; | ||
} | ||
interface Options { | ||
memory?: boolean; | ||
readonly?: boolean; | ||
fileMustExist?: boolean; | ||
} | ||
interface RegistrationOptions { | ||
name?: string; | ||
varargs?: boolean; | ||
deterministic?: boolean; | ||
safeIntegers?: boolean; | ||
} | ||
} | ||
declare const Database: DatabaseConstructor; | ||
export = Database; |
{ | ||
"name": "@types/better-sqlite3", | ||
"version": "3.1.3", | ||
"version": "5.0.0", | ||
"description": "TypeScript definitions for better-sqlite3", | ||
@@ -16,8 +16,14 @@ "license": "MIT", | ||
"githubUsername": "matrumz" | ||
}, | ||
{ | ||
"name": "Santiago Aguilar", | ||
"url": "https://github.com/sant123", | ||
"githubUsername": "sant123" | ||
} | ||
], | ||
"main": "", | ||
"types": "index", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
}, | ||
@@ -28,4 +34,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "bbddfae3a802d518730ad4df0eca463ddefebcb9171daf4330caa3a5e0171d0b", | ||
"typesPublisherContentHash": "dfea25722b5bdbac52a404d915a0dff58385408e7e97d5c4304c3075c5aa4357", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/better-sqlite3 | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/better-sqlite3 | ||
Additional Details | ||
* Last updated: Mon, 05 Feb 2018 23:37:41 GMT | ||
* Last updated: Tue, 27 Nov 2018 02:54:06 GMT | ||
* Dependencies: integer | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Ben Davies <https://github.com/Morfent>, Mathew Rumsey <https://github.com/matrumz>. | ||
These definitions were written by Ben Davies <https://github.com/Morfent>, Mathew Rumsey <https://github.com/matrumz>, Santiago Aguilar <https://github.com/sant123>. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5400
81