@sqb/sqljs 4.10.0 → 4.10.2

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sqb/sqljs",
3
3
  "description": "SQB serialization extension for sql.js driver",
4
- "version": "4.10.0",
4
+ "version": "4.10.2",
5
5
  "author": "Panates",
6
6
  "contributors": [
7
7
  "Eray Hanoglu <e.hanoglu@panates.com>",
@@ -40,9 +40,9 @@
40
40
  "sql.js": "^1.8.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "@sqb/builder": "^4.10.0",
44
- "@sqb/connect": "^4.10.0",
45
- "@sqb/sqlite-dialect": "^4.10.0",
43
+ "@sqb/builder": "^4.10.2",
44
+ "@sqb/connect": "^4.10.2",
45
+ "@sqb/sqlite-dialect": "^4.10.2",
46
46
  "sql.js": "^1.8.0"
47
47
  },
48
48
  "engines": {
@@ -53,6 +53,7 @@
53
53
  "bin/",
54
54
  "cjs/",
55
55
  "esm/",
56
+ "types/",
56
57
  "LICENSE",
57
58
  "README.md"
58
59
  ],
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import '@sqb/sqlite-dialect';
2
+ import { Adapter, ClientConfiguration } from '@sqb/connect';
3
+ export declare class SqljsAdapter implements Adapter {
4
+ driver: string;
5
+ dialect: string;
6
+ features: {
7
+ cursor: boolean;
8
+ };
9
+ connect(config: ClientConfiguration): Promise<Adapter.Connection>;
10
+ }
11
+ export declare function closeMemoryDatabase(name?: string): Promise<void>;
@@ -0,0 +1,16 @@
1
+ import { Database } from 'sql.js';
2
+ import { Adapter, QueryRequest } from '@sqb/connect';
3
+ export declare class SqljsConnection implements Adapter.Connection {
4
+ private _onClose;
5
+ private intlcon?;
6
+ constructor(db: Database, _onClose: Function);
7
+ get sessionId(): any;
8
+ close(): Promise<void>;
9
+ reset(): Promise<void>;
10
+ startTransaction(): Promise<void>;
11
+ commit(): Promise<void>;
12
+ rollback(): Promise<void>;
13
+ test(): Promise<void>;
14
+ execute(query: QueryRequest): Promise<Adapter.Response>;
15
+ private _convertFields;
16
+ }
@@ -0,0 +1,12 @@
1
+ import { Adapter, RowType } from '@sqb/connect';
2
+ export declare class SqljsCursor implements Adapter.Cursor {
3
+ private _stmt?;
4
+ private readonly _rowType;
5
+ constructor(stmt: any, opts: {
6
+ rowType: RowType;
7
+ });
8
+ get isClosed(): boolean;
9
+ get rowType(): RowType;
10
+ close(): Promise<void>;
11
+ fetch(nRows: number): Promise<any[] | undefined>;
12
+ }