Pervasive Adapter for Sails.js
- Pervaseive PSQL v11 SP3 and later (tested with Pervaseive PSQL v11 SP3)
- Waterline 0.11.11
- Linux
npm install sails-pervasive
Basic Options
const connectionConfig = {
adapters: {
pervasive: sailsPervasiveAdapter,
},
connections: {
default: {
adapter: 'pervasive',
connectionString: 'DSN=my_dsn',
},
},
};
To use the adapter, you need to install the pervasive client and unixodbc first.
To solve encoding problems, do the following:
Add the parameter to the dsn definition (in the odbc.ini file):
PvTranslate=auto
Change the encoding from UNICODE to UTF8 in the npm odbc package:
Comment this code snippet in binding.gyp
#'defines' : [
# "UNICODE"
#],
After which, run the following command from the npm directory of the odbc package
node-gyp configure build
[MIT License] Copyright © 2017 Vedidev, Pronin Egor