@twin.org/entity-storage-connector-postgresql 0.0.2-next.9 → 0.0.3-next.10
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/README.md +7 -12
- package/dist/es/index.js +6 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IPostgreSqlEntityStorageConnectorConfig.js +4 -0
- package/dist/es/models/IPostgreSqlEntityStorageConnectorConfig.js.map +1 -0
- package/dist/es/models/IPostgreSqlEntityStorageConnectorConstructorOptions.js +2 -0
- package/dist/es/models/IPostgreSqlEntityStorageConnectorConstructorOptions.js.map +1 -0
- package/dist/es/postgreSqlEntityStorageConnector.js +969 -0
- package/dist/es/postgreSqlEntityStorageConnector.js.map +1 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/models/IPostgreSqlEntityStorageConnectorConstructorOptions.d.ts +5 -1
- package/dist/types/postgreSqlEntityStorageConnector.d.ts +47 -8
- package/docs/changelog.md +220 -31
- package/docs/examples.md +98 -1
- package/docs/reference/classes/PostgreSqlEntityStorageConnector.md +172 -22
- package/docs/reference/interfaces/IPostgreSqlEntityStorageConnectorConfig.md +7 -7
- package/docs/reference/interfaces/IPostgreSqlEntityStorageConnectorConstructorOptions.md +12 -4
- package/locales/en.json +17 -3
- package/package.json +15 -12
- package/dist/cjs/index.cjs +0 -523
- package/dist/esm/index.mjs +0 -521
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Entity Storage Connector PostgreSQL
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package provides a PostgreSQL backend for relational persistence, transactions and advanced SQL features. It is designed to work with the wider storage ecosystem so applications can keep behaviour consistent across connectors and environments.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -8,18 +8,13 @@ Entity Storage connector implementation using PostgreSql storage.
|
|
|
8
8
|
npm install @twin.org/entity-storage-connector-postgresql
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Docker
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
To perform testing of this component it may be necessary to launch a local instance to communicate with.
|
|
14
14
|
|
|
15
|
-
```
|
|
16
|
-
docker
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Afterwards you can run the tests as follows:
|
|
20
|
-
|
|
21
|
-
```sh
|
|
22
|
-
npm run test
|
|
15
|
+
```shell
|
|
16
|
+
docker pull postgres:latest
|
|
17
|
+
docker run -d --name twin-entity-storage-postgresql -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password -p 5444:5432 postgres:latest
|
|
23
18
|
```
|
|
24
19
|
|
|
25
20
|
## Examples
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./models/IPostgreSqlEntityStorageConnectorConfig.js";
|
|
4
|
+
export * from "./models/IPostgreSqlEntityStorageConnectorConstructorOptions.js";
|
|
5
|
+
export * from "./postgreSqlEntityStorageConnector.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,qDAAqD,CAAC;AACpE,cAAc,iEAAiE,CAAC;AAChF,cAAc,uCAAuC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./models/IPostgreSqlEntityStorageConnectorConfig.js\";\nexport * from \"./models/IPostgreSqlEntityStorageConnectorConstructorOptions.js\";\nexport * from \"./postgreSqlEntityStorageConnector.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPostgreSqlEntityStorageConnectorConfig.js","sourceRoot":"","sources":["../../../src/models/IPostgreSqlEntityStorageConnectorConfig.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Configuration for the PostgreSql Entity Storage Connector.\n */\nexport interface IPostgreSqlEntityStorageConnectorConfig {\n\t/**\n\t * The host for the PostgreSql instance.\n\t */\n\thost: string;\n\n\t/**\n\t * The port for the PostgreSql instance.\n\t */\n\tport?: number;\n\n\t/**\n\t * The user for the PostgreSql instance.\n\t */\n\tuser: string;\n\n\t/**\n\t * The password for the PostgreSql instance.\n\t */\n\tpassword: string;\n\n\t/**\n\t * The name of the database to be used.\n\t */\n\tdatabase: string;\n\n\t/**\n\t * The name of the table to be used.\n\t */\n\ttableName: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPostgreSqlEntityStorageConnectorConstructorOptions.js","sourceRoot":"","sources":["../../../src/models/IPostgreSqlEntityStorageConnectorConstructorOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IPostgreSqlEntityStorageConnectorConfig } from \"./IPostgreSqlEntityStorageConnectorConfig.js\";\n\n/**\n * The options for the PostgreSql entity storage connector constructor.\n */\nexport interface IPostgreSqlEntityStorageConnectorConstructorOptions {\n\t/**\n\t * The schema for the entity.\n\t */\n\tentitySchema: string;\n\n\t/**\n\t * The keys to use from the context ids to create partitions.\n\t */\n\tpartitionContextIds?: string[];\n\n\t/**\n\t * The type of logging component to use.\n\t * @default logging\n\t */\n\tloggingComponentType?: string;\n\n\t/**\n\t * The configuration for the connector.\n\t */\n\tconfig: IPostgreSqlEntityStorageConnectorConfig;\n}\n"]}
|