@oino-ts/db-postgresql 0.21.1 → 1.0.0

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.
@@ -1,5 +1,5 @@
1
- import { OINOResult } from "@oino-ts/common";
2
- import { OINODb, OINODbParams, OINODbDataSet, OINODbApi, OINODataCell } from "@oino-ts/db";
1
+ import { OINOResult, OINODataSet, OINODataCell } from "@oino-ts/common";
2
+ import { OINODb, OINODbApi, OINODbParams } from "@oino-ts/db";
3
3
  /**
4
4
  * Implementation of Postgresql-database.
5
5
  *
@@ -20,39 +20,39 @@ export declare class OINODbPostgresql extends OINODb {
20
20
  * @param sqlTable name of the table
21
21
  *
22
22
  */
23
- printSqlTablename(sqlTable: string): string;
23
+ printTableName(sqlTable: string): string;
24
24
  /**
25
25
  * Print a column name with correct SQL escaping.
26
26
  *
27
27
  * @param sqlColumn name of the column
28
28
  *
29
29
  */
30
- printSqlColumnname(sqlColumn: string): string;
30
+ printColumnName(sqlColumn: string): string;
31
31
  /**
32
32
  * Print a single data value from serialization using the context of the native data
33
33
  * type with the correct SQL escaping.
34
34
  *
35
35
  * @param cellValue data from sql results
36
- * @param sqlType native type name for table column
36
+ * @param nativeType native type name for table column
37
37
  *
38
38
  */
39
- printCellAsSqlValue(cellValue: OINODataCell, sqlType: string): string;
39
+ printCellAsValue(cellValue: OINODataCell, nativeType: string): string;
40
40
  /**
41
41
  * Print a single string value as valid sql literal
42
42
  *
43
43
  * @param sqlString string value
44
44
  *
45
45
  */
46
- printSqlString(sqlString: string): string;
46
+ printStringValue(sqlString: string): string;
47
47
  /**
48
48
  * Parse a single SQL result value for serialization using the context of the native data
49
49
  * type.
50
50
  *
51
51
  * @param sqlValue data from serialization
52
- * @param sqlType native type name for table column
52
+ * @param nativeType native type name for table column
53
53
  *
54
54
  */
55
- parseSqlValueAsCell(sqlValue: OINODataCell, sqlType: string): OINODataCell;
55
+ parseValueAsCell(sqlValue: OINODataCell, nativeType: string): OINODataCell;
56
56
  /**
57
57
  * Connect to database.
58
58
  *
@@ -74,18 +74,18 @@ export declare class OINODbPostgresql extends OINODb {
74
74
  * @param sql SQL statement.
75
75
  *
76
76
  */
77
- sqlSelect(sql: string): Promise<OINODbDataSet>;
77
+ sqlSelect(sql: string): Promise<OINODataSet>;
78
78
  /**
79
79
  * Execute other sql operations.
80
80
  *
81
81
  * @param sql SQL statement.
82
82
  *
83
83
  */
84
- sqlExec(sql: string): Promise<OINODbDataSet>;
84
+ sqlExec(sql: string): Promise<OINODataSet>;
85
85
  private _getSchemaSql;
86
86
  private _getValidateSql;
87
87
  /**
88
- * Initialize a data model by getting the SQL schema and populating OINODbDataFields of
88
+ * Initialize a data model by getting the SQL schema and populating OINODataFields of
89
89
  * the model.
90
90
  *
91
91
  * @param api api which data model to initialize.
package/package.json CHANGED
@@ -1,38 +1,38 @@
1
- {
2
- "name": "@oino-ts/db-postgresql",
3
- "version": "0.21.1",
4
- "description": "OINO TS package for using Postgresql databases.",
5
- "author": "Matias Kiviniemi (pragmatta)",
6
- "license": "MPL-2.0",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/pragmatta/oino-ts.git"
10
- },
11
- "keywords": [
12
- "sql",
13
- "database",
14
- "rest-api",
15
- "typescript",
16
- "library",
17
- "postgresql"
18
- ],
19
- "main": "./dist/cjs/index.js",
20
- "module": "./dist/esm/index.js",
21
- "types": "./dist/types/index.d.ts",
22
- "dependencies": {
23
- "@oino-ts/db": "0.21.1",
24
- "pg": "^8.11.3"
25
- },
26
- "devDependencies": {
27
- "@types/bun": "latest",
28
- "@types/node": "^20.12.7",
29
- "@types/pg": "^8.11.5",
30
- "typescript": "~5.9.0"
31
- },
32
- "files": [
33
- "src/*.ts",
34
- "dist/cjs/*.js",
35
- "dist/esm/*.js",
36
- "dist/types/*.d.ts"
37
- ]
38
- }
1
+ {
2
+ "name": "@oino-ts/db-postgresql",
3
+ "version": "1.0.0",
4
+ "description": "OINO TS package for using Postgresql databases.",
5
+ "author": "Matias Kiviniemi (pragmatta)",
6
+ "license": "MPL-2.0",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/pragmatta/oino-ts.git"
10
+ },
11
+ "keywords": [
12
+ "sql",
13
+ "database",
14
+ "rest-api",
15
+ "typescript",
16
+ "library",
17
+ "postgresql"
18
+ ],
19
+ "main": "./dist/cjs/index.js",
20
+ "module": "./dist/esm/index.js",
21
+ "types": "./dist/types/index.d.ts",
22
+ "dependencies": {
23
+ "@oino-ts/db": "1.0.0",
24
+ "pg": "^8.11.3"
25
+ },
26
+ "devDependencies": {
27
+ "@types/bun": "latest",
28
+ "@types/node": "^20.12.7",
29
+ "@types/pg": "^8.11.5",
30
+ "typescript": "~5.9.0"
31
+ },
32
+ "files": [
33
+ "src/*.ts",
34
+ "dist/cjs/*.js",
35
+ "dist/esm/*.js",
36
+ "dist/types/*.d.ts"
37
+ ]
38
+ }