Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

spacebetween/node-sqlanywhere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-sqlanywhere

A fork of the node-sybase library, this is a simple node.js wrapper around a Go CLI that provides easy access to SQL Anywhere 12.0 data sources. A static binary of the sqlago-connector go program is included and compiled as a 32 bit windows executable, tested using SQL Anywher 12.0 on Windows Server 2008.

npm

npm install sqlanywhere

quick example

var SQLAnywhere = require('sqlanywhere');
var db = new SQLAnywhere('host', 'dbName', 'username', 'pw');

db.connect(function (err) {
  if (err) return console.log(err);
  
  db.query('select * from user where user_id = 42', function (err, data) {
    if (err) console.log(err);
    
    console.log(data);

    db.disconnect();

  });
});

api

The api is super simple. It makes use of standard node callbacks so that it can be easily used with promises.

About

Fork of node-sybase lib for connecting to SQL Anywhere 12.0 data sources

Resources

Stars

Watchers

Forks

Packages

No packages published