@nesgarbo/node-jt400 6.0.2 → 6.0.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.
@@ -11,7 +11,9 @@ interface BLOB {
11
11
  }
12
12
  type Param = string | number | Date | null | CLOB | BLOB;
13
13
  interface QueryOptions {
14
- trim: boolean;
14
+ trim?: boolean;
15
+ cursor?: boolean;
16
+ fetchSize?: number;
15
17
  }
16
18
  interface Metadata {
17
19
  name: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../ts-src/lib/baseConnection.types.ts"],"sourcesContent":["import { Readable, Writable } from 'stream'\nexport { Readable, Writable }\n\nexport interface CLOB {\n type: 'CLOB'\n value: string\n}\n\nexport interface BLOB {\n type: 'BLOB'\n value: string\n}\n\nexport type Param = string | number | Date | null | CLOB | BLOB\n\nexport interface QueryOptions {\n trim: boolean\n}\n\nexport interface Metadata {\n name: string\n typeName: string\n precision: number\n scale: number\n}\nexport interface Statement {\n prepare: (sql: string) => Promise<void>\n isQuery: () => boolean\n metadata: () => Promise<Metadata[]>\n asArray: () => Promise<string[][]>\n asIterable: () => AsyncIterable<string[]>\n asStream: (options?: any) => Readable\n asObjectStream: (options?: any) => Promise<Readable>\n updated: () => Promise<number>\n close: Close\n}\nexport type Execute = (sql: string, params?: Param[]) => Promise<Statement>\nexport type Query = {\n <T>(\n sql: string,\n params?: Param[] | undefined,\n options?: QueryOptions,\n callback?: (error: any, cursor: any) => void,\n ): Promise<T[]>\n}\nexport type Update = (sql: string, params?: Param[]) => Promise<number>\nexport type CreateReadStream = (sql: string, params?: Param[]) => Readable\nexport type InsertAndGetId = (sql: string, params?: Param[]) => Promise<number>\n\nexport interface WriteStreamOptions {\n bufferSize: number\n}\n\nexport type CreateWriteStream = (\n sql: string,\n options?: WriteStreamOptions,\n) => Writable\nexport type BatchUpdate = (sql: string, params?: Param[][]) => Promise<number[]>\nexport type Close = () => void\nexport type InsertList = (\n tableName: string,\n idColumn: string,\n rows: any[],\n) => Promise<number[]>\nexport interface BaseConnection {\n query: Query\n update: Update\n isInMemory: () => boolean\n createReadStream: CreateReadStream\n insertAndGetId: InsertAndGetId\n insertList: InsertList\n createWriteStream: CreateWriteStream\n batchUpdate: BatchUpdate\n execute: Execute\n\n commit: () => Promise<void>\n rollback: () => Promise<void>\n createStatement: () => Promise<Statement>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAmC;","names":[]}
1
+ {"version":3,"sources":["../../ts-src/lib/baseConnection.types.ts"],"sourcesContent":["import { Readable, Writable } from 'stream'\nexport { Readable, Writable }\n\nexport interface CLOB {\n type: 'CLOB'\n value: string\n}\n\nexport interface BLOB {\n type: 'BLOB'\n value: string\n}\n\nexport type Param = string | number | Date | null | CLOB | BLOB\n\nexport interface QueryOptions {\n trim?: boolean,\n cursor?: boolean,\n fetchSize?: number\n}\n\nexport interface Metadata {\n name: string\n typeName: string\n precision: number\n scale: number\n}\nexport interface Statement {\n prepare: (sql: string) => Promise<void>\n isQuery: () => boolean\n metadata: () => Promise<Metadata[]>\n asArray: () => Promise<string[][]>\n asIterable: () => AsyncIterable<string[]>\n asStream: (options?: any) => Readable\n asObjectStream: (options?: any) => Promise<Readable>\n updated: () => Promise<number>\n close: Close\n}\nexport type Execute = (sql: string, params?: Param[]) => Promise<Statement>\nexport type Query = {\n <T>(\n sql: string,\n params?: Param[] | undefined,\n options?: QueryOptions,\n callback?: (error: any, cursor: any) => void,\n ): Promise<T[]>\n}\nexport type Update = (sql: string, params?: Param[]) => Promise<number>\nexport type CreateReadStream = (sql: string, params?: Param[]) => Readable\nexport type InsertAndGetId = (sql: string, params?: Param[]) => Promise<number>\n\nexport interface WriteStreamOptions {\n bufferSize: number\n}\n\nexport type CreateWriteStream = (\n sql: string,\n options?: WriteStreamOptions,\n) => Writable\nexport type BatchUpdate = (sql: string, params?: Param[][]) => Promise<number[]>\nexport type Close = () => void\nexport type InsertList = (\n tableName: string,\n idColumn: string,\n rows: any[],\n) => Promise<number[]>\nexport interface BaseConnection {\n query: Query\n update: Update\n isInMemory: () => boolean\n createReadStream: CreateReadStream\n insertAndGetId: InsertAndGetId\n insertList: InsertList\n createWriteStream: CreateWriteStream\n batchUpdate: BatchUpdate\n execute: Execute\n\n commit: () => Promise<void>\n rollback: () => Promise<void>\n createStatement: () => Promise<Statement>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAmC;","names":[]}
@@ -11,7 +11,9 @@ interface BLOB {
11
11
  }
12
12
  type Param = string | number | Date | null | CLOB | BLOB;
13
13
  interface QueryOptions {
14
- trim: boolean;
14
+ trim?: boolean;
15
+ cursor?: boolean;
16
+ fetchSize?: number;
15
17
  }
16
18
  interface Metadata {
17
19
  name: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../ts-src/lib/baseConnection.types.ts"],"sourcesContent":["import { Readable, Writable } from 'stream'\nexport { Readable, Writable }\n\nexport interface CLOB {\n type: 'CLOB'\n value: string\n}\n\nexport interface BLOB {\n type: 'BLOB'\n value: string\n}\n\nexport type Param = string | number | Date | null | CLOB | BLOB\n\nexport interface QueryOptions {\n trim: boolean\n}\n\nexport interface Metadata {\n name: string\n typeName: string\n precision: number\n scale: number\n}\nexport interface Statement {\n prepare: (sql: string) => Promise<void>\n isQuery: () => boolean\n metadata: () => Promise<Metadata[]>\n asArray: () => Promise<string[][]>\n asIterable: () => AsyncIterable<string[]>\n asStream: (options?: any) => Readable\n asObjectStream: (options?: any) => Promise<Readable>\n updated: () => Promise<number>\n close: Close\n}\nexport type Execute = (sql: string, params?: Param[]) => Promise<Statement>\nexport type Query = {\n <T>(\n sql: string,\n params?: Param[] | undefined,\n options?: QueryOptions,\n callback?: (error: any, cursor: any) => void,\n ): Promise<T[]>\n}\nexport type Update = (sql: string, params?: Param[]) => Promise<number>\nexport type CreateReadStream = (sql: string, params?: Param[]) => Readable\nexport type InsertAndGetId = (sql: string, params?: Param[]) => Promise<number>\n\nexport interface WriteStreamOptions {\n bufferSize: number\n}\n\nexport type CreateWriteStream = (\n sql: string,\n options?: WriteStreamOptions,\n) => Writable\nexport type BatchUpdate = (sql: string, params?: Param[][]) => Promise<number[]>\nexport type Close = () => void\nexport type InsertList = (\n tableName: string,\n idColumn: string,\n rows: any[],\n) => Promise<number[]>\nexport interface BaseConnection {\n query: Query\n update: Update\n isInMemory: () => boolean\n createReadStream: CreateReadStream\n insertAndGetId: InsertAndGetId\n insertList: InsertList\n createWriteStream: CreateWriteStream\n batchUpdate: BatchUpdate\n execute: Execute\n\n commit: () => Promise<void>\n rollback: () => Promise<void>\n createStatement: () => Promise<Statement>\n}\n"],"mappings":"AAAA,SAAS,UAAU,gBAAgB;","names":[]}
1
+ {"version":3,"sources":["../../ts-src/lib/baseConnection.types.ts"],"sourcesContent":["import { Readable, Writable } from 'stream'\nexport { Readable, Writable }\n\nexport interface CLOB {\n type: 'CLOB'\n value: string\n}\n\nexport interface BLOB {\n type: 'BLOB'\n value: string\n}\n\nexport type Param = string | number | Date | null | CLOB | BLOB\n\nexport interface QueryOptions {\n trim?: boolean,\n cursor?: boolean,\n fetchSize?: number\n}\n\nexport interface Metadata {\n name: string\n typeName: string\n precision: number\n scale: number\n}\nexport interface Statement {\n prepare: (sql: string) => Promise<void>\n isQuery: () => boolean\n metadata: () => Promise<Metadata[]>\n asArray: () => Promise<string[][]>\n asIterable: () => AsyncIterable<string[]>\n asStream: (options?: any) => Readable\n asObjectStream: (options?: any) => Promise<Readable>\n updated: () => Promise<number>\n close: Close\n}\nexport type Execute = (sql: string, params?: Param[]) => Promise<Statement>\nexport type Query = {\n <T>(\n sql: string,\n params?: Param[] | undefined,\n options?: QueryOptions,\n callback?: (error: any, cursor: any) => void,\n ): Promise<T[]>\n}\nexport type Update = (sql: string, params?: Param[]) => Promise<number>\nexport type CreateReadStream = (sql: string, params?: Param[]) => Readable\nexport type InsertAndGetId = (sql: string, params?: Param[]) => Promise<number>\n\nexport interface WriteStreamOptions {\n bufferSize: number\n}\n\nexport type CreateWriteStream = (\n sql: string,\n options?: WriteStreamOptions,\n) => Writable\nexport type BatchUpdate = (sql: string, params?: Param[][]) => Promise<number[]>\nexport type Close = () => void\nexport type InsertList = (\n tableName: string,\n idColumn: string,\n rows: any[],\n) => Promise<number[]>\nexport interface BaseConnection {\n query: Query\n update: Update\n isInMemory: () => boolean\n createReadStream: CreateReadStream\n insertAndGetId: InsertAndGetId\n insertList: InsertList\n createWriteStream: CreateWriteStream\n batchUpdate: BatchUpdate\n execute: Execute\n\n commit: () => Promise<void>\n rollback: () => Promise<void>\n createStatement: () => Promise<Statement>\n}\n"],"mappings":"AAAA,SAAS,UAAU,gBAAgB;","names":[]}
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nesgarbo/node-jt400",
3
3
  "author": "Néstor García Bou <nesgarbo@icloud.com>",
4
- "version": "6.0.2",
4
+ "version": "6.0.3",
5
5
  "description": "JT400 (IBM Toolbox) for NodeJS",
6
6
  "type": "module",
7
7
  "main": "dist-cjs/index.js",