This package has been deprecated

Author message:

untested

pgtables
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

PGTables

Installation

npm i --save pgtables

Usage

const { Table } = require('pgtables');
 
// open a table
const Users = new Table('Users');
 
// read single row from table
const user = await Users.open({ Name: 'abc' }).read();
// if more than one row is returned, the function will throw an error
console.log(user.data.ID);
 
// update an entry
user.data.Name = 'def';
await user.write();
 
// insert a new entry
const newuser = await Users.open({ Name: 'asdf', EMail: 'ghjk@example.com' }).write();
 
// delete an entry
await newuser.deleteRow();
 

Readme

Keywords

Package Sidebar

Install

npm i pgtables

Weekly Downloads

0

Version

1.0.2

License

GPL-3.0-or-later

Unpacked Size

43.8 kB

Total Files

5

Last publish

Collaborators

  • timoho01