Skip to content

sqlectron/sqlectron-db-core

Repository files navigation

sqlectron-db-core

Build Status npm

The common code used by all sqlectron clients.

Requires node v10 or higher. For ed25519 ssh support it requires node v12.

How to pronounce

It is pronounced "sequelectron" - https://translate.google.com/?source=osdd#en/en/sequelectron

Current supported databases

Do you want to support another SQL database? Please follow these steps.

Installation

Install via npm:

npm install sqlectron-db-core

Example Usage

const serverSession = db.createServer(serverInfo);
const dbConn = serverSession.createConnection(serverInfo.database);
dbConn.connect().then(() => {
  console.log(dbConn.executeQuery('SELECT 1'));
});

Where serverInfo is an array with the following fields:

  • id: in case including a new server manually there is no need setting an id field because SQLECTRON will do it for you
  • name
  • client: postgresql, mysql or sqlserver
  • host
  • port
  • user
  • password
  • database
  • ssh
    • host
    • user
    • port
    • privateKey
    • passphrase
    • useAgent
  • ssl

Contributing

Please check out it here.

License

Copyright (c) 2015 The SQLECTRON Team. This software is licensed under the MIT License.