@hypi/mekadb
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Hypi's MekaDB client

Register a https://hypi.ai

Usage

var mekadb = require('@hypi/mekadb');

let client = new mekadb.Client("mekadb.hypi.app", "<db>", "<username>", "<password>");

async function main() {
    let createTableRes = await client.query('CREATE TABLE IF NOT EXISTS user(username VARCHAR, pass VARCHAR, PRIMARY KEY (username))');
    console.log('Creat table res', createTableRes);
    let insertRes = await client.query("INSERT INTO user(username,pass) VALUES('courtney','pass1'),('damion','pass2')")
    console.log('Inserted data into table', insertRes);
    let rows = await client.query("SELECT * FROM user");
    console.log('ROWS:', rows)
}

let _ = main();

Building manually

Needed in Github action or locally.

npm install -g grpc-tools
cd ../protos
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:src/ --grpc_out=grpc_js:src/ ../../../proto/public-grpc-apis/mekadb_client.proto

Readme

Keywords

Package Sidebar

Install

npm i @hypi/mekadb

Weekly Downloads

4

Version

0.1.1

License

Apache 2.0

Unpacked Size

87.4 kB

Total Files

6

Last publish

Collaborators

  • eman2008
  • qamaruddin
  • damionx
  • zcourts