breadfruit
Not really bread. Not really fruit. Just like this package. Some simple helpers on top of knex.
create an instance of breadfruit
const config = client: 'postgresql' connection: 'postgres://postgres@localhost:5432/someDatabase' pool: min: 1 max: 7 ; const bread = config;
Browse, Read, Edit, Add, Delete, Raw
const browse read edit add del raw = config; //get an array of users, by table, columns, and a filterconst users = await ; //get a single user by table, columns, and a filterconst user = await ; //edit a user by table, returned columns, updated values, and a filterconst updatedUser = await ; //add a new user by table, returned columns, and user dataconst newUser = await ; //delete a user by table and a filterconst deleteCount = await ; //perform a raw queryconst rows = await ;