Cache ODBC - javascript access to Intersystems Cache Database
Description
This library aims to provide a simple access to ODBC data sources for node.js.
The library is primarily targeted at https://www.intersystems.com/products/cache/#what-sets-it-apart,
but may be suitable for other databases as well.
Library heavily relies on https://github.com/nanodbc/nanodbc - a proven wrapper for ODBC API.
Current status
The library has alpha quality.
Integration tests are written for Cache database samples.
Usage
See test specs for a usage example for a raw connector interface.
See https://github.com/theconst/odm-sample for an example web application.
You may also find a comprehensive instruction for different OS configuration.
Prerequisites
- Git 2.x.x
- MSVC Build tools (Windows), GCC 6.x.x + Make (UNIX)
- Cmake >= 3.2
- nodejs (tested versions are 8.x.x and 10.x.x)
- UnixODBC (on Linux)
- Configured ODBC datasource for the database. You may find configuration samples in config directory.
Build steps
General build steps:
- git clone
https://github.com/theconst/aodbc
- npm install
If the above steps do not work (or custom build options are required):
- git clone
https://github.com/theconst/aodbc
- npm install
- npm install -g cmake-js
- cmake-js rebuild -a
<target arch>
-G <generator to use>
After installing and building the module, you can use it as a submodule.
Docker
To launch the application in Docker container, follow the following steps:
- Change settings for your ODBC host in odbc.ini
docker build -t cacheodbc:latest .
-
docker exec -it <docker_image_id> /bin/bash
npm t
will run the test for the library
Releasing
- To trigger a release, commit to a branch with release-* tag.
- Artifacts will be available in the corresponding git releases section
Packaging
- Download artifacts from release.
- Add them to build directory.
- Add new artifacts (if any to package.json)
- run npm publish
TODO List
- Add support for setting fetch size
- Add tracing. You can enable tracing on ODBC labels
- Generalize delegation code
- Increase C++ test coverage
- Rewrite tests to be database-agnostic
- Automate build for linux
- Add support for prepared statements
- Add support for dates in prepared statements
- Add support for transactions
- Add support for binary type
- Add support for Windows
- Add support for Unicode
- Rename library to cache-odbc
- Migrate to bintray to reduce binary package size