@webda/postgres 4.0.0-beta.7 → 4.0.0-beta.9

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/webda.module.json CHANGED
@@ -94,6 +94,7 @@
94
94
  }
95
95
  ]
96
96
  },
97
+ "stream": {},
97
98
  "types": {
98
99
  "$ref": "#/definitions/CustomTypesConfig"
99
100
  },
@@ -106,6 +107,9 @@
106
107
  "ConnectionOptions": {
107
108
  "additionalProperties": false,
108
109
  "properties": {
110
+ "ALPNCallback": {
111
+ "description": "If set, this will be called when a client opens a connection using the ALPN extension.\nOne argument will be passed to the callback: an object containing `servername` and `protocols` fields,\nrespectively containing the server name from the SNI extension (if any) and an array of\nALPN protocol name strings. The callback must return either one of the strings listed in `protocols`,\nwhich will be returned to the client as the selected ALPN protocol, or `undefined`,\nto reject the connection with a fatal alert. If a string is returned that does not match one of\nthe client's ALPN protocols, an error will be thrown.\nThis option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error."
112
+ },
109
113
  "ALPNProtocols": {
110
114
  "anyOf": [
111
115
  {
@@ -138,6 +142,9 @@
138
142
  ],
139
143
  "description": "An array of strings, or a single `Buffer`, `TypedArray`, or `DataView` containing the supported\nALPN protocols. Buffers should have the format `[len][name][len][name]...`\ne.g. `'\\x08http/1.1\\x08http/1.0'`, where the `len` byte is the length of the\nnext protocol name. Passing an array is usually much simpler, e.g.\n`['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher\npreference than those later."
140
144
  },
145
+ "SNICallback": {
146
+ "description": "SNICallback(servername, cb) <Function> A function that will be\ncalled if the client supports SNI TLS extension. Two arguments\nwill be passed when called: servername and cb. SNICallback should\ninvoke cb(null, ctx), where ctx is a SecureContext instance.\n(tls.createSecureContext(...) can be used to get a proper\nSecureContext.) If SNICallback wasn't provided the default callback\nwith high-level API will be used (see below)."
147
+ },
141
148
  "allowPartialTrustChain": {
142
149
  "default": false,
143
150
  "description": "Treat intermediate (non-self-signed)\ncertificates in the trust CA certificate list as trusted.",
@@ -200,6 +207,7 @@
200
207
  ],
201
208
  "description": "Cert chains in PEM format. One cert chain should be provided per\nprivate key. Each cert chain should consist of the PEM formatted\ncertificate for a provided private key, followed by the PEM\nformatted intermediate certificates (if any), in order, and not\nincluding the root CA (the root CA must be pre-known to the peer,\nsee ca). When providing multiple cert chains, they do not have to\nbe in the same order as their private keys in key. If the\nintermediate certificates are not provided, the peer will not be\nable to validate the certificate, and the handshake will fail."
202
209
  },
210
+ "checkServerIdentity": {},
203
211
  "ciphers": {
204
212
  "description": "Cipher suite specification, replacing the default. For more\ninformation, see modifying the default cipher suite. Permitted\nciphers can be obtained via tls.getCiphers(). Cipher names must be\nuppercased in order for OpenSSL to accept them.",
205
213
  "type": "string"
@@ -298,6 +306,7 @@
298
306
  ],
299
307
  "description": "Private keys in PEM format. PEM allows the option of private keys\nbeing encrypted. Encrypted keys will be decrypted with\noptions.passphrase. Multiple keys using different algorithms can be\nprovided either as an array of unencrypted key strings or buffers,\nor an array of objects in the form {pem: <string|buffer>[,\npassphrase: <string>]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted keys will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not."
300
308
  },
309
+ "lookup": {},
301
310
  "maxVersion": {
302
311
  "description": "Optionally set the maximum TLS version to allow. One\nof `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the\n`secureProtocol` option, use one or the other.\n**Default:** `'TLSv1.3'`, unless changed using CLI options. Using\n`--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to\n`'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.",
303
312
  "enum": [
@@ -372,6 +381,10 @@
372
381
  "description": "Identifier of a private key managed by an OpenSSL engine. Should be\nused together with privateKeyEngine. Should not be set together with\nkey, because both options define a private key in different ways.",
373
382
  "type": "string"
374
383
  },
384
+ "pskCallback": {
385
+ "description": "When negotiating TLS-PSK (pre-shared keys), this function is called\nwith optional identity `hint` provided by the server or `null`\nin case of TLS 1.3 where `hint` was removed.\nIt will be necessary to provide a custom `tls.checkServerIdentity()`\nfor the connection as the default one will try to check hostname/IP\nof the server against the certificate but that's not applicable for PSK\nbecause there won't be a certificate present.\nMore information can be found in the RFC 4279.",
386
+ "returns": "Return `null` to stop the negotiation process. `psk` must be\ncompatible with the selected cipher's digest.\n`identity` must use UTF-8 encoding."
387
+ },
375
388
  "rejectUnauthorized": {
376
389
  "default": true,
377
390
  "description": "If true the server will reject any connection which is not\nauthorized with the list of supplied CAs. This option only has an\neffect if requestCert is true.",
@@ -460,10 +473,17 @@
460
473
  "type": "boolean"
461
474
  },
462
475
  "readableFlowing": {
463
- "default": false,
464
476
  "description": "This property reflects the current state of a `Readable` stream as described\nin the [Three states](https://nodejs.org/docs/latest-v25.x/api/stream.html#three-states) section.",
477
+ "enum": [
478
+ null,
479
+ false,
480
+ true
481
+ ],
465
482
  "since": "v9.4.0",
466
- "type": "boolean"
483
+ "type": [
484
+ "null",
485
+ "boolean"
486
+ ]
467
487
  },
468
488
  "writable": {
469
489
  "default": false,
@@ -472,6 +492,9 @@
472
492
  "type": "boolean"
473
493
  }
474
494
  },
495
+ "required": [
496
+ "readableFlowing"
497
+ ],
475
498
  "since": "v0.9.4",
476
499
  "type": "object"
477
500
  },
@@ -695,6 +718,7 @@
695
718
  }
696
719
  ]
697
720
  },
721
+ "stream": {},
698
722
  "types": {
699
723
  "$ref": "#/definitions/CustomTypesConfig"
700
724
  },
@@ -707,6 +731,9 @@
707
731
  "ConnectionOptions": {
708
732
  "additionalProperties": false,
709
733
  "properties": {
734
+ "ALPNCallback": {
735
+ "description": "If set, this will be called when a client opens a connection using the ALPN extension.\nOne argument will be passed to the callback: an object containing `servername` and `protocols` fields,\nrespectively containing the server name from the SNI extension (if any) and an array of\nALPN protocol name strings. The callback must return either one of the strings listed in `protocols`,\nwhich will be returned to the client as the selected ALPN protocol, or `undefined`,\nto reject the connection with a fatal alert. If a string is returned that does not match one of\nthe client's ALPN protocols, an error will be thrown.\nThis option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error."
736
+ },
710
737
  "ALPNProtocols": {
711
738
  "anyOf": [
712
739
  {
@@ -739,6 +766,9 @@
739
766
  ],
740
767
  "description": "An array of strings, or a single `Buffer`, `TypedArray`, or `DataView` containing the supported\nALPN protocols. Buffers should have the format `[len][name][len][name]...`\ne.g. `'\\x08http/1.1\\x08http/1.0'`, where the `len` byte is the length of the\nnext protocol name. Passing an array is usually much simpler, e.g.\n`['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher\npreference than those later."
741
768
  },
769
+ "SNICallback": {
770
+ "description": "SNICallback(servername, cb) <Function> A function that will be\ncalled if the client supports SNI TLS extension. Two arguments\nwill be passed when called: servername and cb. SNICallback should\ninvoke cb(null, ctx), where ctx is a SecureContext instance.\n(tls.createSecureContext(...) can be used to get a proper\nSecureContext.) If SNICallback wasn't provided the default callback\nwith high-level API will be used (see below)."
771
+ },
742
772
  "allowPartialTrustChain": {
743
773
  "default": false,
744
774
  "description": "Treat intermediate (non-self-signed)\ncertificates in the trust CA certificate list as trusted.",
@@ -801,6 +831,7 @@
801
831
  ],
802
832
  "description": "Cert chains in PEM format. One cert chain should be provided per\nprivate key. Each cert chain should consist of the PEM formatted\ncertificate for a provided private key, followed by the PEM\nformatted intermediate certificates (if any), in order, and not\nincluding the root CA (the root CA must be pre-known to the peer,\nsee ca). When providing multiple cert chains, they do not have to\nbe in the same order as their private keys in key. If the\nintermediate certificates are not provided, the peer will not be\nable to validate the certificate, and the handshake will fail."
803
833
  },
834
+ "checkServerIdentity": {},
804
835
  "ciphers": {
805
836
  "description": "Cipher suite specification, replacing the default. For more\ninformation, see modifying the default cipher suite. Permitted\nciphers can be obtained via tls.getCiphers(). Cipher names must be\nuppercased in order for OpenSSL to accept them.",
806
837
  "type": "string"
@@ -899,6 +930,7 @@
899
930
  ],
900
931
  "description": "Private keys in PEM format. PEM allows the option of private keys\nbeing encrypted. Encrypted keys will be decrypted with\noptions.passphrase. Multiple keys using different algorithms can be\nprovided either as an array of unencrypted key strings or buffers,\nor an array of objects in the form {pem: <string|buffer>[,\npassphrase: <string>]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted keys will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not."
901
932
  },
933
+ "lookup": {},
902
934
  "maxVersion": {
903
935
  "description": "Optionally set the maximum TLS version to allow. One\nof `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the\n`secureProtocol` option, use one or the other.\n**Default:** `'TLSv1.3'`, unless changed using CLI options. Using\n`--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to\n`'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.",
904
936
  "enum": [
@@ -973,6 +1005,10 @@
973
1005
  "description": "Identifier of a private key managed by an OpenSSL engine. Should be\nused together with privateKeyEngine. Should not be set together with\nkey, because both options define a private key in different ways.",
974
1006
  "type": "string"
975
1007
  },
1008
+ "pskCallback": {
1009
+ "description": "When negotiating TLS-PSK (pre-shared keys), this function is called\nwith optional identity `hint` provided by the server or `null`\nin case of TLS 1.3 where `hint` was removed.\nIt will be necessary to provide a custom `tls.checkServerIdentity()`\nfor the connection as the default one will try to check hostname/IP\nof the server against the certificate but that's not applicable for PSK\nbecause there won't be a certificate present.\nMore information can be found in the RFC 4279.",
1010
+ "returns": "Return `null` to stop the negotiation process. `psk` must be\ncompatible with the selected cipher's digest.\n`identity` must use UTF-8 encoding."
1011
+ },
976
1012
  "rejectUnauthorized": {
977
1013
  "default": true,
978
1014
  "description": "If true the server will reject any connection which is not\nauthorized with the list of supplied CAs. This option only has an\neffect if requestCert is true.",
@@ -1061,10 +1097,17 @@
1061
1097
  "type": "boolean"
1062
1098
  },
1063
1099
  "readableFlowing": {
1064
- "default": false,
1065
1100
  "description": "This property reflects the current state of a `Readable` stream as described\nin the [Three states](https://nodejs.org/docs/latest-v25.x/api/stream.html#three-states) section.",
1101
+ "enum": [
1102
+ null,
1103
+ false,
1104
+ true
1105
+ ],
1066
1106
  "since": "v9.4.0",
1067
- "type": "boolean"
1107
+ "type": [
1108
+ "null",
1109
+ "boolean"
1110
+ ]
1068
1111
  },
1069
1112
  "writable": {
1070
1113
  "default": false,
@@ -1073,6 +1116,9 @@
1073
1116
  "type": "boolean"
1074
1117
  }
1075
1118
  },
1119
+ "required": [
1120
+ "readableFlowing"
1121
+ ],
1076
1122
  "since": "v0.9.4",
1077
1123
  "type": "object"
1078
1124
  },
@@ -1160,7 +1206,15 @@
1160
1206
  "type": "string"
1161
1207
  },
1162
1208
  "idleTimeoutMillis": {
1163
- "type": "number"
1209
+ "anyOf": [
1210
+ {
1211
+ "const": null,
1212
+ "type": "null"
1213
+ },
1214
+ {
1215
+ "type": "number"
1216
+ }
1217
+ ]
1164
1218
  },
1165
1219
  "idle_in_transaction_session_timeout": {
1166
1220
  "type": "number"
@@ -1175,6 +1229,7 @@
1175
1229
  "lock_timeout": {
1176
1230
  "type": "number"
1177
1231
  },
1232
+ "log": {},
1178
1233
  "max": {
1179
1234
  "type": "number"
1180
1235
  },
@@ -1187,6 +1242,7 @@
1187
1242
  "min": {
1188
1243
  "type": "number"
1189
1244
  },
1245
+ "onConnect": {},
1190
1246
  "options": {
1191
1247
  "type": "string"
1192
1248
  },
@@ -1231,12 +1287,14 @@
1231
1287
  }
1232
1288
  ]
1233
1289
  },
1290
+ "stream": {},
1234
1291
  "types": {
1235
1292
  "$ref": "#/definitions/CustomTypesConfig"
1236
1293
  },
1237
1294
  "user": {
1238
1295
  "type": "string"
1239
- }
1296
+ },
1297
+ "verify": {}
1240
1298
  },
1241
1299
  "type": "object"
1242
1300
  },
@@ -1479,6 +1537,7 @@
1479
1537
  }
1480
1538
  ]
1481
1539
  },
1540
+ "stream": {},
1482
1541
  "types": {
1483
1542
  "$ref": "#/definitions/CustomTypesConfig"
1484
1543
  },
@@ -1491,6 +1550,9 @@
1491
1550
  "ConnectionOptions": {
1492
1551
  "additionalProperties": false,
1493
1552
  "properties": {
1553
+ "ALPNCallback": {
1554
+ "description": "If set, this will be called when a client opens a connection using the ALPN extension.\nOne argument will be passed to the callback: an object containing `servername` and `protocols` fields,\nrespectively containing the server name from the SNI extension (if any) and an array of\nALPN protocol name strings. The callback must return either one of the strings listed in `protocols`,\nwhich will be returned to the client as the selected ALPN protocol, or `undefined`,\nto reject the connection with a fatal alert. If a string is returned that does not match one of\nthe client's ALPN protocols, an error will be thrown.\nThis option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error."
1555
+ },
1494
1556
  "ALPNProtocols": {
1495
1557
  "anyOf": [
1496
1558
  {
@@ -1523,6 +1585,9 @@
1523
1585
  ],
1524
1586
  "description": "An array of strings, or a single `Buffer`, `TypedArray`, or `DataView` containing the supported\nALPN protocols. Buffers should have the format `[len][name][len][name]...`\ne.g. `'\\x08http/1.1\\x08http/1.0'`, where the `len` byte is the length of the\nnext protocol name. Passing an array is usually much simpler, e.g.\n`['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher\npreference than those later."
1525
1587
  },
1588
+ "SNICallback": {
1589
+ "description": "SNICallback(servername, cb) <Function> A function that will be\ncalled if the client supports SNI TLS extension. Two arguments\nwill be passed when called: servername and cb. SNICallback should\ninvoke cb(null, ctx), where ctx is a SecureContext instance.\n(tls.createSecureContext(...) can be used to get a proper\nSecureContext.) If SNICallback wasn't provided the default callback\nwith high-level API will be used (see below)."
1590
+ },
1526
1591
  "allowPartialTrustChain": {
1527
1592
  "default": false,
1528
1593
  "description": "Treat intermediate (non-self-signed)\ncertificates in the trust CA certificate list as trusted.",
@@ -1585,6 +1650,7 @@
1585
1650
  ],
1586
1651
  "description": "Cert chains in PEM format. One cert chain should be provided per\nprivate key. Each cert chain should consist of the PEM formatted\ncertificate for a provided private key, followed by the PEM\nformatted intermediate certificates (if any), in order, and not\nincluding the root CA (the root CA must be pre-known to the peer,\nsee ca). When providing multiple cert chains, they do not have to\nbe in the same order as their private keys in key. If the\nintermediate certificates are not provided, the peer will not be\nable to validate the certificate, and the handshake will fail."
1587
1652
  },
1653
+ "checkServerIdentity": {},
1588
1654
  "ciphers": {
1589
1655
  "description": "Cipher suite specification, replacing the default. For more\ninformation, see modifying the default cipher suite. Permitted\nciphers can be obtained via tls.getCiphers(). Cipher names must be\nuppercased in order for OpenSSL to accept them.",
1590
1656
  "type": "string"
@@ -1683,6 +1749,7 @@
1683
1749
  ],
1684
1750
  "description": "Private keys in PEM format. PEM allows the option of private keys\nbeing encrypted. Encrypted keys will be decrypted with\noptions.passphrase. Multiple keys using different algorithms can be\nprovided either as an array of unencrypted key strings or buffers,\nor an array of objects in the form {pem: <string|buffer>[,\npassphrase: <string>]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted keys will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not."
1685
1751
  },
1752
+ "lookup": {},
1686
1753
  "maxVersion": {
1687
1754
  "description": "Optionally set the maximum TLS version to allow. One\nof `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the\n`secureProtocol` option, use one or the other.\n**Default:** `'TLSv1.3'`, unless changed using CLI options. Using\n`--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to\n`'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.",
1688
1755
  "enum": [
@@ -1757,6 +1824,10 @@
1757
1824
  "description": "Identifier of a private key managed by an OpenSSL engine. Should be\nused together with privateKeyEngine. Should not be set together with\nkey, because both options define a private key in different ways.",
1758
1825
  "type": "string"
1759
1826
  },
1827
+ "pskCallback": {
1828
+ "description": "When negotiating TLS-PSK (pre-shared keys), this function is called\nwith optional identity `hint` provided by the server or `null`\nin case of TLS 1.3 where `hint` was removed.\nIt will be necessary to provide a custom `tls.checkServerIdentity()`\nfor the connection as the default one will try to check hostname/IP\nof the server against the certificate but that's not applicable for PSK\nbecause there won't be a certificate present.\nMore information can be found in the RFC 4279.",
1829
+ "returns": "Return `null` to stop the negotiation process. `psk` must be\ncompatible with the selected cipher's digest.\n`identity` must use UTF-8 encoding."
1830
+ },
1760
1831
  "rejectUnauthorized": {
1761
1832
  "default": true,
1762
1833
  "description": "If true the server will reject any connection which is not\nauthorized with the list of supplied CAs. This option only has an\neffect if requestCert is true.",
@@ -1845,10 +1916,17 @@
1845
1916
  "type": "boolean"
1846
1917
  },
1847
1918
  "readableFlowing": {
1848
- "default": false,
1849
1919
  "description": "This property reflects the current state of a `Readable` stream as described\nin the [Three states](https://nodejs.org/docs/latest-v25.x/api/stream.html#three-states) section.",
1920
+ "enum": [
1921
+ null,
1922
+ false,
1923
+ true
1924
+ ],
1850
1925
  "since": "v9.4.0",
1851
- "type": "boolean"
1926
+ "type": [
1927
+ "null",
1928
+ "boolean"
1929
+ ]
1852
1930
  },
1853
1931
  "writable": {
1854
1932
  "default": false,
@@ -1857,6 +1935,9 @@
1857
1935
  "type": "boolean"
1858
1936
  }
1859
1937
  },
1938
+ "required": [
1939
+ "readableFlowing"
1940
+ ],
1860
1941
  "since": "v0.9.4",
1861
1942
  "type": "object"
1862
1943
  },
@@ -1944,7 +2025,15 @@
1944
2025
  "type": "string"
1945
2026
  },
1946
2027
  "idleTimeoutMillis": {
1947
- "type": "number"
2028
+ "anyOf": [
2029
+ {
2030
+ "const": null,
2031
+ "type": "null"
2032
+ },
2033
+ {
2034
+ "type": "number"
2035
+ }
2036
+ ]
1948
2037
  },
1949
2038
  "idle_in_transaction_session_timeout": {
1950
2039
  "type": "number"
@@ -1959,6 +2048,7 @@
1959
2048
  "lock_timeout": {
1960
2049
  "type": "number"
1961
2050
  },
2051
+ "log": {},
1962
2052
  "max": {
1963
2053
  "type": "number"
1964
2054
  },
@@ -1971,6 +2061,7 @@
1971
2061
  "min": {
1972
2062
  "type": "number"
1973
2063
  },
2064
+ "onConnect": {},
1974
2065
  "options": {
1975
2066
  "type": "string"
1976
2067
  },
@@ -2015,12 +2106,14 @@
2015
2106
  }
2016
2107
  ]
2017
2108
  },
2109
+ "stream": {},
2018
2110
  "types": {
2019
2111
  "$ref": "#/definitions/CustomTypesConfig"
2020
2112
  },
2021
2113
  "user": {
2022
2114
  "type": "string"
2023
- }
2115
+ },
2116
+ "verify": {}
2024
2117
  },
2025
2118
  "type": "object"
2026
2119
  },
@@ -2081,22 +2174,31 @@
2081
2174
  "additionalProperties": false,
2082
2175
  "type": "object"
2083
2176
  },
2084
- "modelAliases": {
2085
- "additionalProperties": {
2086
- "type": "string"
2087
- },
2088
- "description": "Model Aliases to allow easier rename of Model",
2089
- "type": "object"
2090
- },
2091
2177
  "new () => ClientBase": {
2092
2178
  "additionalProperties": false,
2093
2179
  "type": "object"
2094
2180
  },
2095
- "tables": {
2181
+ "tables#2": {
2096
2182
  "additionalProperties": {
2097
2183
  "type": "string"
2098
2184
  },
2099
- "description": "Per-model table name overrides.\nMaps a model identifier (e.g. \"Webda/User\") to a custom table name.\nWhen not specified, defaults are: primary model → `table`, others → identifier lowercased with \"/\" → \"_\".",
2185
+ "description": "Per-model table name overrides.\nMaps a model identifier (e.g. \"Webda/User\") to a custom table name.\nWhen not specified, every model of the store uses `table` (as Webda 3 did), or without `table` its identifier\nlowercased with \"/\" → \"_\".",
2186
+ "type": "object"
2187
+ },
2188
+ "typeCheck#2": {
2189
+ "additionalProperties": false,
2190
+ "description": "Startup check of the stored types: one WARN listing the legacy, untyped and unknown types found",
2191
+ "properties": {
2192
+ "enabled": {
2193
+ "default": true,
2194
+ "type": "boolean"
2195
+ },
2196
+ "maxRows": {
2197
+ "default": 10000,
2198
+ "description": "Rows scanned at most by stores without a native count; beyond, the counts are \"at least\"",
2199
+ "type": "number"
2200
+ }
2201
+ },
2100
2202
  "type": "object"
2101
2203
  }
2102
2204
  },
@@ -2119,26 +2221,12 @@
2119
2221
  "database": {
2120
2222
  "$ref": "#/definitions/SQLDatabase"
2121
2223
  },
2122
- "defaultModel": {
2123
- "default": true,
2124
- "description": "When __type model not found, use the model\nIf strict is setup this parameter is not used",
2125
- "type": "boolean"
2126
- },
2127
- "forceModel": {
2128
- "default": false,
2129
- "description": "If set, Store will ignore the __type",
2130
- "type": "boolean"
2131
- },
2132
2224
  "maxGroups": {
2133
2225
  "default": 10000,
2134
2226
  "description": "Maximum number of groups an aggregation may produce without LIMIT (or in memory)",
2135
2227
  "minimum": 1,
2136
2228
  "type": "number"
2137
2229
  },
2138
- "modelAliases": {
2139
- "$ref": "#/definitions/modelAliases",
2140
- "description": "Model Aliases to allow easier rename of Model"
2141
- },
2142
2230
  "models": {
2143
2231
  "default": [
2144
2232
  "Webda/RegistryEntry"
@@ -2183,13 +2271,17 @@
2183
2271
  "type": "string"
2184
2272
  },
2185
2273
  "tables": {
2186
- "$ref": "#/definitions/tables",
2187
- "description": "Per-model table name overrides.\nMaps a model identifier (e.g. \"Webda/User\") to a custom table name.\nWhen not specified, defaults are: primary model → `table`, others → identifier lowercased with \"/\" → \"_\"."
2274
+ "$ref": "#/definitions/tables%232",
2275
+ "description": "Per-model table name overrides.\nMaps a model identifier (e.g. \"Webda/User\") to a custom table name.\nWhen not specified, every model of the store uses `table` (as Webda 3 did), or without `table` its identifier\nlowercased with \"/\" → \"_\"."
2188
2276
  },
2189
2277
  "type": {
2190
2278
  "description": "Type of the service",
2191
2279
  "type": "string"
2192
2280
  },
2281
+ "typeCheck": {
2282
+ "$ref": "#/definitions/typeCheck%232",
2283
+ "description": "Startup check of the stored types: one WARN listing the legacy, untyped and unknown types found"
2284
+ },
2193
2285
  "usePool": {
2194
2286
  "default": false,
2195
2287
  "type": "boolean"
@@ -2228,7 +2320,34 @@
2228
2320
  "type": "object",
2229
2321
  "title": "PostgresStore"
2230
2322
  },
2231
- "Configuration": "lib/postgresstore.service:PostgresParameters"
2323
+ "Configuration": "lib/postgresstore.service:PostgresParameters",
2324
+ "capabilities": [
2325
+ "store"
2326
+ ],
2327
+ "commands": {
2328
+ "migrate": {
2329
+ "description": "Rewrite the Webda 3 types of the stores to their Webda 4 identifiers",
2330
+ "method": "migrate",
2331
+ "args": {
2332
+ "dryRun": {
2333
+ "type": "boolean",
2334
+ "default": false,
2335
+ "description": "Only count the rows to migrate, write nothing"
2336
+ },
2337
+ "batch": {
2338
+ "type": "number",
2339
+ "default": 500,
2340
+ "description": "Rows per page"
2341
+ },
2342
+ "allowUnknown": {
2343
+ "type": "boolean",
2344
+ "default": false,
2345
+ "description": "Exit with 0 even when rows keep an unknown or ambiguous type"
2346
+ }
2347
+ },
2348
+ "phase": "initialized"
2349
+ }
2350
+ }
2232
2351
  }
2233
2352
  },
2234
2353
  "models": {},