0.0.2 • Published 2 years ago

@theredhead/experiment-data v0.0.2

Weekly downloads
-
License
WTFPL
Repository
github
Last release
2 years ago

@theredheda/data

this is work in progress.

This package presents an easy to use API for serverside projects to connect to databases.

Supported databases:

  • mysql/mariadb (through mysql2)
  • sqlite (through sqlite3)

Basic API:

const cn = new SQLiteConnection({ connectionString: ":memory:" });
const cmd = cn.createCommand("SELECT CURRENT_TIMESTAMP", []);

cn.open();

const result = await cmd.exectute();
expect(result.affectedRows).toBe(1);

cn.close();
0.0.2

2 years ago