0.0.3 • Published 3 years ago

sql-sieve v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

SQL Sieve

Lines of Code npm

This tool helps with Database access, as well as providing powerful tools to recursively pick specific row data for staging and testing.

See tests for more.

let db = new Database({
    database: 'test_db',
    password: 'password',
    user: 'root'
});
const row = await db.tables['USERS'].select({ id: 1 });
const tree = await db.findTree(row, true);
// "tree" now contains a map of all the rows required to migrate the selected data into a fresh DB.

console.log(tree);
/*
Outputs something like:
{ USERS: [ Row { table: [Table], id: '[1]', data: [TextRow] } ],
      SECOND_TABLE: [ Row { table: [Table], id: '[2]', data: [TextRow] } ] }
*/
0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

4 years ago