Skip to content

Instantly share code, notes, and snippets.

@ha6000
Created December 14, 2019 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ha6000/c8daf37d19da6ad0c0a7cba0c2a18050 to your computer and use it in GitHub Desktop.
Save ha6000/c8daf37d19da6ad0c0a7cba0c2a18050 to your computer and use it in GitHub Desktop.
import sql = require('sql');
import pg = require('pg');
export declare class Table {
name: string;
database: any;
pool: pg.Pool;
table: sql.Table<string, [
{
name: 'key',
primaryKey: true,
dataType: 'VARCHAR(255)'
},
{
name: 'value',
dataType: 'TEXT'
}
]>;
constructor(name: string, database);
set(key: string, value: string): Promise<true>;
get(key: string): Promise<any>;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment