@twin.org/entity-storage-connector-postgresql 0.9.2-next.1 → 0.9.2-next.11
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/dist/es/models/IPostgreSqlEntityStorageConnectorConfig.js.map +1 -1
- package/dist/es/postgreSqlEntityStorageConnector.js +291 -76
- package/dist/es/postgreSqlEntityStorageConnector.js.map +1 -1
- package/dist/types/models/IPostgreSqlEntityStorageConnectorConfig.d.ts +27 -0
- package/dist/types/postgreSqlEntityStorageConnector.d.ts +12 -5
- package/docs/changelog.md +161 -0
- package/docs/reference/classes/PostgreSqlEntityStorageConnector.md +35 -4
- package/docs/reference/interfaces/IPostgreSqlEntityStorageConnectorConfig.md +52 -0
- package/locales/en.json +7 -0
- package/package.json +3 -2
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,166 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.2-next.11](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.10...entity-storage-connector-postgresql-v0.9.2-next.11) (2026-08-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* skip partition ids with mismatched depth during partition enumeration ([#218](https://github.com/iotaledger/twin-entity-storage/issues/218)) ([8fc2386](https://github.com/iotaledger/twin-entity-storage/commit/8fc238699e2891f0c982530c011fe4438004b0ae))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/entity-storage-models bumped from 0.9.2-next.10 to 0.9.2-next.11
|
|
16
|
+
* devDependencies
|
|
17
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.9.2-next.10 to 0.9.2-next.11
|
|
18
|
+
|
|
19
|
+
## [0.9.2-next.10](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.9...entity-storage-connector-postgresql-v0.9.2-next.10) (2026-08-14)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Miscellaneous Chores
|
|
23
|
+
|
|
24
|
+
* **entity-storage-connector-postgresql:** Synchronize repo versions
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Dependencies
|
|
28
|
+
|
|
29
|
+
* The following workspace dependencies were updated
|
|
30
|
+
* dependencies
|
|
31
|
+
* @twin.org/entity-storage-models bumped from 0.9.2-next.9 to 0.9.2-next.10
|
|
32
|
+
* devDependencies
|
|
33
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.9.2-next.9 to 0.9.2-next.10
|
|
34
|
+
|
|
35
|
+
## [0.9.2-next.9](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.8...entity-storage-connector-postgresql-v0.9.2-next.9) (2026-08-12)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* use hashing to restrict index name length ([757d572](https://github.com/iotaledger/twin-entity-storage/commit/757d5728161a00c1d1865ad6df3231eecfad16f2))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Dependencies
|
|
44
|
+
|
|
45
|
+
* The following workspace dependencies were updated
|
|
46
|
+
* dependencies
|
|
47
|
+
* @twin.org/entity-storage-models bumped from 0.9.2-next.8 to 0.9.2-next.9
|
|
48
|
+
* devDependencies
|
|
49
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.9.2-next.8 to 0.9.2-next.9
|
|
50
|
+
|
|
51
|
+
## [0.9.2-next.8](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.7...entity-storage-connector-postgresql-v0.9.2-next.8) (2026-08-12)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Features
|
|
55
|
+
|
|
56
|
+
* indexing ([#207](https://github.com/iotaledger/twin-entity-storage/issues/207)) ([2fd1f0d](https://github.com/iotaledger/twin-entity-storage/commit/2fd1f0d992344905c9dd1a44addfc4f9d5b5c168))
|
|
57
|
+
* pooled connections ([#208](https://github.com/iotaledger/twin-entity-storage/issues/208)) ([5d832d1](https://github.com/iotaledger/twin-entity-storage/commit/5d832d15b0639f13ad3f5d2c68c946a72264310a))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Dependencies
|
|
61
|
+
|
|
62
|
+
* The following workspace dependencies were updated
|
|
63
|
+
* dependencies
|
|
64
|
+
* @twin.org/entity-storage-models bumped from 0.9.2-next.7 to 0.9.2-next.8
|
|
65
|
+
* devDependencies
|
|
66
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.9.2-next.7 to 0.9.2-next.8
|
|
67
|
+
|
|
68
|
+
## [0.9.2-next.7](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.6...entity-storage-connector-postgresql-v0.9.2-next.7) (2026-08-11)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### Features
|
|
72
|
+
|
|
73
|
+
* optimistic locking ([#201](https://github.com/iotaledger/twin-entity-storage/issues/201)) ([80cbe3b](https://github.com/iotaledger/twin-entity-storage/commit/80cbe3b611c47b16328bceab02cfb8423fe1bbcd))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Dependencies
|
|
77
|
+
|
|
78
|
+
* The following workspace dependencies were updated
|
|
79
|
+
* dependencies
|
|
80
|
+
* @twin.org/entity-storage-models bumped from 0.9.2-next.6 to 0.9.2-next.7
|
|
81
|
+
* devDependencies
|
|
82
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.9.2-next.6 to 0.9.2-next.7
|
|
83
|
+
|
|
84
|
+
## [0.9.2-next.6](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.5...entity-storage-connector-postgresql-v0.9.2-next.6) (2026-08-07)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Bug Fixes
|
|
88
|
+
|
|
89
|
+
* allow multi-property sort on DynamoDB and CosmosDB connectors ([#196](https://github.com/iotaledger/twin-entity-storage/issues/196)) ([f1bb582](https://github.com/iotaledger/twin-entity-storage/commit/f1bb5826d75dae331ad6b42df5de330a308c5405))
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Dependencies
|
|
93
|
+
|
|
94
|
+
* The following workspace dependencies were updated
|
|
95
|
+
* dependencies
|
|
96
|
+
* @twin.org/entity-storage-models bumped from 0.9.2-next.5 to 0.9.2-next.6
|
|
97
|
+
* devDependencies
|
|
98
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.9.2-next.5 to 0.9.2-next.6
|
|
99
|
+
|
|
100
|
+
## [0.9.2-next.5](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.4...entity-storage-connector-postgresql-v0.9.2-next.5) (2026-08-07)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### Features
|
|
104
|
+
|
|
105
|
+
* linting and dependency update ([c307b60](https://github.com/iotaledger/twin-entity-storage/commit/c307b606d03ea436b7c43d4e1764b5c08f415555))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Dependencies
|
|
109
|
+
|
|
110
|
+
* The following workspace dependencies were updated
|
|
111
|
+
* dependencies
|
|
112
|
+
* @twin.org/entity-storage-models bumped from 0.9.2-next.4 to 0.9.2-next.5
|
|
113
|
+
* devDependencies
|
|
114
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.9.2-next.4 to 0.9.2-next.5
|
|
115
|
+
|
|
116
|
+
## [0.9.2-next.4](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.3...entity-storage-connector-postgresql-v0.9.2-next.4) (2026-08-04)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Bug Fixes
|
|
120
|
+
|
|
121
|
+
* schema version check crashes in multi-tenant mode ([#192](https://github.com/iotaledger/twin-entity-storage/issues/192)) ([a816341](https://github.com/iotaledger/twin-entity-storage/commit/a8163415ce116582f3c3c23294f7f4062099d8f3))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### Dependencies
|
|
125
|
+
|
|
126
|
+
* The following workspace dependencies were updated
|
|
127
|
+
* dependencies
|
|
128
|
+
* @twin.org/entity-storage-models bumped from 0.9.2-next.3 to 0.9.2-next.4
|
|
129
|
+
* devDependencies
|
|
130
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.9.2-next.3 to 0.9.2-next.4
|
|
131
|
+
|
|
132
|
+
## [0.9.2-next.3](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.2...entity-storage-connector-postgresql-v0.9.2-next.3) (2026-08-03)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
### Features
|
|
136
|
+
|
|
137
|
+
* update health signatures ([#188](https://github.com/iotaledger/twin-entity-storage/issues/188)) ([0159094](https://github.com/iotaledger/twin-entity-storage/commit/015909423958a7a20505a92b23793a044d26f6a4))
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
### Dependencies
|
|
141
|
+
|
|
142
|
+
* The following workspace dependencies were updated
|
|
143
|
+
* dependencies
|
|
144
|
+
* @twin.org/entity-storage-models bumped from 0.9.2-next.2 to 0.9.2-next.3
|
|
145
|
+
* devDependencies
|
|
146
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.9.2-next.2 to 0.9.2-next.3
|
|
147
|
+
|
|
148
|
+
## [0.9.2-next.2](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.1...entity-storage-connector-postgresql-v0.9.2-next.2) (2026-07-29)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### Miscellaneous Chores
|
|
152
|
+
|
|
153
|
+
* **entity-storage-connector-postgresql:** Synchronize repo versions
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Dependencies
|
|
157
|
+
|
|
158
|
+
* The following workspace dependencies were updated
|
|
159
|
+
* dependencies
|
|
160
|
+
* @twin.org/entity-storage-models bumped from 0.9.2-next.1 to 0.9.2-next.2
|
|
161
|
+
* devDependencies
|
|
162
|
+
* @twin.org/entity-storage-connector-memory bumped from 0.9.2-next.1 to 0.9.2-next.2
|
|
163
|
+
|
|
3
164
|
## [0.9.2-next.1](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-connector-postgresql-v0.9.2-next.0...entity-storage-connector-postgresql-v0.9.2-next.1) (2026-07-29)
|
|
4
165
|
|
|
5
166
|
|
|
@@ -11,6 +11,7 @@ Class for performing entity storage operations using ql.
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
13
13
|
- `IEntityStorageMigrationConnector`\<`T`\>
|
|
14
|
+
- `IHealthProviderComponent`
|
|
14
15
|
|
|
15
16
|
## Constructors
|
|
16
17
|
|
|
@@ -90,17 +91,17 @@ The class name of the component.
|
|
|
90
91
|
|
|
91
92
|
> **health**(): `Promise`\<`IHealth`[]\>
|
|
92
93
|
|
|
93
|
-
|
|
94
|
+
Returns the health status of the component.
|
|
94
95
|
|
|
95
96
|
#### Returns
|
|
96
97
|
|
|
97
98
|
`Promise`\<`IHealth`[]\>
|
|
98
99
|
|
|
99
|
-
The health of the component.
|
|
100
|
+
The health status of the component.
|
|
100
101
|
|
|
101
102
|
#### Implementation of
|
|
102
103
|
|
|
103
|
-
`
|
|
104
|
+
`IHealthProviderComponent.health`
|
|
104
105
|
|
|
105
106
|
***
|
|
106
107
|
|
|
@@ -204,6 +205,10 @@ The optional conditions to match for the entities.
|
|
|
204
205
|
|
|
205
206
|
The id of the entity.
|
|
206
207
|
|
|
208
|
+
#### Throws
|
|
209
|
+
|
|
210
|
+
ConflictError when the entity exists but the supplied conditions or version do not match the stored state.
|
|
211
|
+
|
|
207
212
|
#### Implementation of
|
|
208
213
|
|
|
209
214
|
`IEntityStorageMigrationConnector.set`
|
|
@@ -338,12 +343,38 @@ True if the teardown process was successful.
|
|
|
338
343
|
|
|
339
344
|
***
|
|
340
345
|
|
|
346
|
+
### connectorVersion() {#connectorversion}
|
|
347
|
+
|
|
348
|
+
> **connectorVersion**(): `number`
|
|
349
|
+
|
|
350
|
+
Get the connector implementation version.
|
|
351
|
+
|
|
352
|
+
#### Returns
|
|
353
|
+
|
|
354
|
+
`number`
|
|
355
|
+
|
|
356
|
+
The connector implementation version.
|
|
357
|
+
|
|
358
|
+
#### Implementation of
|
|
359
|
+
|
|
360
|
+
`IEntityStorageMigrationConnector.connectorVersion`
|
|
361
|
+
|
|
362
|
+
***
|
|
363
|
+
|
|
341
364
|
### getPartitionContextIds() {#getpartitioncontextids}
|
|
342
365
|
|
|
343
|
-
> **getPartitionContextIds**(): `Promise`\<`IContextIds`[] \| `undefined`\>
|
|
366
|
+
> **getPartitionContextIds**(`loggingComponentType?`): `Promise`\<`IContextIds`[] \| `undefined`\>
|
|
344
367
|
|
|
345
368
|
Get all the distinct partition context ids from the storage.
|
|
346
369
|
|
|
370
|
+
#### Parameters
|
|
371
|
+
|
|
372
|
+
##### loggingComponentType?
|
|
373
|
+
|
|
374
|
+
`string`
|
|
375
|
+
|
|
376
|
+
The optional component type to use for logging skipped partition ids.
|
|
377
|
+
|
|
347
378
|
#### Returns
|
|
348
379
|
|
|
349
380
|
`Promise`\<`IContextIds`[] \| `undefined`\>
|
|
@@ -49,3 +49,55 @@ The name of the database to be used.
|
|
|
49
49
|
> **tableName**: `string`
|
|
50
50
|
|
|
51
51
|
The name of the table to be used.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### pool? {#pool}
|
|
56
|
+
|
|
57
|
+
> `optional` **pool?**: `object`
|
|
58
|
+
|
|
59
|
+
Optional connection pool configuration.
|
|
60
|
+
|
|
61
|
+
#### max?
|
|
62
|
+
|
|
63
|
+
> `optional` **max?**: `number`
|
|
64
|
+
|
|
65
|
+
Maximum number of connections in the pool.
|
|
66
|
+
|
|
67
|
+
##### Default
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
10
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### idleTimeout?
|
|
74
|
+
|
|
75
|
+
> `optional` **idleTimeout?**: `number`
|
|
76
|
+
|
|
77
|
+
Seconds a connection can remain idle before being closed.
|
|
78
|
+
|
|
79
|
+
#### connectTimeout?
|
|
80
|
+
|
|
81
|
+
> `optional` **connectTimeout?**: `number`
|
|
82
|
+
|
|
83
|
+
Seconds to wait when establishing a connection.
|
|
84
|
+
|
|
85
|
+
##### Default
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
30
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### maxLifetime?
|
|
92
|
+
|
|
93
|
+
> `optional` **maxLifetime?**: `number`
|
|
94
|
+
|
|
95
|
+
Maximum seconds a connection can remain open.
|
|
96
|
+
|
|
97
|
+
***
|
|
98
|
+
|
|
99
|
+
### mutexTimeoutMs? {#mutextimeoutms}
|
|
100
|
+
|
|
101
|
+
> `optional` **mutexTimeoutMs?**: `number`
|
|
102
|
+
|
|
103
|
+
Milliseconds to wait for connector mutex locks before throwing.
|
package/locales/en.json
CHANGED
|
@@ -9,8 +9,15 @@
|
|
|
9
9
|
"tableDropped": "Table \"{tableName}\" dropped"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"warn": {
|
|
13
|
+
"postgreSqlEntityStorageConnector": {
|
|
14
|
+
"partitionIdsSkipped": "Skipping partition ids whose depth does not match the {expected} configured partition keys: {partitionIds}. Entities in these partitions are ignored by migration."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
12
17
|
"error": {
|
|
13
18
|
"postgreSqlEntityStorageConnector": {
|
|
19
|
+
"optimisticLockFailed": "The entity \"{conflictId}\" could not be written because the optimistic lock check failed",
|
|
20
|
+
"conditionFailed": "The entity \"{conflictId}\" could not be updated because the supplied conditions did not match the stored state",
|
|
14
21
|
"databaseCreateFailed": "Unable to create database \"{databaseName}\"",
|
|
15
22
|
"setFailed": "Unable to set entity \"{id}\"",
|
|
16
23
|
"getFailed": "Unable to get entity \"{id}\"",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/entity-storage-connector-postgresql",
|
|
3
|
-
"version": "0.9.2-next.
|
|
3
|
+
"version": "0.9.2-next.11",
|
|
4
4
|
"description": "PostgreSQL connector for relational persistence and advanced SQL features.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
"node": ">=24.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@twin.org/api-models": "next",
|
|
17
18
|
"@twin.org/context": "next",
|
|
18
19
|
"@twin.org/core": "next",
|
|
19
20
|
"@twin.org/entity": "next",
|
|
20
|
-
"@twin.org/entity-storage-models": "0.9.2-next.
|
|
21
|
+
"@twin.org/entity-storage-models": "0.9.2-next.11",
|
|
21
22
|
"@twin.org/logging-models": "next",
|
|
22
23
|
"@twin.org/nameof": "next",
|
|
23
24
|
"postgres": "3.4.9"
|