# informix

> A node.js native client for IBM Informix

Latest version **1.0.0** (published 2018-12-25) · ISC license · 0 weekly downloads

## Install

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

## 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.0.0 |
| Published | 2018-12-25 |
| First published | 2015-11-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.12.0 |
| Dependencies | 4 |
| Unpacked size | 75 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | yes |
| GitHub stars | 20 |
| Author | Uditha Atukorala |
| Maintainers | nukedzn |
| Keywords | informix |

## Links

- npm: https://www.npmjs.com/package/informix
- Repository: https://github.com/nukedzn/node-informix
- Homepage: https://github.com/nukedzn/node-informix#readme
- Issues: https://github.com/nukedzn/node-informix/issues
- npm.io page: https://npm.io/package/informix

## Dependencies (4)

- [nan](https://npm.io/package/nan.md) ^2.12.1
- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [bindings](https://npm.io/package/bindings.md) ^1.3.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-12-25
- 0.8.0 — 2018-05-21
- 0.7.0 — 2018-03-11
- 0.6.0 — 2018-02-06
- 0.5.9 — 2017-11-02
- 0.5.8 — 2017-10-31
- 0.5.7 — 2017-07-05
- 0.5.6 — 2017-02-18
- 0.5.5 — 2017-02-18
- 0.5.4 — 2016-11-06
- 0.5.3 — 2016-10-30
- 0.5.2 — 2016-06-18
- 0.5.1 — 2016-06-14
- 0.5.0 — 2016-02-27
- 0.4.0 — 2016-01-02
- … 5 more at https://npm.io/package/informix/versions

## README

node-informix
=============

[![Join the chat at https://gitter.im/nukedzn/node-informix](https://nukedzn.github.io/badges/gitter.svg)](https://gitter.im/nukedzn/node-informix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![npm version](https://img.shields.io/npm/v/informix.svg)](https://www.npmjs.com/package/informix)
[![wercker status](https://app.wercker.com/status/6f7f1a8246881c3d98acec4875280c54/s/master "wercker status")](https://app.wercker.com/project/bykey/6f7f1a8246881c3d98acec4875280c54)
[![codecov.io](https://codecov.io/github/nukedzn/node-informix/coverage.svg?branch=master)](https://codecov.io/github/nukedzn/node-informix?branch=master)
[![Coverage Status](https://coveralls.io/repos/nukedzn/node-informix/badge.svg?branch=master&service=github)](https://coveralls.io/github/nukedzn/node-informix?branch=master)
[![Dependency Status](https://david-dm.org/nukedzn/node-informix.svg)](https://david-dm.org/nukedzn/node-informix)
[![devDependency Status](https://david-dm.org/nukedzn/node-informix/dev-status.svg)](https://david-dm.org/nukedzn/node-informix#info=devDependencies)

A node.js native client for IBM Informix.


## Features

* Developer friendly ES6 Promise based API
* Transparent connections with lazy connect
* Connection pooling
* Prepared Statements
* Transaction contexts
* Linux, Mac OSX and Windows (experimental) compatibility



## Dependencies

* [IBM Informix ESQL/C](http://www-03.ibm.com/software/products/en/esqlc) which
can be installed using [IBM Informix CSDK](http://www-01.ibm.com/support/docview.wss?uid=swg27016673).


### Environment variables

* [INFORMIXDIR](https://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqlr.doc/ids_sqr_264.htm) -
(e.g. `INFORMIXDIR=/opt/informix`)
* [INFORMIXSERVER](https://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqlr.doc/ids_sqr_266.htm) -
(e.g. `INFORMIXSERVER=ol_informix1210`)
* [INFORMIXSQLHOSTS](https://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqlr.doc/ids_sqr_268.htm)
* `PATH` to include `${INFORMIXDIR}/bin` - (e.g. `export PATH="${INFORMIXDIR}/bin:${PATH}"`)
* `LD_LIBRARY_PATH` to include ESQL/C shared libraries -
(e.g. `export LD_LIBRARY_PATH="${INFORMIXDIR}/lib:${INFORMIXDIR}/lib/esql:${LD_LIBRARY_PATH}"`)


### Debian/Ubuntu

You'll need to patch `${INFORMIXDIR}/bin/esql` on Debian based systems.
e.g.
``` bash
$ cat esql-4.10.debian.patch | patch ${INFORMIXDIR}/bin/esql
```



## Installation

``` bash
$ npm install --save informix
```



## Usage

```js
var opts = {
  database : 'test@ol_informix1210',
  username : 'rockstar',
  password : 'secret'
};

var informix = require( 'informix' )( opts );
```

```js
var Informix = require( 'informix' ).Informix;
var informix = new Informix( { database : 'test@ol_informix1210' } );
```

```js
informix
  .query( "select tabname from systables where tabname like 'sys%auth';" )
  .then( function ( cursor ) {
    return cursor.fetchAll( { close : true } );
  } )
  .then( function ( results ) {
    console.log( 'results:', results );
  } )
  .catch( function ( err ) {
    console.log( err );
  } );
```

```js
var ctx = informix.createContext();

ctx.begin()
  .then( function () {
    return ctx.query( "insert into tcustomers( fname, lname ) values( 'John', 'Smith' );" );
  } )
  .then( function ( cursor ) {
    console.log( 'id:', cursor.serial() );
    return cursor.close();
  } )
  .then( function () {
    return ctx.commit();
  } )
  .then( function () {
    return ctx.end();
  } )
  .catch( function ( err ) {
    console.log( err );
  } );
```



## API Documentation

JSDoc generated API documentation can be found at [http://nukedzn.github.io/node-informix/docs/](http://nukedzn.github.io/node-informix/docs/).



## Contributing

Contributions are welcome through GitHub pull requests ([using fork & pull model](https://help.github.com/articles/using-pull-requests/#fork--pull)).

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