@sqb/postgres 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 +5 -4
- package/types/datatype-map.d.ts +3 -0
- package/types/index.d.ts +2 -0
- package/types/pg-adapter.d.ts +12 -0
- package/types/pg-connection.d.ts +22 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqb/postgres",
|
|
3
3
|
"description": "SQB serialization extension for PostgreSQL database",
|
|
4
|
-
"version": "4.10.
|
|
4
|
+
"version": "4.10.2",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Eray Hanoglu <e.hanoglu@panates.com>",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"postgresql-client": "^2.10.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@sqb/builder": "^4.10.
|
|
43
|
-
"@sqb/connect": "^4.10.
|
|
44
|
-
"@sqb/postgres-dialect": "^4.10.
|
|
42
|
+
"@sqb/builder": "^4.10.2",
|
|
43
|
+
"@sqb/connect": "^4.10.2",
|
|
44
|
+
"@sqb/postgres-dialect": "^4.10.2",
|
|
45
45
|
"postgresql-client": "^2.x.x"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"bin/",
|
|
53
53
|
"cjs/",
|
|
54
54
|
"esm/",
|
|
55
|
+
"types/",
|
|
55
56
|
"LICENSE",
|
|
56
57
|
"README.md"
|
|
57
58
|
],
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '@sqb/postgres-dialect';
|
|
2
|
+
import { Adapter, ClientConfiguration, DataType } from '@sqb/connect';
|
|
3
|
+
export declare class PgAdapter implements Adapter {
|
|
4
|
+
driver: string;
|
|
5
|
+
dialect: string;
|
|
6
|
+
features: {
|
|
7
|
+
cursor: boolean;
|
|
8
|
+
schema: boolean;
|
|
9
|
+
fetchAsString: DataType[];
|
|
10
|
+
};
|
|
11
|
+
connect(config: ClientConfiguration): Promise<Adapter.Connection>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Connection, FieldInfo } from 'postgresql-client';
|
|
2
|
+
import { Adapter, QueryRequest } from '@sqb/connect';
|
|
3
|
+
export declare class PgConnection implements Adapter.Connection {
|
|
4
|
+
private intlcon?;
|
|
5
|
+
constructor(conn: Connection);
|
|
6
|
+
get sessionId(): any;
|
|
7
|
+
close(): Promise<void>;
|
|
8
|
+
reset(): Promise<void>;
|
|
9
|
+
startTransaction(): Promise<void>;
|
|
10
|
+
commit(): Promise<void>;
|
|
11
|
+
rollback(): Promise<void>;
|
|
12
|
+
setSavepoint(savepoint: string): Promise<void>;
|
|
13
|
+
releaseSavepoint(savepoint: string): Promise<void>;
|
|
14
|
+
rollbackSavepoint(savepoint: string): Promise<void>;
|
|
15
|
+
getInTransaction(): boolean;
|
|
16
|
+
test(): Promise<void>;
|
|
17
|
+
getSchema(): Promise<string>;
|
|
18
|
+
setSchema(schema: string): Promise<void>;
|
|
19
|
+
onGenerateQuery(request: QueryRequest): void;
|
|
20
|
+
execute(query: QueryRequest): Promise<Adapter.Response>;
|
|
21
|
+
_convertFields(fields: FieldInfo[]): any[];
|
|
22
|
+
}
|