# sybase

> A simple node.js wrapper around a java/jconnect app that provides easy access to Sybase Databases without having to install odbc or freetds.

Latest version **1.2.3** (published 2020-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install sybase
pnpm add sybase
yarn add sybase
bun add sybase
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2020-11-26 |
| First published | 2015-09-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Rod Howard |
| Maintainers | rodhoward |
| Keywords | database, sybase, jconnect, sql, java |

## Links

- npm: https://www.npmjs.com/package/sybase
- Repository: https://github.com/rodhoward/node-sybase
- Homepage: http://github.com/rodhoward/node-sybase/
- Issues: https://github.com/rodhoward/node-sybase/issues
- npm.io page: https://npm.io/package/sybase

## Dependencies (1)

- [JSONStream](https://npm.io/package/JSONStream.md) latest

## Alternatives

- [@libsql/sqlite3](https://npm.io/package/@libsql/sqlite3.md) — 39.8K weekly downloads
- [@fortemi/core](https://npm.io/package/@fortemi/core.md) — 461 weekly downloads
- [cdb-converter](https://npm.io/package/cdb-converter.md) — 341 weekly downloads
- [@uplo/adapter-prisma](https://npm.io/package/@uplo/adapter-prisma.md) — 75 weekly downloads
- [typeorm-aios](https://npm.io/package/typeorm-aios.md) — 30 weekly downloads

## Recent versions

- 1.2.3 (latest) — 2020-11-26
- 1.2.2 — 2020-11-19
- 1.2.1 — 2017-07-20
- 1.0.13 — 2017-02-06
- 1.0.12 — 2017-01-09
- 1.0.11 — 2017-01-09
- 1.0.10 — 2016-09-23
- 1.0.9 — 2016-09-23
- 1.0.8 — 2015-10-12
- 1.0.7 — 2015-10-12
- 1.0.6 — 2015-09-30
- 1.0.5 — 2015-09-30
- 1.0.4 — 2015-09-30
- 1.0.3 — 2015-09-29
- 1.0.2 — 2015-09-29
- … 1 more at https://npm.io/package/sybase/versions

## README

node-sybase
---------

A simple node.js wrapper around a Java application that provides easy access to Sybase databases via jconn3. The main goal is to allow easy installation without the requirements of installing and configuring odbc or freetds. You do however have to have java 1.5 or newer installed.

requirements
------------

* java 1.5+

install
-------

### git

```bash
git clone git://github.com/rodhoward/node-sybase.git
cd node-sybase
node-gyp configure build
```
### npm

```bash
npm install sybase
```

quick example
-------------

```javascript
var Sybase = require('sybase'),
	db = new Sybase('host', port, '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. The only thing not covered in the example above is the option to print some timing stats to the console as well as to specify the location of the Java application bridge, which shouldn't need to change.

```javascirpt 
var logTiming = true,
	javaJarPath = './JavaSybaseLink/dist/JavaSybaseLink.jar',
	db = new Sybase('host', port, 'dbName', 'username', 'pw', logTiming, javaJarPath);
```

The java Bridge now optionally looks for a "sybaseConfig.properties" file in which you can configure jconnect properties to be included in the connection. This should allow setting properties like:
```properties
ENCRYPT_PASSWORD=true
```

---
_Source: https://npm.io/package/sybase · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
