promisesql
Version:
A [node-sqlite3](https://www.npmjs.com/package/sqlite3) wrapper for running simple, promise-based database queries in Node.js. It works best in smaller projects with a lot of asynchronous development, e.g., a Discord bot that implements slash commands.
29 lines (25 loc) • 555 B
TypeScript
interface BooleanExpression {
lhs: string,
operator: string,
rhs: string
}
interface BaseOptions {
file?: string,
table?: string,
}
interface RunOptions extends BaseOptions {
statement: string,
args?: any[]
}
interface InsertOptions extends BaseOptions {
into: string,
columns?: string[],
values: string[]
}
interface SelectionOptions extends BaseOptions {
first?: boolean,
all?: boolean,
columns?: string[],
from: string,
where?: (string | BooleanExpression)[]
}