@bdkinc/knex-ibmi 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -33
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,10 +1,14 @@
1
1
  [![npm version](http://img.shields.io/npm/v/@bdkinc/knex-ibmi.svg)](https://npmjs.org/package/@bdkinc/knex-ibmi)
2
2
 
3
- **Disclaimer: This library is in beta. Please submit an issue for any bugs encounter or any questions you have.**
3
+ **Please submit an issue for any bug encounter or any questions you have.**
4
4
 
5
5
  ## Description
6
6
 
7
- This is an external dialect for [knex](https://github.com/tgriesser/knex). This library uses the ODBC driver and is only tested on IBMi. Here are the IBM OSS Docs https://ibmi-oss-docs.readthedocs.io/en/latest/odbc/README.html
7
+ This is an external dialect for [knex](https://knexjs.org).
8
+ This library uses the ODBC (as recommended here https://ibmi-oss-docs.readthedocs.io/en/latest/odbc/README.html)
9
+ driver and is only tested on IBMi.
10
+
11
+ For more information on IBMi OSS here are the [docs](https://ibmi-oss-docs.readthedocs.io/en/latest/README.html)
8
12
 
9
13
  ## Supported functionality
10
14
 
@@ -14,23 +18,20 @@ This is an external dialect for [knex](https://github.com/tgriesser/knex). This
14
18
 
15
19
  ## Limitations
16
20
 
17
- Currently, this dialect has limited functionality compared to the Knex built-in dialects. Below are some of the limitations:
18
-
19
21
  - No streaming support
20
- - Possibly other missing functionality
21
- - Journaling must be handled separately. After a migration is ran journaling can be configured on the newly created tables. I recommend using the schema utility in the i access client solutions software.
22
-
23
- ## Installing
24
22
 
25
- `npm install @bdkinc/knex-ibmi`
23
+ ## Installation
24
+ ```
25
+ npm install --save odbc knex @bdkinc/knex-ibmi
26
+ ```
26
27
 
27
28
  Requires Node v16 or higher.
28
29
 
29
30
  ## Dependencies
30
31
 
31
- `npm install odbc` see [IBM ODBC Docs for dependencies](https://ibmi-oss-docs.readthedocs.io/en/latest/odbc/README.html) if you run into any issues
32
+ `npm install odbc` see [odbc](https://github.com/markdirish/node-odbc)
32
33
 
33
- `npm install knex`
34
+ `npm install knex` see [knex](https://github.com/tgriesser/knex)
34
35
 
35
36
  ## Usage
36
37
 
@@ -43,15 +44,16 @@ const { DB2Dialect } = require("@bdkinc/knex-ibmi");
43
44
  const db = knex({
44
45
  client: DB2Dialect,
45
46
  connection: {
46
- host: "localhost",
47
- database: "knextest",
48
- port: 50000,
49
- user: "<user>",
50
- password: "<password>",
51
- driver: "IBM i Access ODBC Driver",
52
- connectionStringParams: {
53
- ALLOWPROCCALLS: 1,
47
+ host: "localhost", // hostname or ip address of server
48
+ database: "knextest", // usually named in your odbc.ini connection
49
+ port: 50000, // default port
50
+ user: "<user>", // IBMi username
51
+ password: "<password>", // IBMi password
52
+ driver: "IBM i Access ODBC Driver", // defined in odbcinst.ini
53
+ connectionStringParams: { // DSN connection string parameters https://www.ibm.com/docs/en/i/7.5?topic=details-connection-string-keywords
54
+ ALLOWPROCCALLS: 1,
54
55
  CMT: 0,
56
+ DBQ: 'MYLIB' // library or schema that holds the tables
55
57
  },
56
58
  },
57
59
  pool: {
@@ -77,15 +79,16 @@ import { DB2Dialect } from "@bdkinc/knex-ibmi";
77
79
  const db = knex({
78
80
  client: DB2Dialect,
79
81
  connection: {
80
- host: "localhost",
81
- database: "knextest",
82
- port: 50000,
83
- user: "<user>",
84
- password: "<password>",
85
- driver: "IBM i Access ODBC Driver",
86
- connectionStringParams: {
82
+ host: "localhost", // hostname or ip address of server
83
+ database: "knextest", // usually named in your odbc.ini connection
84
+ port: 50000, // default port
85
+ user: "<user>", // IBMi username
86
+ password: "<password>", // IBMi password
87
+ driver: "IBM i Access ODBC Driver", // defined in odbcinst.ini
88
+ connectionStringParams: { // DSN connection string parameters https://www.ibm.com/docs/en/i/7.5?topic=details-connection-string-keywords
87
89
  ALLOWPROCCALLS: 1,
88
90
  CMT: 0,
91
+ DBQ: 'MYLIB' // library or schema that holds the tables
89
92
  },
90
93
  },
91
94
  pool: {
@@ -113,15 +116,16 @@ import { DB2Dialect, DB2Config } from "@bdkinc/knex-ibmi";
113
116
  const config: DB2Config = {
114
117
  client: DB2Dialect,
115
118
  connection: {
116
- host: "localhost",
117
- database: "knextest",
118
- port: 50000,
119
- user: "<user>",
120
- password: "<password>",
121
- driver: "IBM i Access ODBC Driver",
122
- connectionStringParams: {
119
+ host: "localhost", // hostname or ip address of server
120
+ database: "knextest", // usually named in your odbc.ini connection
121
+ port: 50000, // default port
122
+ user: "<user>", // IBMi username
123
+ password: "<password>", // IBMi password
124
+ driver: "IBM i Access ODBC Driver", // defined in odbcinst.ini
125
+ connectionStringParams: { // DSN connection string parameters https://www.ibm.com/docs/en/i/7.5?topic=details-connection-string-keywords
123
126
  ALLOWPROCCALLS: 1,
124
127
  CMT: 0,
128
+ DBQ: 'MYLIB' // library or schema that holds the tables
125
129
  },
126
130
  },
127
131
  pool: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bdkinc/knex-ibmi",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Knex dialect for IBMi",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",