prostgles-server 4.2.183 → 4.2.185

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.
Files changed (432) hide show
  1. package/.github/workflows/main.yml +15 -15
  2. package/.prettierignore +2 -0
  3. package/README.md +1 -1
  4. package/dist/Auth/AuthHandler.d.ts +1 -1
  5. package/dist/Auth/AuthHandler.d.ts.map +1 -1
  6. package/dist/Auth/AuthHandler.js +64 -32
  7. package/dist/Auth/AuthHandler.js.map +1 -1
  8. package/dist/Auth/AuthTypes.d.ts +15 -1
  9. package/dist/Auth/AuthTypes.d.ts.map +1 -1
  10. package/dist/Auth/getSafeReturnURL.d.ts.map +1 -1
  11. package/dist/Auth/getSafeReturnURL.js.map +1 -1
  12. package/dist/Auth/sendEmail.d.ts.map +1 -1
  13. package/dist/Auth/sendEmail.js +6 -6
  14. package/dist/Auth/sendEmail.js.map +1 -1
  15. package/dist/Auth/setAuthProviders.d.ts +1 -1
  16. package/dist/Auth/setAuthProviders.d.ts.map +1 -1
  17. package/dist/Auth/setAuthProviders.js +15 -8
  18. package/dist/Auth/setAuthProviders.js.map +1 -1
  19. package/dist/Auth/setEmailProvider.d.ts.map +1 -1
  20. package/dist/Auth/setEmailProvider.js +23 -4
  21. package/dist/Auth/setEmailProvider.js.map +1 -1
  22. package/dist/Auth/setupAuthRoutes.d.ts.map +1 -1
  23. package/dist/Auth/setupAuthRoutes.js +27 -9
  24. package/dist/Auth/setupAuthRoutes.js.map +1 -1
  25. package/dist/DBEventsManager.d.ts.map +1 -1
  26. package/dist/DBEventsManager.js +24 -19
  27. package/dist/DBEventsManager.js.map +1 -1
  28. package/dist/DBSchemaBuilder.d.ts.map +1 -1
  29. package/dist/DBSchemaBuilder.js +18 -5
  30. package/dist/DBSchemaBuilder.js.map +1 -1
  31. package/dist/DboBuilder/DboBuilder.d.ts.map +1 -1
  32. package/dist/DboBuilder/DboBuilder.js +7 -2
  33. package/dist/DboBuilder/DboBuilder.js.map +1 -1
  34. package/dist/DboBuilder/DboBuilderTypes.d.ts +4 -4
  35. package/dist/DboBuilder/DboBuilderTypes.d.ts.map +1 -1
  36. package/dist/DboBuilder/DboBuilderTypes.js.map +1 -1
  37. package/dist/DboBuilder/QueryBuilder/Functions.d.ts +2 -2
  38. package/dist/DboBuilder/QueryBuilder/Functions.d.ts.map +1 -1
  39. package/dist/DboBuilder/QueryBuilder/Functions.js +293 -173
  40. package/dist/DboBuilder/QueryBuilder/Functions.js.map +1 -1
  41. package/dist/DboBuilder/QueryBuilder/QueryBuilder.d.ts +2 -2
  42. package/dist/DboBuilder/QueryBuilder/QueryBuilder.d.ts.map +1 -1
  43. package/dist/DboBuilder/QueryBuilder/QueryBuilder.js +52 -29
  44. package/dist/DboBuilder/QueryBuilder/QueryBuilder.js.map +1 -1
  45. package/dist/DboBuilder/QueryBuilder/getJoinQuery.d.ts.map +1 -1
  46. package/dist/DboBuilder/QueryBuilder/getJoinQuery.js +51 -32
  47. package/dist/DboBuilder/QueryBuilder/getJoinQuery.js.map +1 -1
  48. package/dist/DboBuilder/QueryBuilder/getNewQuery.d.ts.map +1 -1
  49. package/dist/DboBuilder/QueryBuilder/getNewQuery.js +48 -25
  50. package/dist/DboBuilder/QueryBuilder/getNewQuery.js.map +1 -1
  51. package/dist/DboBuilder/QueryBuilder/getSelectQuery.d.ts +1 -1
  52. package/dist/DboBuilder/QueryBuilder/getSelectQuery.d.ts.map +1 -1
  53. package/dist/DboBuilder/QueryBuilder/getSelectQuery.js +32 -23
  54. package/dist/DboBuilder/QueryBuilder/getSelectQuery.js.map +1 -1
  55. package/dist/DboBuilder/QueryStreamer.d.ts +2 -2
  56. package/dist/DboBuilder/QueryStreamer.d.ts.map +1 -1
  57. package/dist/DboBuilder/QueryStreamer.js +68 -23
  58. package/dist/DboBuilder/QueryStreamer.js.map +1 -1
  59. package/dist/DboBuilder/TableHandler/DataValidator.d.ts +1 -1
  60. package/dist/DboBuilder/TableHandler/DataValidator.d.ts.map +1 -1
  61. package/dist/DboBuilder/TableHandler/DataValidator.js +79 -43
  62. package/dist/DboBuilder/TableHandler/DataValidator.js.map +1 -1
  63. package/dist/DboBuilder/TableHandler/TableHandler.d.ts.map +1 -1
  64. package/dist/DboBuilder/TableHandler/TableHandler.js +39 -15
  65. package/dist/DboBuilder/TableHandler/TableHandler.js.map +1 -1
  66. package/dist/DboBuilder/TableHandler/delete.d.ts.map +1 -1
  67. package/dist/DboBuilder/TableHandler/delete.js +44 -13
  68. package/dist/DboBuilder/TableHandler/delete.js.map +1 -1
  69. package/dist/DboBuilder/TableHandler/insert.d.ts.map +1 -1
  70. package/dist/DboBuilder/TableHandler/insert.js +81 -22
  71. package/dist/DboBuilder/TableHandler/insert.js.map +1 -1
  72. package/dist/DboBuilder/TableHandler/insertTest.d.ts.map +1 -1
  73. package/dist/DboBuilder/TableHandler/insertTest.js.map +1 -1
  74. package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.d.ts +1 -1
  75. package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.d.ts.map +1 -1
  76. package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.js +7 -4
  77. package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.js.map +1 -1
  78. package/dist/DboBuilder/TableHandler/runInsertUpdateQuery.d.ts.map +1 -1
  79. package/dist/DboBuilder/TableHandler/runInsertUpdateQuery.js +24 -5
  80. package/dist/DboBuilder/TableHandler/runInsertUpdateQuery.js.map +1 -1
  81. package/dist/DboBuilder/TableHandler/update.d.ts.map +1 -1
  82. package/dist/DboBuilder/TableHandler/update.js +16 -4
  83. package/dist/DboBuilder/TableHandler/update.js.map +1 -1
  84. package/dist/DboBuilder/TableHandler/updateBatch.d.ts.map +1 -1
  85. package/dist/DboBuilder/TableHandler/updateBatch.js +33 -10
  86. package/dist/DboBuilder/TableHandler/updateBatch.js.map +1 -1
  87. package/dist/DboBuilder/TableHandler/updateFile.d.ts.map +1 -1
  88. package/dist/DboBuilder/TableHandler/updateFile.js +24 -6
  89. package/dist/DboBuilder/TableHandler/updateFile.js.map +1 -1
  90. package/dist/DboBuilder/TableHandler/upsert.d.ts.map +1 -1
  91. package/dist/DboBuilder/TableHandler/upsert.js +22 -6
  92. package/dist/DboBuilder/TableHandler/upsert.js.map +1 -1
  93. package/dist/DboBuilder/ViewHandler/ViewHandler.d.ts +5 -5
  94. package/dist/DboBuilder/ViewHandler/ViewHandler.d.ts.map +1 -1
  95. package/dist/DboBuilder/ViewHandler/ViewHandler.js +64 -36
  96. package/dist/DboBuilder/ViewHandler/ViewHandler.js.map +1 -1
  97. package/dist/DboBuilder/ViewHandler/count.d.ts.map +1 -1
  98. package/dist/DboBuilder/ViewHandler/count.js +21 -7
  99. package/dist/DboBuilder/ViewHandler/count.js.map +1 -1
  100. package/dist/DboBuilder/ViewHandler/find.d.ts.map +1 -1
  101. package/dist/DboBuilder/ViewHandler/find.js +76 -22
  102. package/dist/DboBuilder/ViewHandler/find.js.map +1 -1
  103. package/dist/DboBuilder/ViewHandler/getExistsCondition.d.ts.map +1 -1
  104. package/dist/DboBuilder/ViewHandler/getExistsCondition.js +19 -10
  105. package/dist/DboBuilder/ViewHandler/getExistsCondition.js.map +1 -1
  106. package/dist/DboBuilder/ViewHandler/getExistsFilters.d.ts.map +1 -1
  107. package/dist/DboBuilder/ViewHandler/getExistsFilters.js +12 -5
  108. package/dist/DboBuilder/ViewHandler/getExistsFilters.js.map +1 -1
  109. package/dist/DboBuilder/ViewHandler/getInfo.d.ts.map +1 -1
  110. package/dist/DboBuilder/ViewHandler/getInfo.js +27 -9
  111. package/dist/DboBuilder/ViewHandler/getInfo.js.map +1 -1
  112. package/dist/DboBuilder/ViewHandler/getTableJoinQuery.d.ts +2 -2
  113. package/dist/DboBuilder/ViewHandler/getTableJoinQuery.d.ts.map +1 -1
  114. package/dist/DboBuilder/ViewHandler/getTableJoinQuery.js +42 -23
  115. package/dist/DboBuilder/ViewHandler/getTableJoinQuery.js.map +1 -1
  116. package/dist/DboBuilder/ViewHandler/parseComplexFilter.d.ts.map +1 -1
  117. package/dist/DboBuilder/ViewHandler/parseComplexFilter.js +22 -9
  118. package/dist/DboBuilder/ViewHandler/parseComplexFilter.js.map +1 -1
  119. package/dist/DboBuilder/ViewHandler/parseFieldFilter.d.ts +4 -4
  120. package/dist/DboBuilder/ViewHandler/parseFieldFilter.d.ts.map +1 -1
  121. package/dist/DboBuilder/ViewHandler/parseFieldFilter.js +13 -11
  122. package/dist/DboBuilder/ViewHandler/parseFieldFilter.js.map +1 -1
  123. package/dist/DboBuilder/ViewHandler/parseJoinPath.d.ts +1 -1
  124. package/dist/DboBuilder/ViewHandler/parseJoinPath.d.ts.map +1 -1
  125. package/dist/DboBuilder/ViewHandler/parseJoinPath.js +44 -29
  126. package/dist/DboBuilder/ViewHandler/parseJoinPath.js.map +1 -1
  127. package/dist/DboBuilder/ViewHandler/prepareSortItems.d.ts.map +1 -1
  128. package/dist/DboBuilder/ViewHandler/prepareSortItems.js +36 -27
  129. package/dist/DboBuilder/ViewHandler/prepareSortItems.js.map +1 -1
  130. package/dist/DboBuilder/ViewHandler/prepareWhere.d.ts.map +1 -1
  131. package/dist/DboBuilder/ViewHandler/prepareWhere.js +16 -12
  132. package/dist/DboBuilder/ViewHandler/prepareWhere.js.map +1 -1
  133. package/dist/DboBuilder/ViewHandler/size.d.ts.map +1 -1
  134. package/dist/DboBuilder/ViewHandler/size.js +24 -7
  135. package/dist/DboBuilder/ViewHandler/size.js.map +1 -1
  136. package/dist/DboBuilder/ViewHandler/subscribe.d.ts.map +1 -1
  137. package/dist/DboBuilder/ViewHandler/subscribe.js +40 -12
  138. package/dist/DboBuilder/ViewHandler/subscribe.js.map +1 -1
  139. package/dist/DboBuilder/ViewHandler/validateViewRules.d.ts.map +1 -1
  140. package/dist/DboBuilder/ViewHandler/validateViewRules.js +20 -5
  141. package/dist/DboBuilder/ViewHandler/validateViewRules.js.map +1 -1
  142. package/dist/DboBuilder/dboBuilderUtils.d.ts.map +1 -1
  143. package/dist/DboBuilder/dboBuilderUtils.js +18 -7
  144. package/dist/DboBuilder/dboBuilderUtils.js.map +1 -1
  145. package/dist/DboBuilder/getColumns.d.ts.map +1 -1
  146. package/dist/DboBuilder/getColumns.js +22 -7
  147. package/dist/DboBuilder/getColumns.js.map +1 -1
  148. package/dist/DboBuilder/getCondition.d.ts.map +1 -1
  149. package/dist/DboBuilder/getCondition.js +43 -30
  150. package/dist/DboBuilder/getCondition.js.map +1 -1
  151. package/dist/DboBuilder/getSubscribeRelatedTables.d.ts.map +1 -1
  152. package/dist/DboBuilder/getSubscribeRelatedTables.js +38 -27
  153. package/dist/DboBuilder/getSubscribeRelatedTables.js.map +1 -1
  154. package/dist/DboBuilder/getTablesForSchemaPostgresSQL.d.ts.map +1 -1
  155. package/dist/DboBuilder/getTablesForSchemaPostgresSQL.js +9 -9
  156. package/dist/DboBuilder/getTablesForSchemaPostgresSQL.js.map +1 -1
  157. package/dist/DboBuilder/insertNestedRecords.d.ts +3 -3
  158. package/dist/DboBuilder/insertNestedRecords.d.ts.map +1 -1
  159. package/dist/DboBuilder/insertNestedRecords.js +79 -44
  160. package/dist/DboBuilder/insertNestedRecords.js.map +1 -1
  161. package/dist/DboBuilder/parseUpdateRules.d.ts.map +1 -1
  162. package/dist/DboBuilder/parseUpdateRules.js +38 -14
  163. package/dist/DboBuilder/parseUpdateRules.js.map +1 -1
  164. package/dist/DboBuilder/prepareShortestJoinPaths.d.ts.map +1 -1
  165. package/dist/DboBuilder/prepareShortestJoinPaths.js +56 -31
  166. package/dist/DboBuilder/prepareShortestJoinPaths.js.map +1 -1
  167. package/dist/DboBuilder/runSQL.d.ts.map +1 -1
  168. package/dist/DboBuilder/runSQL.js +41 -21
  169. package/dist/DboBuilder/runSQL.js.map +1 -1
  170. package/dist/DboBuilder/runTransaction.d.ts +1 -1
  171. package/dist/DboBuilder/runTransaction.d.ts.map +1 -1
  172. package/dist/DboBuilder/runTransaction.js +2 -2
  173. package/dist/DboBuilder/runTransaction.js.map +1 -1
  174. package/dist/DboBuilder/sqlErrCodeToMsg.d.ts.map +1 -1
  175. package/dist/DboBuilder/sqlErrCodeToMsg.js +297 -38
  176. package/dist/DboBuilder/sqlErrCodeToMsg.js.map +1 -1
  177. package/dist/DboBuilder/uploadFile.d.ts.map +1 -1
  178. package/dist/DboBuilder/uploadFile.js +33 -9
  179. package/dist/DboBuilder/uploadFile.js.map +1 -1
  180. package/dist/Event_Trigger_Tags.d.ts +1 -1
  181. package/dist/Event_Trigger_Tags.d.ts.map +1 -1
  182. package/dist/Event_Trigger_Tags.js +1 -1
  183. package/dist/Event_Trigger_Tags.js.map +1 -1
  184. package/dist/FileManager/FileManager.d.ts.map +1 -1
  185. package/dist/FileManager/FileManager.js +6 -3
  186. package/dist/FileManager/FileManager.js.map +1 -1
  187. package/dist/FileManager/getValidatedFileType.d.ts.map +1 -1
  188. package/dist/FileManager/getValidatedFileType.js +18 -16
  189. package/dist/FileManager/getValidatedFileType.js.map +1 -1
  190. package/dist/FileManager/initFileManager.d.ts.map +1 -1
  191. package/dist/FileManager/initFileManager.js +7 -1
  192. package/dist/FileManager/initFileManager.js.map +1 -1
  193. package/dist/FileManager/upload.d.ts +1 -1
  194. package/dist/FileManager/upload.d.ts.map +1 -1
  195. package/dist/FileManager/upload.js +3 -3
  196. package/dist/FileManager/upload.js.map +1 -1
  197. package/dist/FileManager/uploadStream.d.ts +1 -1
  198. package/dist/FileManager/uploadStream.d.ts.map +1 -1
  199. package/dist/FileManager/uploadStream.js +6 -7
  200. package/dist/FileManager/uploadStream.js.map +1 -1
  201. package/dist/Filtering.d.ts +3 -3
  202. package/dist/Filtering.d.ts.map +1 -1
  203. package/dist/Filtering.js +70 -37
  204. package/dist/Filtering.js.map +1 -1
  205. package/dist/JSONBValidation/validate_jsonb_schema_sql.d.ts.map +1 -1
  206. package/dist/JSONBValidation/validate_jsonb_schema_sql.js +1 -4
  207. package/dist/JSONBValidation/validate_jsonb_schema_sql.js.map +1 -1
  208. package/dist/JSONBValidation/validation.d.ts.map +1 -1
  209. package/dist/JSONBValidation/validation.js +46 -24
  210. package/dist/JSONBValidation/validation.js.map +1 -1
  211. package/dist/Logging.d.ts +2 -2
  212. package/dist/Logging.d.ts.map +1 -1
  213. package/dist/PostgresNotifListenManager.d.ts.map +1 -1
  214. package/dist/PostgresNotifListenManager.js +20 -22
  215. package/dist/PostgresNotifListenManager.js.map +1 -1
  216. package/dist/Prostgles.d.ts +1 -1
  217. package/dist/Prostgles.d.ts.map +1 -1
  218. package/dist/Prostgles.js +37 -11
  219. package/dist/Prostgles.js.map +1 -1
  220. package/dist/ProstglesTypes.d.ts.map +1 -1
  221. package/dist/ProstglesTypes.js +6 -1
  222. package/dist/ProstglesTypes.js.map +1 -1
  223. package/dist/PubSubManager/PubSubManager.d.ts.map +1 -1
  224. package/dist/PubSubManager/PubSubManager.js +10 -5
  225. package/dist/PubSubManager/PubSubManager.js.map +1 -1
  226. package/dist/PubSubManager/addSub.d.ts.map +1 -1
  227. package/dist/PubSubManager/addSub.js +4 -6
  228. package/dist/PubSubManager/addSub.js.map +1 -1
  229. package/dist/PubSubManager/addSync.d.ts.map +1 -1
  230. package/dist/PubSubManager/addSync.js +10 -6
  231. package/dist/PubSubManager/addSync.js.map +1 -1
  232. package/dist/PubSubManager/getCreatePubSubManagerError.d.ts.map +1 -1
  233. package/dist/PubSubManager/getCreatePubSubManagerError.js +3 -1
  234. package/dist/PubSubManager/getCreatePubSubManagerError.js.map +1 -1
  235. package/dist/PubSubManager/getPubSubManagerInitQuery.d.ts.map +1 -1
  236. package/dist/PubSubManager/getPubSubManagerInitQuery.js +8 -8
  237. package/dist/PubSubManager/getPubSubManagerInitQuery.js.map +1 -1
  238. package/dist/PubSubManager/initPubSubManager.d.ts.map +1 -1
  239. package/dist/PubSubManager/initPubSubManager.js +7 -9
  240. package/dist/PubSubManager/initPubSubManager.js.map +1 -1
  241. package/dist/PubSubManager/notifListener.d.ts.map +1 -1
  242. package/dist/PubSubManager/notifListener.js +23 -12
  243. package/dist/PubSubManager/notifListener.js.map +1 -1
  244. package/dist/PubSubManager/orphanTriggerCheck.d.ts.map +1 -1
  245. package/dist/PubSubManager/orphanTriggerCheck.js.map +1 -1
  246. package/dist/PubSubManager/pushSubData.d.ts.map +1 -1
  247. package/dist/PubSubManager/pushSubData.js +1 -1
  248. package/dist/PubSubManager/pushSubData.js.map +1 -1
  249. package/dist/PublishParser/PublishParser.d.ts +1 -1
  250. package/dist/PublishParser/PublishParser.d.ts.map +1 -1
  251. package/dist/PublishParser/PublishParser.js +25 -14
  252. package/dist/PublishParser/PublishParser.js.map +1 -1
  253. package/dist/PublishParser/getFileTableRules.d.ts.map +1 -1
  254. package/dist/PublishParser/getFileTableRules.js +23 -16
  255. package/dist/PublishParser/getFileTableRules.js.map +1 -1
  256. package/dist/PublishParser/getSchemaFromPublish.d.ts.map +1 -1
  257. package/dist/PublishParser/getSchemaFromPublish.js +39 -16
  258. package/dist/PublishParser/getSchemaFromPublish.js.map +1 -1
  259. package/dist/PublishParser/getTableRulesWithoutFileTable.d.ts.map +1 -1
  260. package/dist/PublishParser/getTableRulesWithoutFileTable.js +42 -22
  261. package/dist/PublishParser/getTableRulesWithoutFileTable.js.map +1 -1
  262. package/dist/PublishParser/publishTypesAndUtils.d.ts.map +1 -1
  263. package/dist/PublishParser/publishTypesAndUtils.js +5 -1
  264. package/dist/PublishParser/publishTypesAndUtils.js.map +1 -1
  265. package/dist/RestApi.d.ts +1 -1
  266. package/dist/RestApi.d.ts.map +1 -1
  267. package/dist/RestApi.js +1 -1
  268. package/dist/RestApi.js.map +1 -1
  269. package/dist/SchemaWatch/SchemaWatch.d.ts +2 -2
  270. package/dist/SchemaWatch/SchemaWatch.d.ts.map +1 -1
  271. package/dist/SchemaWatch/SchemaWatch.js +11 -9
  272. package/dist/SchemaWatch/SchemaWatch.js.map +1 -1
  273. package/dist/SchemaWatch/getValidatedWatchSchemaType.d.ts.map +1 -1
  274. package/dist/SchemaWatch/getValidatedWatchSchemaType.js +3 -3
  275. package/dist/SchemaWatch/getValidatedWatchSchemaType.js.map +1 -1
  276. package/dist/SchemaWatch/getWatchSchemaTagList.d.ts.map +1 -1
  277. package/dist/SchemaWatch/getWatchSchemaTagList.js +12 -6
  278. package/dist/SchemaWatch/getWatchSchemaTagList.js.map +1 -1
  279. package/dist/SyncReplication.d.ts.map +1 -1
  280. package/dist/SyncReplication.js +84 -42
  281. package/dist/SyncReplication.js.map +1 -1
  282. package/dist/TableConfig/TableConfig.d.ts +5 -5
  283. package/dist/TableConfig/TableConfig.d.ts.map +1 -1
  284. package/dist/TableConfig/TableConfig.js +18 -5
  285. package/dist/TableConfig/TableConfig.js.map +1 -1
  286. package/dist/TableConfig/getColumnDefinitionQuery.d.ts +2 -2
  287. package/dist/TableConfig/getColumnDefinitionQuery.d.ts.map +1 -1
  288. package/dist/TableConfig/getColumnDefinitionQuery.js +20 -9
  289. package/dist/TableConfig/getColumnDefinitionQuery.js.map +1 -1
  290. package/dist/TableConfig/getConstraintDefinitionQueries.d.ts +3 -3
  291. package/dist/TableConfig/getConstraintDefinitionQueries.d.ts.map +1 -1
  292. package/dist/TableConfig/getConstraintDefinitionQueries.js +12 -7
  293. package/dist/TableConfig/getConstraintDefinitionQueries.js.map +1 -1
  294. package/dist/TableConfig/getFutureTableSchema.d.ts +1 -1
  295. package/dist/TableConfig/getFutureTableSchema.d.ts.map +1 -1
  296. package/dist/TableConfig/getFutureTableSchema.js +6 -4
  297. package/dist/TableConfig/getFutureTableSchema.js.map +1 -1
  298. package/dist/TableConfig/getPGIndexes.d.ts.map +1 -1
  299. package/dist/TableConfig/getPGIndexes.js.map +1 -1
  300. package/dist/TableConfig/getTableColumnQueries.d.ts +1 -1
  301. package/dist/TableConfig/getTableColumnQueries.d.ts.map +1 -1
  302. package/dist/TableConfig/getTableColumnQueries.js +38 -19
  303. package/dist/TableConfig/getTableColumnQueries.js.map +1 -1
  304. package/dist/TableConfig/initTableConfig.d.ts.map +1 -1
  305. package/dist/TableConfig/initTableConfig.js +91 -43
  306. package/dist/TableConfig/initTableConfig.js.map +1 -1
  307. package/dist/index.d.ts.map +1 -1
  308. package/dist/index.js.map +1 -1
  309. package/dist/initProstgles.d.ts.map +1 -1
  310. package/dist/initProstgles.js +14 -10
  311. package/dist/initProstgles.js.map +1 -1
  312. package/dist/onSocketConnected.d.ts.map +1 -1
  313. package/dist/onSocketConnected.js +38 -16
  314. package/dist/onSocketConnected.js.map +1 -1
  315. package/dist/runClientRequest.d.ts.map +1 -1
  316. package/dist/runClientRequest.js +33 -14
  317. package/dist/runClientRequest.js.map +1 -1
  318. package/dist/shortestPath.d.ts.map +1 -1
  319. package/dist/shortestPath.js +1 -1
  320. package/dist/shortestPath.js.map +1 -1
  321. package/dist/typeTests/dboTypeCheck.js.map +1 -1
  322. package/examples/full-example-typescript/DBoGenerated.d.ts +112 -54
  323. package/examples/full-example-typescript/DBoGenerated.js +3 -3
  324. package/examples/full-example-typescript/home.html +28 -26
  325. package/examples/full-example-typescript/index.d.ts +1 -1
  326. package/examples/full-example-typescript/index.js +80 -53
  327. package/examples/full-example-vanilla/home.html +151 -125
  328. package/examples/server/javascript/index.js +17 -19
  329. package/lib/Auth/AuthHandler.ts +234 -155
  330. package/lib/Auth/AuthTypes.ts +27 -4
  331. package/lib/Auth/getSafeReturnURL.ts +35 -21
  332. package/lib/Auth/sendEmail.ts +34 -31
  333. package/lib/Auth/setAuthProviders.ts +94 -71
  334. package/lib/Auth/setEmailProvider.ts +45 -27
  335. package/lib/Auth/setupAuthRoutes.ts +164 -100
  336. package/lib/DBEventsManager.ts +87 -65
  337. package/lib/DBSchemaBuilder.ts +62 -28
  338. package/lib/DboBuilder/DboBuilder.ts +45 -21
  339. package/lib/DboBuilder/DboBuilderTypes.ts +99 -95
  340. package/lib/DboBuilder/QueryBuilder/Functions.ts +862 -580
  341. package/lib/DboBuilder/QueryBuilder/QueryBuilder.ts +202 -141
  342. package/lib/DboBuilder/QueryBuilder/getJoinQuery.ts +199 -124
  343. package/lib/DboBuilder/QueryBuilder/getNewQuery.ts +209 -148
  344. package/lib/DboBuilder/QueryBuilder/getSelectQuery.ts +101 -75
  345. package/lib/DboBuilder/QueryBuilder/prepareHaving.ts +10 -5
  346. package/lib/DboBuilder/QueryStreamer.ts +207 -100
  347. package/lib/DboBuilder/TableHandler/DataValidator.ts +253 -148
  348. package/lib/DboBuilder/TableHandler/TableHandler.ts +155 -60
  349. package/lib/DboBuilder/TableHandler/delete.ts +82 -29
  350. package/lib/DboBuilder/TableHandler/insert.ts +177 -81
  351. package/lib/DboBuilder/TableHandler/insertTest.ts +13 -7
  352. package/lib/DboBuilder/TableHandler/onDeleteFromFileTable.ts +35 -21
  353. package/lib/DboBuilder/TableHandler/runInsertUpdateQuery.ts +95 -45
  354. package/lib/DboBuilder/TableHandler/update.ts +54 -14
  355. package/lib/DboBuilder/TableHandler/updateBatch.ts +59 -21
  356. package/lib/DboBuilder/TableHandler/updateFile.ts +57 -26
  357. package/lib/DboBuilder/TableHandler/upsert.ts +58 -13
  358. package/lib/DboBuilder/ViewHandler/ViewHandler.ts +264 -121
  359. package/lib/DboBuilder/ViewHandler/count.ts +56 -25
  360. package/lib/DboBuilder/ViewHandler/find.ts +153 -68
  361. package/lib/DboBuilder/ViewHandler/getExistsCondition.ts +59 -32
  362. package/lib/DboBuilder/ViewHandler/getExistsFilters.ts +31 -19
  363. package/lib/DboBuilder/ViewHandler/getInfo.ts +47 -16
  364. package/lib/DboBuilder/ViewHandler/getTableJoinQuery.ts +91 -57
  365. package/lib/DboBuilder/ViewHandler/parseComplexFilter.ts +51 -29
  366. package/lib/DboBuilder/ViewHandler/parseFieldFilter.ts +35 -29
  367. package/lib/DboBuilder/ViewHandler/parseJoinPath.ts +130 -76
  368. package/lib/DboBuilder/ViewHandler/prepareSortItems.ts +140 -92
  369. package/lib/DboBuilder/ViewHandler/prepareWhere.ts +66 -26
  370. package/lib/DboBuilder/ViewHandler/size.ts +56 -22
  371. package/lib/DboBuilder/ViewHandler/subscribe.ts +122 -46
  372. package/lib/DboBuilder/ViewHandler/validateViewRules.ts +39 -14
  373. package/lib/DboBuilder/dboBuilderUtils.ts +41 -18
  374. package/lib/DboBuilder/getColumns.ts +44 -12
  375. package/lib/DboBuilder/getCondition.ts +120 -79
  376. package/lib/DboBuilder/getSubscribeRelatedTables.ts +144 -83
  377. package/lib/DboBuilder/getTablesForSchemaPostgresSQL.ts +61 -44
  378. package/lib/DboBuilder/insertNestedRecords.ts +370 -235
  379. package/lib/DboBuilder/parseUpdateRules.ts +117 -61
  380. package/lib/DboBuilder/prepareShortestJoinPaths.ts +115 -56
  381. package/lib/DboBuilder/runSQL.ts +135 -74
  382. package/lib/DboBuilder/runTransaction.ts +27 -16
  383. package/lib/DboBuilder/sqlErrCodeToMsg.ts +502 -244
  384. package/lib/DboBuilder/uploadFile.ts +67 -31
  385. package/lib/Event_Trigger_Tags.ts +6 -4
  386. package/lib/FileManager/FileManager.ts +53 -21
  387. package/lib/FileManager/getValidatedFileType.ts +79 -35
  388. package/lib/FileManager/initFileManager.ts +21 -9
  389. package/lib/FileManager/upload.ts +21 -19
  390. package/lib/FileManager/uploadStream.ts +33 -34
  391. package/lib/Filtering.ts +249 -197
  392. package/lib/JSONBValidation/validate_jsonb_schema_sql.ts +2 -7
  393. package/lib/JSONBValidation/validation.ts +147 -82
  394. package/lib/Logging.ts +107 -97
  395. package/lib/PostgresNotifListenManager.ts +96 -63
  396. package/lib/Prostgles.ts +106 -35
  397. package/lib/ProstglesTypes.ts +31 -9
  398. package/lib/PubSubManager/PubSubManager.ts +62 -27
  399. package/lib/PubSubManager/addSub.ts +56 -37
  400. package/lib/PubSubManager/addSync.ts +50 -33
  401. package/lib/PubSubManager/getCreatePubSubManagerError.ts +29 -21
  402. package/lib/PubSubManager/getPubSubManagerInitQuery.ts +45 -27
  403. package/lib/PubSubManager/initPubSubManager.ts +27 -18
  404. package/lib/PubSubManager/notifListener.ts +77 -59
  405. package/lib/PubSubManager/orphanTriggerCheck.ts +5 -4
  406. package/lib/PubSubManager/pushSubData.ts +11 -9
  407. package/lib/PublishParser/PublishParser.ts +102 -44
  408. package/lib/PublishParser/getFileTableRules.ts +97 -54
  409. package/lib/PublishParser/getSchemaFromPublish.ts +146 -74
  410. package/lib/PublishParser/getTableRulesWithoutFileTable.ts +101 -51
  411. package/lib/PublishParser/publishTypesAndUtils.ts +74 -23
  412. package/lib/RestApi.ts +10 -2
  413. package/lib/SchemaWatch/SchemaWatch.ts +52 -34
  414. package/lib/SchemaWatch/createSchemaWatchEventTrigger.ts +1 -1
  415. package/lib/SchemaWatch/getValidatedWatchSchemaType.ts +32 -22
  416. package/lib/SchemaWatch/getWatchSchemaTagList.ts +24 -16
  417. package/lib/SyncReplication.ts +376 -190
  418. package/lib/TableConfig/TableConfig.ts +200 -136
  419. package/lib/TableConfig/getColumnDefinitionQuery.ts +65 -44
  420. package/lib/TableConfig/getConstraintDefinitionQueries.ts +41 -25
  421. package/lib/TableConfig/getFutureTableSchema.ts +31 -21
  422. package/lib/TableConfig/getPGIndexes.ts +7 -4
  423. package/lib/TableConfig/getTableColumnQueries.ts +101 -54
  424. package/lib/TableConfig/initTableConfig.ts +192 -101
  425. package/lib/index.ts +6 -5
  426. package/lib/initProstgles.ts +57 -51
  427. package/lib/onSocketConnected.ts +75 -40
  428. package/lib/runClientRequest.ts +148 -79
  429. package/lib/shortestPath.ts +80 -76
  430. package/lib/typeTests/DBoGenerated.d.ts +5 -1
  431. package/lib/typeTests/dboTypeCheck.ts +8 -8
  432. package/package.json +1 -1
@@ -1,247 +1,506 @@
1
1
  export const sqlErrCodeToMsg = (code: string) => {
2
2
  const errs = {
3
- "00000": "successful_completion",
4
- "01000": "warning",
5
- "0100C": "dynamic_result_sets_returned",
6
- "01008": "implicit_zero_bit_padding",
7
- "01003": "null_value_eliminated_in_set_function",
8
- "01007": "privilege_not_granted",
9
- "01006": "privilege_not_revoked",
10
- "01004": "string_data_right_truncation",
11
- "01P01": "deprecated_feature",
12
- "02000": "no_data",
13
- "02001": "no_additional_dynamic_result_sets_returned",
14
- "03000": "sql_statement_not_yet_complete",
15
- "08000": "connection_exception",
16
- "08003": "connection_does_not_exist",
17
- "08006": "connection_failure",
18
- "08001": "sqlclient_unable_to_establish_sqlconnection",
19
- "08004": "sqlserver_rejected_establishment_of_sqlconnection",
20
- "08007": "transaction_resolution_unknown",
21
- "08P01": "protocol_violation",
22
- "09000": "triggered_action_exception",
23
- "0A000": "feature_not_supported",
24
- "0B000": "invalid_transaction_initiation",
25
- "0F000": "locator_exception",
26
- "0F001": "invalid_locator_specification",
27
- "0L000": "invalid_grantor",
28
- "0LP01": "invalid_grant_operation",
29
- "0P000": "invalid_role_specification",
30
- "0Z000": "diagnostics_exception",
31
- "0Z002": "stacked_diagnostics_accessed_without_active_handler",
32
- "20000": "case_not_found",
33
- "21000": "cardinality_violation",
34
- "22000": "data_exception",
35
- "2202E": "array_subscript_error",
36
- "22021": "character_not_in_repertoire",
37
- "22008": "datetime_field_overflow",
38
- "22012": "division_by_zero",
39
- "22005": "error_in_assignment",
40
- "2200B": "escape_character_conflict",
41
- "22022": "indicator_overflow",
42
- "22015": "interval_field_overflow",
43
- "2201E": "invalid_argument_for_logarithm",
44
- "22014": "invalid_argument_for_ntile_function",
45
- "22016": "invalid_argument_for_nth_value_function",
46
- "2201F": "invalid_argument_for_power_function",
47
- "2201G": "invalid_argument_for_width_bucket_function",
48
- "22018": "invalid_character_value_for_cast",
49
- "22007": "invalid_datetime_format",
50
- "22019": "invalid_escape_character",
51
- "2200D": "invalid_escape_octet",
52
- "22025": "invalid_escape_sequence",
53
- "22P06": "nonstandard_use_of_escape_character",
54
- "22010": "invalid_indicator_parameter_value",
55
- "22023": "invalid_parameter_value",
56
- "2201B": "invalid_regular_expression",
57
- "2201W": "invalid_row_count_in_limit_clause",
58
- "2201X": "invalid_row_count_in_result_offset_clause",
59
- "2202H": "invalid_tablesample_argument",
60
- "2202G": "invalid_tablesample_repeat",
61
- "22009": "invalid_time_zone_displacement_value",
62
- "2200C": "invalid_use_of_escape_character",
63
- "2200G": "most_specific_type_mismatch",
64
- "22004": "null_value_not_allowed",
65
- "22002": "null_value_no_indicator_parameter",
66
- "22003": "numeric_value_out_of_range",
67
- "2200H": "sequence_generator_limit_exceeded",
68
- "22026": "string_data_length_mismatch",
69
- "22001": "string_data_right_truncation",
70
- "22011": "substring_error",
71
- "22027": "trim_error",
72
- "22024": "unterminated_c_string",
73
- "2200F": "zero_length_character_string",
74
- "22P01": "floating_point_exception",
75
- "22P02": "invalid_text_representation",
76
- "22P03": "invalid_binary_representation",
77
- "22P04": "bad_copy_file_format",
78
- "22P05": "untranslatable_character",
79
- "2200L": "not_an_xml_document",
80
- "2200M": "invalid_xml_document",
81
- "2200N": "invalid_xml_content",
82
- "2200S": "invalid_xml_comment",
83
- "2200T": "invalid_xml_processing_instruction",
84
- "23000": "integrity_constraint_violation",
85
- "23001": "restrict_violation",
86
- "23502": "not_null_violation",
87
- "23503": "foreign_key_violation",
88
- "23505": "unique_violation",
89
- "23514": "check_violation",
90
- "23P01": "exclusion_violation",
91
- "24000": "invalid_cursor_state",
92
- "25000": "invalid_transaction_state",
93
- "25001": "active_sql_transaction",
94
- "25002": "branch_transaction_already_active",
95
- "25008": "held_cursor_requires_same_isolation_level",
96
- "25003": "inappropriate_access_mode_for_branch_transaction",
97
- "25004": "inappropriate_isolation_level_for_branch_transaction",
98
- "25005": "no_active_sql_transaction_for_branch_transaction",
99
- "25006": "read_only_sql_transaction",
100
- "25007": "schema_and_data_statement_mixing_not_supported",
101
- "25P01": "no_active_sql_transaction",
102
- "25P02": "in_failed_sql_transaction",
103
- "25P03": "idle_in_transaction_session_timeout",
104
- "26000": "invalid_sql_statement_name",
105
- "27000": "triggered_data_change_violation",
106
- "28000": "invalid_authorization_specification",
107
- "28P01": "invalid_password",
108
- "2B000": "dependent_privilege_descriptors_still_exist",
109
- "2BP01": "dependent_objects_still_exist",
110
- "2D000": "invalid_transaction_termination",
111
- "2F000": "sql_routine_exception",
112
- "2F005": "function_executed_no_return_statement",
113
- "2F002": "modifying_sql_data_not_permitted",
114
- "2F003": "prohibited_sql_statement_attempted",
115
- "2F004": "reading_sql_data_not_permitted",
116
- "34000": "invalid_cursor_name",
117
- "38000": "external_routine_exception",
118
- "38001": "containing_sql_not_permitted",
119
- "38002": "modifying_sql_data_not_permitted",
120
- "38003": "prohibited_sql_statement_attempted",
121
- "38004": "reading_sql_data_not_permitted",
122
- "39000": "external_routine_invocation_exception",
123
- "39001": "invalid_sqlstate_returned",
124
- "39004": "null_value_not_allowed",
125
- "39P01": "trigger_protocol_violated",
126
- "39P02": "srf_protocol_violated",
127
- "39P03": "event_trigger_protocol_violated",
128
- "3B000": "savepoint_exception",
129
- "3B001": "invalid_savepoint_specification",
130
- "3D000": "invalid_catalog_name",
131
- "3F000": "invalid_schema_name",
132
- "40000": "transaction_rollback",
133
- "40002": "transaction_integrity_constraint_violation",
134
- "40001": "serialization_failure",
135
- "40003": "statement_completion_unknown",
136
- "40P01": "deadlock_detected",
137
- "42000": "syntax_error_or_access_rule_violation",
138
- "42601": "syntax_error",
139
- "42501": "insufficient_privilege",
140
- "42846": "cannot_coerce",
141
- "42803": "grouping_error",
142
- "42P20": "windowing_error",
143
- "42P19": "invalid_recursion",
144
- "42830": "invalid_foreign_key",
145
- "42602": "invalid_name",
146
- "42622": "name_too_long",
147
- "42939": "reserved_name",
148
- "42804": "datatype_mismatch",
149
- "42P18": "indeterminate_datatype",
150
- "42P21": "collation_mismatch",
151
- "42P22": "indeterminate_collation",
152
- "42809": "wrong_object_type",
153
- "428C9": "generated_always",
154
- "42703": "undefined_column",
155
- "42883": "undefined_function",
156
- "42P01": "undefined_table",
157
- "42P02": "undefined_parameter",
158
- "42704": "undefined_object",
159
- "42701": "duplicate_column",
160
- "42P03": "duplicate_cursor",
161
- "42P04": "duplicate_database",
162
- "42723": "duplicate_function",
163
- "42P05": "duplicate_prepared_statement",
164
- "42P06": "duplicate_schema",
165
- "42P07": "duplicate_table",
166
- "42712": "duplicate_alias",
167
- "42710": "duplicate_object",
168
- "42702": "ambiguous_column",
169
- "42725": "ambiguous_function",
170
- "42P08": "ambiguous_parameter",
171
- "42P09": "ambiguous_alias",
172
- "42P10": "invalid_column_reference",
173
- "42611": "invalid_column_definition",
174
- "42P11": "invalid_cursor_definition",
175
- "42P12": "invalid_database_definition",
176
- "42P13": "invalid_function_definition",
177
- "42P14": "invalid_prepared_statement_definition",
178
- "42P15": "invalid_schema_definition",
179
- "42P16": "invalid_table_definition",
180
- "42P17": "invalid_object_definition",
181
- "44000": "with_check_option_violation",
182
- "53000": "insufficient_resources",
183
- "53100": "disk_full",
184
- "53200": "out_of_memory",
185
- "53300": "too_many_connections",
186
- "53400": "configuration_limit_exceeded",
187
- "54000": "program_limit_exceeded",
188
- "54001": "statement_too_complex",
189
- "54011": "too_many_columns",
190
- "54023": "too_many_arguments",
191
- "55000": "object_not_in_prerequisite_state",
192
- "55006": "object_in_use",
193
- "55P02": "cant_change_runtime_param",
194
- "55P03": "lock_not_available",
195
- "57000": "operator_intervention",
196
- "57014": "query_canceled",
197
- "57P01": "admin_shutdown",
198
- "57P02": "crash_shutdown",
199
- "57P03": "cannot_connect_now",
200
- "57P04": "database_dropped",
201
- "58000": "system_error",
202
- "58030": "io_error",
203
- "58P01": "undefined_file",
204
- "58P02": "duplicate_file",
205
- "72000": "snapshot_too_old",
206
- "F0000": "config_file_error",
207
- "F0001": "lock_file_exists",
208
- "HV000": "fdw_error",
209
- "HV005": "fdw_column_name_not_found",
210
- "HV002": "fdw_dynamic_parameter_value_needed",
211
- "HV010": "fdw_function_sequence_error",
212
- "HV021": "fdw_inconsistent_descriptor_information",
213
- "HV024": "fdw_invalid_attribute_value",
214
- "HV007": "fdw_invalid_column_name",
215
- "HV008": "fdw_invalid_column_number",
216
- "HV004": "fdw_invalid_data_type",
217
- "HV006": "fdw_invalid_data_type_descriptors",
218
- "HV091": "fdw_invalid_descriptor_field_identifier",
219
- "HV00B": "fdw_invalid_handle",
220
- "HV00C": "fdw_invalid_option_index",
221
- "HV00D": "fdw_invalid_option_name",
222
- "HV090": "fdw_invalid_string_length_or_buffer_length",
223
- "HV00A": "fdw_invalid_string_format",
224
- "HV009": "fdw_invalid_use_of_null_pointer",
225
- "HV014": "fdw_too_many_handles",
226
- "HV001": "fdw_out_of_memory",
227
- "HV00P": "fdw_no_schemas",
228
- "HV00J": "fdw_option_name_not_found",
229
- "HV00K": "fdw_reply_handle",
230
- "HV00Q": "fdw_schema_not_found",
231
- "HV00R": "fdw_table_not_found",
232
- "HV00L": "fdw_unable_to_create_execution",
233
- "HV00M": "fdw_unable_to_create_reply",
234
- "HV00N": "fdw_unable_to_establish_connection",
235
- "P0000": "plpgsql_error",
236
- "P0001": "raise_exception",
237
- "P0002": "no_data_found",
238
- "P0003": "too_many_rows",
239
- "P0004": "assert_failure",
240
- "XX000": "internal_error",
241
- "XX001": "data_corrupted",
242
- "XX002": "index_corrupted"
243
- },
244
- c2 = { "20000": "case_not_found", "21000": "cardinality_violation", "22000": "data_exception", "22001": "string_data_right_truncation", "22002": "null_value_no_indicator_parameter", "22003": "numeric_value_out_of_range", "22004": "null_value_not_allowed", "22005": "error_in_assignment", "22007": "invalid_datetime_format", "22008": "datetime_field_overflow", "22009": "invalid_time_zone_displacement_value", "22010": "invalid_indicator_parameter_value", "22011": "substring_error", "22012": "division_by_zero", "22013": "invalid_preceding_or_following_size", "22014": "invalid_argument_for_ntile_function", "22015": "interval_field_overflow", "22016": "invalid_argument_for_nth_value_function", "22018": "invalid_character_value_for_cast", "22019": "invalid_escape_character", "22021": "character_not_in_repertoire", "22022": "indicator_overflow", "22023": "invalid_parameter_value", "22024": "unterminated_c_string", "22025": "invalid_escape_sequence", "22026": "string_data_length_mismatch", "22027": "trim_error", "22030": "duplicate_json_object_key_value", "22031": "invalid_argument_for_sql_json_datetime_function", "22032": "invalid_json_text", "22033": "invalid_sql_json_subscript", "22034": "more_than_one_sql_json_item", "22035": "no_sql_json_item", "22036": "non_numeric_sql_json_item", "22037": "non_unique_keys_in_a_json_object", "22038": "singleton_sql_json_item_required", "22039": "sql_json_array_not_found", "23000": "integrity_constraint_violation", "23001": "restrict_violation", "23502": "not_null_violation", "23503": "foreign_key_violation", "23505": "unique_violation", "23514": "check_violation", "24000": "invalid_cursor_state", "25000": "invalid_transaction_state", "25001": "active_sql_transaction", "25002": "branch_transaction_already_active", "25003": "inappropriate_access_mode_for_branch_transaction", "25004": "inappropriate_isolation_level_for_branch_transaction", "25005": "no_active_sql_transaction_for_branch_transaction", "25006": "read_only_sql_transaction", "25007": "schema_and_data_statement_mixing_not_supported", "25008": "held_cursor_requires_same_isolation_level", "26000": "invalid_sql_statement_name", "27000": "triggered_data_change_violation", "28000": "invalid_authorization_specification", "34000": "invalid_cursor_name", "38000": "external_routine_exception", "38001": "containing_sql_not_permitted", "38002": "modifying_sql_data_not_permitted", "38003": "prohibited_sql_statement_attempted", "38004": "reading_sql_data_not_permitted", "39000": "external_routine_invocation_exception", "39001": "invalid_sqlstate_returned", "39004": "null_value_not_allowed", "40000": "transaction_rollback", "40001": "serialization_failure", "40002": "transaction_integrity_constraint_violation", "40003": "statement_completion_unknown", "42000": "syntax_error_or_access_rule_violation", "42501": "insufficient_privilege", "42601": "syntax_error", "42602": "invalid_name", "42611": "invalid_column_definition", "42622": "name_too_long", "42701": "duplicate_column", "42702": "ambiguous_column", "42703": "undefined_column", "42704": "undefined_object", "42710": "duplicate_object", "42712": "duplicate_alias", "42723": "duplicate_function", "42725": "ambiguous_function", "42803": "grouping_error", "42804": "datatype_mismatch", "42809": "wrong_object_type", "42830": "invalid_foreign_key", "42846": "cannot_coerce", "42883": "undefined_function", "42939": "reserved_name", "44000": "with_check_option_violation", "53000": "insufficient_resources", "53100": "disk_full", "53200": "out_of_memory", "53300": "too_many_connections", "53400": "configuration_limit_exceeded", "54000": "program_limit_exceeded", "54001": "statement_too_complex", "54011": "too_many_columns", "54023": "too_many_arguments", "55000": "object_not_in_prerequisite_state", "55006": "object_in_use", "57000": "operator_intervention", "57014": "query_canceled", "58000": "system_error", "58030": "io_error", "72000": "snapshot_too_old", "00000": "successful_completion", "01000": "warning", "0100C": "dynamic_result_sets_returned", "01008": "implicit_zero_bit_padding", "01003": "null_value_eliminated_in_set_function", "01007": "privilege_not_granted", "01006": "privilege_not_revoked", "01004": "string_data_right_truncation", "01P01": "deprecated_feature", "02000": "no_data", "02001": "no_additional_dynamic_result_sets_returned", "03000": "sql_statement_not_yet_complete", "08000": "connection_exception", "08003": "connection_does_not_exist", "08006": "connection_failure", "08001": "sqlclient_unable_to_establish_sqlconnection", "08004": "sqlserver_rejected_establishment_of_sqlconnection", "08007": "transaction_resolution_unknown", "08P01": "protocol_violation", "09000": "triggered_action_exception", "0A000": "feature_not_supported", "0B000": "invalid_transaction_initiation", "0F000": "locator_exception", "0F001": "invalid_locator_specification", "0L000": "invalid_grantor", "0LP01": "invalid_grant_operation", "0P000": "invalid_role_specification", "0Z000": "diagnostics_exception", "0Z002": "stacked_diagnostics_accessed_without_active_handler", "2202E": "array_subscript_error", "2200B": "escape_character_conflict", "2201E": "invalid_argument_for_logarithm", "2201F": "invalid_argument_for_power_function", "2201G": "invalid_argument_for_width_bucket_function", "2200D": "invalid_escape_octet", "22P06": "nonstandard_use_of_escape_character", "2201B": "invalid_regular_expression", "2201W": "invalid_row_count_in_limit_clause", "2201X": "invalid_row_count_in_result_offset_clause", "2202H": "invalid_tablesample_argument", "2202G": "invalid_tablesample_repeat", "2200C": "invalid_use_of_escape_character", "2200G": "most_specific_type_mismatch", "2200H": "sequence_generator_limit_exceeded", "2200F": "zero_length_character_string", "22P01": "floating_point_exception", "22P02": "invalid_text_representation", "22P03": "invalid_binary_representation", "22P04": "bad_copy_file_format", "22P05": "untranslatable_character", "2200L": "not_an_xml_document", "2200M": "invalid_xml_document", "2200N": "invalid_xml_content", "2200S": "invalid_xml_comment", "2200T": "invalid_xml_processing_instruction", "2203A": "sql_json_member_not_found", "2203B": "sql_json_number_not_found", "2203C": "sql_json_object_not_found", "2203D": "too_many_json_array_elements", "2203E": "too_many_json_object_members", "2203F": "sql_json_scalar_required", "23P01": "exclusion_violation", "25P01": "no_active_sql_transaction", "25P02": "in_failed_sql_transaction", "25P03": "idle_in_transaction_session_timeout", "28P01": "invalid_password", "2B000": "dependent_privilege_descriptors_still_exist", "2BP01": "dependent_objects_still_exist", "2D000": "invalid_transaction_termination", "2F000": "sql_routine_exception", "2F005": "function_executed_no_return_statement", "2F002": "modifying_sql_data_not_permitted", "2F003": "prohibited_sql_statement_attempted", "2F004": "reading_sql_data_not_permitted", "39P01": "trigger_protocol_violated", "39P02": "srf_protocol_violated", "39P03": "event_trigger_protocol_violated", "3B000": "savepoint_exception", "3B001": "invalid_savepoint_specification", "3D000": "invalid_catalog_name", "3F000": "invalid_schema_name", "40P01": "deadlock_detected", "42P20": "windowing_error", "42P19": "invalid_recursion", "42P18": "indeterminate_datatype", "42P21": "collation_mismatch", "42P22": "indeterminate_collation", "428C9": "generated_always", "42P01": "undefined_table", "42P02": "undefined_parameter", "42P03": "duplicate_cursor", "42P04": "duplicate_database", "42P05": "duplicate_prepared_statement", "42P06": "duplicate_schema", "42P07": "duplicate_table", "42P08": "ambiguous_parameter", "42P09": "ambiguous_alias", "42P10": "invalid_column_reference", "42P11": "invalid_cursor_definition", "42P12": "invalid_database_definition", "42P13": "invalid_function_definition", "42P14": "invalid_prepared_statement_definition", "42P15": "invalid_schema_definition", "42P16": "invalid_table_definition", "42P17": "invalid_object_definition", "55P02": "cant_change_runtime_param", "55P03": "lock_not_available", "55P04": "unsafe_new_enum_value_usage", "57P01": "admin_shutdown", "57P02": "crash_shutdown", "57P03": "cannot_connect_now", "57P04": "database_dropped", "58P01": "undefined_file", "58P02": "duplicate_file", "F0000": "config_file_error", "F0001": "lock_file_exists", "HV000": "fdw_error", "HV005": "fdw_column_name_not_found", "HV002": "fdw_dynamic_parameter_value_needed", "HV010": "fdw_function_sequence_error", "HV021": "fdw_inconsistent_descriptor_information", "HV024": "fdw_invalid_attribute_value", "HV007": "fdw_invalid_column_name", "HV008": "fdw_invalid_column_number", "HV004": "fdw_invalid_data_type", "HV006": "fdw_invalid_data_type_descriptors", "HV091": "fdw_invalid_descriptor_field_identifier", "HV00B": "fdw_invalid_handle", "HV00C": "fdw_invalid_option_index", "HV00D": "fdw_invalid_option_name", "HV090": "fdw_invalid_string_length_or_buffer_length", "HV00A": "fdw_invalid_string_format", "HV009": "fdw_invalid_use_of_null_pointer", "HV014": "fdw_too_many_handles", "HV001": "fdw_out_of_memory", "HV00P": "fdw_no_schemas", "HV00J": "fdw_option_name_not_found", "HV00K": "fdw_reply_handle", "HV00Q": "fdw_schema_not_found", "HV00R": "fdw_table_not_found", "HV00L": "fdw_unable_to_create_execution", "HV00M": "fdw_unable_to_create_reply", "HV00N": "fdw_unable_to_establish_connection", "P0000": "plpgsql_error", "P0001": "raise_exception", "P0002": "no_data_found", "P0003": "too_many_rows", "P0004": "assert_failure", "XX000": "internal_error", "XX001": "data_corrupted", "XX002": "index_corrupted" }
3
+ "00000": "successful_completion",
4
+ "01000": "warning",
5
+ "0100C": "dynamic_result_sets_returned",
6
+ "01008": "implicit_zero_bit_padding",
7
+ "01003": "null_value_eliminated_in_set_function",
8
+ "01007": "privilege_not_granted",
9
+ "01006": "privilege_not_revoked",
10
+ "01004": "string_data_right_truncation",
11
+ "01P01": "deprecated_feature",
12
+ "02000": "no_data",
13
+ "02001": "no_additional_dynamic_result_sets_returned",
14
+ "03000": "sql_statement_not_yet_complete",
15
+ "08000": "connection_exception",
16
+ "08003": "connection_does_not_exist",
17
+ "08006": "connection_failure",
18
+ "08001": "sqlclient_unable_to_establish_sqlconnection",
19
+ "08004": "sqlserver_rejected_establishment_of_sqlconnection",
20
+ "08007": "transaction_resolution_unknown",
21
+ "08P01": "protocol_violation",
22
+ "09000": "triggered_action_exception",
23
+ "0A000": "feature_not_supported",
24
+ "0B000": "invalid_transaction_initiation",
25
+ "0F000": "locator_exception",
26
+ "0F001": "invalid_locator_specification",
27
+ "0L000": "invalid_grantor",
28
+ "0LP01": "invalid_grant_operation",
29
+ "0P000": "invalid_role_specification",
30
+ "0Z000": "diagnostics_exception",
31
+ "0Z002": "stacked_diagnostics_accessed_without_active_handler",
32
+ "20000": "case_not_found",
33
+ "21000": "cardinality_violation",
34
+ "22000": "data_exception",
35
+ "2202E": "array_subscript_error",
36
+ "22021": "character_not_in_repertoire",
37
+ "22008": "datetime_field_overflow",
38
+ "22012": "division_by_zero",
39
+ "22005": "error_in_assignment",
40
+ "2200B": "escape_character_conflict",
41
+ "22022": "indicator_overflow",
42
+ "22015": "interval_field_overflow",
43
+ "2201E": "invalid_argument_for_logarithm",
44
+ "22014": "invalid_argument_for_ntile_function",
45
+ "22016": "invalid_argument_for_nth_value_function",
46
+ "2201F": "invalid_argument_for_power_function",
47
+ "2201G": "invalid_argument_for_width_bucket_function",
48
+ "22018": "invalid_character_value_for_cast",
49
+ "22007": "invalid_datetime_format",
50
+ "22019": "invalid_escape_character",
51
+ "2200D": "invalid_escape_octet",
52
+ "22025": "invalid_escape_sequence",
53
+ "22P06": "nonstandard_use_of_escape_character",
54
+ "22010": "invalid_indicator_parameter_value",
55
+ "22023": "invalid_parameter_value",
56
+ "2201B": "invalid_regular_expression",
57
+ "2201W": "invalid_row_count_in_limit_clause",
58
+ "2201X": "invalid_row_count_in_result_offset_clause",
59
+ "2202H": "invalid_tablesample_argument",
60
+ "2202G": "invalid_tablesample_repeat",
61
+ "22009": "invalid_time_zone_displacement_value",
62
+ "2200C": "invalid_use_of_escape_character",
63
+ "2200G": "most_specific_type_mismatch",
64
+ "22004": "null_value_not_allowed",
65
+ "22002": "null_value_no_indicator_parameter",
66
+ "22003": "numeric_value_out_of_range",
67
+ "2200H": "sequence_generator_limit_exceeded",
68
+ "22026": "string_data_length_mismatch",
69
+ "22001": "string_data_right_truncation",
70
+ "22011": "substring_error",
71
+ "22027": "trim_error",
72
+ "22024": "unterminated_c_string",
73
+ "2200F": "zero_length_character_string",
74
+ "22P01": "floating_point_exception",
75
+ "22P02": "invalid_text_representation",
76
+ "22P03": "invalid_binary_representation",
77
+ "22P04": "bad_copy_file_format",
78
+ "22P05": "untranslatable_character",
79
+ "2200L": "not_an_xml_document",
80
+ "2200M": "invalid_xml_document",
81
+ "2200N": "invalid_xml_content",
82
+ "2200S": "invalid_xml_comment",
83
+ "2200T": "invalid_xml_processing_instruction",
84
+ "23000": "integrity_constraint_violation",
85
+ "23001": "restrict_violation",
86
+ "23502": "not_null_violation",
87
+ "23503": "foreign_key_violation",
88
+ "23505": "unique_violation",
89
+ "23514": "check_violation",
90
+ "23P01": "exclusion_violation",
91
+ "24000": "invalid_cursor_state",
92
+ "25000": "invalid_transaction_state",
93
+ "25001": "active_sql_transaction",
94
+ "25002": "branch_transaction_already_active",
95
+ "25008": "held_cursor_requires_same_isolation_level",
96
+ "25003": "inappropriate_access_mode_for_branch_transaction",
97
+ "25004": "inappropriate_isolation_level_for_branch_transaction",
98
+ "25005": "no_active_sql_transaction_for_branch_transaction",
99
+ "25006": "read_only_sql_transaction",
100
+ "25007": "schema_and_data_statement_mixing_not_supported",
101
+ "25P01": "no_active_sql_transaction",
102
+ "25P02": "in_failed_sql_transaction",
103
+ "25P03": "idle_in_transaction_session_timeout",
104
+ "26000": "invalid_sql_statement_name",
105
+ "27000": "triggered_data_change_violation",
106
+ "28000": "invalid_authorization_specification",
107
+ "28P01": "invalid_password",
108
+ "2B000": "dependent_privilege_descriptors_still_exist",
109
+ "2BP01": "dependent_objects_still_exist",
110
+ "2D000": "invalid_transaction_termination",
111
+ "2F000": "sql_routine_exception",
112
+ "2F005": "function_executed_no_return_statement",
113
+ "2F002": "modifying_sql_data_not_permitted",
114
+ "2F003": "prohibited_sql_statement_attempted",
115
+ "2F004": "reading_sql_data_not_permitted",
116
+ "34000": "invalid_cursor_name",
117
+ "38000": "external_routine_exception",
118
+ "38001": "containing_sql_not_permitted",
119
+ "38002": "modifying_sql_data_not_permitted",
120
+ "38003": "prohibited_sql_statement_attempted",
121
+ "38004": "reading_sql_data_not_permitted",
122
+ "39000": "external_routine_invocation_exception",
123
+ "39001": "invalid_sqlstate_returned",
124
+ "39004": "null_value_not_allowed",
125
+ "39P01": "trigger_protocol_violated",
126
+ "39P02": "srf_protocol_violated",
127
+ "39P03": "event_trigger_protocol_violated",
128
+ "3B000": "savepoint_exception",
129
+ "3B001": "invalid_savepoint_specification",
130
+ "3D000": "invalid_catalog_name",
131
+ "3F000": "invalid_schema_name",
132
+ "40000": "transaction_rollback",
133
+ "40002": "transaction_integrity_constraint_violation",
134
+ "40001": "serialization_failure",
135
+ "40003": "statement_completion_unknown",
136
+ "40P01": "deadlock_detected",
137
+ "42000": "syntax_error_or_access_rule_violation",
138
+ "42601": "syntax_error",
139
+ "42501": "insufficient_privilege",
140
+ "42846": "cannot_coerce",
141
+ "42803": "grouping_error",
142
+ "42P20": "windowing_error",
143
+ "42P19": "invalid_recursion",
144
+ "42830": "invalid_foreign_key",
145
+ "42602": "invalid_name",
146
+ "42622": "name_too_long",
147
+ "42939": "reserved_name",
148
+ "42804": "datatype_mismatch",
149
+ "42P18": "indeterminate_datatype",
150
+ "42P21": "collation_mismatch",
151
+ "42P22": "indeterminate_collation",
152
+ "42809": "wrong_object_type",
153
+ "428C9": "generated_always",
154
+ "42703": "undefined_column",
155
+ "42883": "undefined_function",
156
+ "42P01": "undefined_table",
157
+ "42P02": "undefined_parameter",
158
+ "42704": "undefined_object",
159
+ "42701": "duplicate_column",
160
+ "42P03": "duplicate_cursor",
161
+ "42P04": "duplicate_database",
162
+ "42723": "duplicate_function",
163
+ "42P05": "duplicate_prepared_statement",
164
+ "42P06": "duplicate_schema",
165
+ "42P07": "duplicate_table",
166
+ "42712": "duplicate_alias",
167
+ "42710": "duplicate_object",
168
+ "42702": "ambiguous_column",
169
+ "42725": "ambiguous_function",
170
+ "42P08": "ambiguous_parameter",
171
+ "42P09": "ambiguous_alias",
172
+ "42P10": "invalid_column_reference",
173
+ "42611": "invalid_column_definition",
174
+ "42P11": "invalid_cursor_definition",
175
+ "42P12": "invalid_database_definition",
176
+ "42P13": "invalid_function_definition",
177
+ "42P14": "invalid_prepared_statement_definition",
178
+ "42P15": "invalid_schema_definition",
179
+ "42P16": "invalid_table_definition",
180
+ "42P17": "invalid_object_definition",
181
+ "44000": "with_check_option_violation",
182
+ "53000": "insufficient_resources",
183
+ "53100": "disk_full",
184
+ "53200": "out_of_memory",
185
+ "53300": "too_many_connections",
186
+ "53400": "configuration_limit_exceeded",
187
+ "54000": "program_limit_exceeded",
188
+ "54001": "statement_too_complex",
189
+ "54011": "too_many_columns",
190
+ "54023": "too_many_arguments",
191
+ "55000": "object_not_in_prerequisite_state",
192
+ "55006": "object_in_use",
193
+ "55P02": "cant_change_runtime_param",
194
+ "55P03": "lock_not_available",
195
+ "57000": "operator_intervention",
196
+ "57014": "query_canceled",
197
+ "57P01": "admin_shutdown",
198
+ "57P02": "crash_shutdown",
199
+ "57P03": "cannot_connect_now",
200
+ "57P04": "database_dropped",
201
+ "58000": "system_error",
202
+ "58030": "io_error",
203
+ "58P01": "undefined_file",
204
+ "58P02": "duplicate_file",
205
+ "72000": "snapshot_too_old",
206
+ F0000: "config_file_error",
207
+ F0001: "lock_file_exists",
208
+ HV000: "fdw_error",
209
+ HV005: "fdw_column_name_not_found",
210
+ HV002: "fdw_dynamic_parameter_value_needed",
211
+ HV010: "fdw_function_sequence_error",
212
+ HV021: "fdw_inconsistent_descriptor_information",
213
+ HV024: "fdw_invalid_attribute_value",
214
+ HV007: "fdw_invalid_column_name",
215
+ HV008: "fdw_invalid_column_number",
216
+ HV004: "fdw_invalid_data_type",
217
+ HV006: "fdw_invalid_data_type_descriptors",
218
+ HV091: "fdw_invalid_descriptor_field_identifier",
219
+ HV00B: "fdw_invalid_handle",
220
+ HV00C: "fdw_invalid_option_index",
221
+ HV00D: "fdw_invalid_option_name",
222
+ HV090: "fdw_invalid_string_length_or_buffer_length",
223
+ HV00A: "fdw_invalid_string_format",
224
+ HV009: "fdw_invalid_use_of_null_pointer",
225
+ HV014: "fdw_too_many_handles",
226
+ HV001: "fdw_out_of_memory",
227
+ HV00P: "fdw_no_schemas",
228
+ HV00J: "fdw_option_name_not_found",
229
+ HV00K: "fdw_reply_handle",
230
+ HV00Q: "fdw_schema_not_found",
231
+ HV00R: "fdw_table_not_found",
232
+ HV00L: "fdw_unable_to_create_execution",
233
+ HV00M: "fdw_unable_to_create_reply",
234
+ HV00N: "fdw_unable_to_establish_connection",
235
+ P0000: "plpgsql_error",
236
+ P0001: "raise_exception",
237
+ P0002: "no_data_found",
238
+ P0003: "too_many_rows",
239
+ P0004: "assert_failure",
240
+ XX000: "internal_error",
241
+ XX001: "data_corrupted",
242
+ XX002: "index_corrupted",
243
+ },
244
+ c2 = {
245
+ "20000": "case_not_found",
246
+ "21000": "cardinality_violation",
247
+ "22000": "data_exception",
248
+ "22001": "string_data_right_truncation",
249
+ "22002": "null_value_no_indicator_parameter",
250
+ "22003": "numeric_value_out_of_range",
251
+ "22004": "null_value_not_allowed",
252
+ "22005": "error_in_assignment",
253
+ "22007": "invalid_datetime_format",
254
+ "22008": "datetime_field_overflow",
255
+ "22009": "invalid_time_zone_displacement_value",
256
+ "22010": "invalid_indicator_parameter_value",
257
+ "22011": "substring_error",
258
+ "22012": "division_by_zero",
259
+ "22013": "invalid_preceding_or_following_size",
260
+ "22014": "invalid_argument_for_ntile_function",
261
+ "22015": "interval_field_overflow",
262
+ "22016": "invalid_argument_for_nth_value_function",
263
+ "22018": "invalid_character_value_for_cast",
264
+ "22019": "invalid_escape_character",
265
+ "22021": "character_not_in_repertoire",
266
+ "22022": "indicator_overflow",
267
+ "22023": "invalid_parameter_value",
268
+ "22024": "unterminated_c_string",
269
+ "22025": "invalid_escape_sequence",
270
+ "22026": "string_data_length_mismatch",
271
+ "22027": "trim_error",
272
+ "22030": "duplicate_json_object_key_value",
273
+ "22031": "invalid_argument_for_sql_json_datetime_function",
274
+ "22032": "invalid_json_text",
275
+ "22033": "invalid_sql_json_subscript",
276
+ "22034": "more_than_one_sql_json_item",
277
+ "22035": "no_sql_json_item",
278
+ "22036": "non_numeric_sql_json_item",
279
+ "22037": "non_unique_keys_in_a_json_object",
280
+ "22038": "singleton_sql_json_item_required",
281
+ "22039": "sql_json_array_not_found",
282
+ "23000": "integrity_constraint_violation",
283
+ "23001": "restrict_violation",
284
+ "23502": "not_null_violation",
285
+ "23503": "foreign_key_violation",
286
+ "23505": "unique_violation",
287
+ "23514": "check_violation",
288
+ "24000": "invalid_cursor_state",
289
+ "25000": "invalid_transaction_state",
290
+ "25001": "active_sql_transaction",
291
+ "25002": "branch_transaction_already_active",
292
+ "25003": "inappropriate_access_mode_for_branch_transaction",
293
+ "25004": "inappropriate_isolation_level_for_branch_transaction",
294
+ "25005": "no_active_sql_transaction_for_branch_transaction",
295
+ "25006": "read_only_sql_transaction",
296
+ "25007": "schema_and_data_statement_mixing_not_supported",
297
+ "25008": "held_cursor_requires_same_isolation_level",
298
+ "26000": "invalid_sql_statement_name",
299
+ "27000": "triggered_data_change_violation",
300
+ "28000": "invalid_authorization_specification",
301
+ "34000": "invalid_cursor_name",
302
+ "38000": "external_routine_exception",
303
+ "38001": "containing_sql_not_permitted",
304
+ "38002": "modifying_sql_data_not_permitted",
305
+ "38003": "prohibited_sql_statement_attempted",
306
+ "38004": "reading_sql_data_not_permitted",
307
+ "39000": "external_routine_invocation_exception",
308
+ "39001": "invalid_sqlstate_returned",
309
+ "39004": "null_value_not_allowed",
310
+ "40000": "transaction_rollback",
311
+ "40001": "serialization_failure",
312
+ "40002": "transaction_integrity_constraint_violation",
313
+ "40003": "statement_completion_unknown",
314
+ "42000": "syntax_error_or_access_rule_violation",
315
+ "42501": "insufficient_privilege",
316
+ "42601": "syntax_error",
317
+ "42602": "invalid_name",
318
+ "42611": "invalid_column_definition",
319
+ "42622": "name_too_long",
320
+ "42701": "duplicate_column",
321
+ "42702": "ambiguous_column",
322
+ "42703": "undefined_column",
323
+ "42704": "undefined_object",
324
+ "42710": "duplicate_object",
325
+ "42712": "duplicate_alias",
326
+ "42723": "duplicate_function",
327
+ "42725": "ambiguous_function",
328
+ "42803": "grouping_error",
329
+ "42804": "datatype_mismatch",
330
+ "42809": "wrong_object_type",
331
+ "42830": "invalid_foreign_key",
332
+ "42846": "cannot_coerce",
333
+ "42883": "undefined_function",
334
+ "42939": "reserved_name",
335
+ "44000": "with_check_option_violation",
336
+ "53000": "insufficient_resources",
337
+ "53100": "disk_full",
338
+ "53200": "out_of_memory",
339
+ "53300": "too_many_connections",
340
+ "53400": "configuration_limit_exceeded",
341
+ "54000": "program_limit_exceeded",
342
+ "54001": "statement_too_complex",
343
+ "54011": "too_many_columns",
344
+ "54023": "too_many_arguments",
345
+ "55000": "object_not_in_prerequisite_state",
346
+ "55006": "object_in_use",
347
+ "57000": "operator_intervention",
348
+ "57014": "query_canceled",
349
+ "58000": "system_error",
350
+ "58030": "io_error",
351
+ "72000": "snapshot_too_old",
352
+ "00000": "successful_completion",
353
+ "01000": "warning",
354
+ "0100C": "dynamic_result_sets_returned",
355
+ "01008": "implicit_zero_bit_padding",
356
+ "01003": "null_value_eliminated_in_set_function",
357
+ "01007": "privilege_not_granted",
358
+ "01006": "privilege_not_revoked",
359
+ "01004": "string_data_right_truncation",
360
+ "01P01": "deprecated_feature",
361
+ "02000": "no_data",
362
+ "02001": "no_additional_dynamic_result_sets_returned",
363
+ "03000": "sql_statement_not_yet_complete",
364
+ "08000": "connection_exception",
365
+ "08003": "connection_does_not_exist",
366
+ "08006": "connection_failure",
367
+ "08001": "sqlclient_unable_to_establish_sqlconnection",
368
+ "08004": "sqlserver_rejected_establishment_of_sqlconnection",
369
+ "08007": "transaction_resolution_unknown",
370
+ "08P01": "protocol_violation",
371
+ "09000": "triggered_action_exception",
372
+ "0A000": "feature_not_supported",
373
+ "0B000": "invalid_transaction_initiation",
374
+ "0F000": "locator_exception",
375
+ "0F001": "invalid_locator_specification",
376
+ "0L000": "invalid_grantor",
377
+ "0LP01": "invalid_grant_operation",
378
+ "0P000": "invalid_role_specification",
379
+ "0Z000": "diagnostics_exception",
380
+ "0Z002": "stacked_diagnostics_accessed_without_active_handler",
381
+ "2202E": "array_subscript_error",
382
+ "2200B": "escape_character_conflict",
383
+ "2201E": "invalid_argument_for_logarithm",
384
+ "2201F": "invalid_argument_for_power_function",
385
+ "2201G": "invalid_argument_for_width_bucket_function",
386
+ "2200D": "invalid_escape_octet",
387
+ "22P06": "nonstandard_use_of_escape_character",
388
+ "2201B": "invalid_regular_expression",
389
+ "2201W": "invalid_row_count_in_limit_clause",
390
+ "2201X": "invalid_row_count_in_result_offset_clause",
391
+ "2202H": "invalid_tablesample_argument",
392
+ "2202G": "invalid_tablesample_repeat",
393
+ "2200C": "invalid_use_of_escape_character",
394
+ "2200G": "most_specific_type_mismatch",
395
+ "2200H": "sequence_generator_limit_exceeded",
396
+ "2200F": "zero_length_character_string",
397
+ "22P01": "floating_point_exception",
398
+ "22P02": "invalid_text_representation",
399
+ "22P03": "invalid_binary_representation",
400
+ "22P04": "bad_copy_file_format",
401
+ "22P05": "untranslatable_character",
402
+ "2200L": "not_an_xml_document",
403
+ "2200M": "invalid_xml_document",
404
+ "2200N": "invalid_xml_content",
405
+ "2200S": "invalid_xml_comment",
406
+ "2200T": "invalid_xml_processing_instruction",
407
+ "2203A": "sql_json_member_not_found",
408
+ "2203B": "sql_json_number_not_found",
409
+ "2203C": "sql_json_object_not_found",
410
+ "2203D": "too_many_json_array_elements",
411
+ "2203E": "too_many_json_object_members",
412
+ "2203F": "sql_json_scalar_required",
413
+ "23P01": "exclusion_violation",
414
+ "25P01": "no_active_sql_transaction",
415
+ "25P02": "in_failed_sql_transaction",
416
+ "25P03": "idle_in_transaction_session_timeout",
417
+ "28P01": "invalid_password",
418
+ "2B000": "dependent_privilege_descriptors_still_exist",
419
+ "2BP01": "dependent_objects_still_exist",
420
+ "2D000": "invalid_transaction_termination",
421
+ "2F000": "sql_routine_exception",
422
+ "2F005": "function_executed_no_return_statement",
423
+ "2F002": "modifying_sql_data_not_permitted",
424
+ "2F003": "prohibited_sql_statement_attempted",
425
+ "2F004": "reading_sql_data_not_permitted",
426
+ "39P01": "trigger_protocol_violated",
427
+ "39P02": "srf_protocol_violated",
428
+ "39P03": "event_trigger_protocol_violated",
429
+ "3B000": "savepoint_exception",
430
+ "3B001": "invalid_savepoint_specification",
431
+ "3D000": "invalid_catalog_name",
432
+ "3F000": "invalid_schema_name",
433
+ "40P01": "deadlock_detected",
434
+ "42P20": "windowing_error",
435
+ "42P19": "invalid_recursion",
436
+ "42P18": "indeterminate_datatype",
437
+ "42P21": "collation_mismatch",
438
+ "42P22": "indeterminate_collation",
439
+ "428C9": "generated_always",
440
+ "42P01": "undefined_table",
441
+ "42P02": "undefined_parameter",
442
+ "42P03": "duplicate_cursor",
443
+ "42P04": "duplicate_database",
444
+ "42P05": "duplicate_prepared_statement",
445
+ "42P06": "duplicate_schema",
446
+ "42P07": "duplicate_table",
447
+ "42P08": "ambiguous_parameter",
448
+ "42P09": "ambiguous_alias",
449
+ "42P10": "invalid_column_reference",
450
+ "42P11": "invalid_cursor_definition",
451
+ "42P12": "invalid_database_definition",
452
+ "42P13": "invalid_function_definition",
453
+ "42P14": "invalid_prepared_statement_definition",
454
+ "42P15": "invalid_schema_definition",
455
+ "42P16": "invalid_table_definition",
456
+ "42P17": "invalid_object_definition",
457
+ "55P02": "cant_change_runtime_param",
458
+ "55P03": "lock_not_available",
459
+ "55P04": "unsafe_new_enum_value_usage",
460
+ "57P01": "admin_shutdown",
461
+ "57P02": "crash_shutdown",
462
+ "57P03": "cannot_connect_now",
463
+ "57P04": "database_dropped",
464
+ "58P01": "undefined_file",
465
+ "58P02": "duplicate_file",
466
+ F0000: "config_file_error",
467
+ F0001: "lock_file_exists",
468
+ HV000: "fdw_error",
469
+ HV005: "fdw_column_name_not_found",
470
+ HV002: "fdw_dynamic_parameter_value_needed",
471
+ HV010: "fdw_function_sequence_error",
472
+ HV021: "fdw_inconsistent_descriptor_information",
473
+ HV024: "fdw_invalid_attribute_value",
474
+ HV007: "fdw_invalid_column_name",
475
+ HV008: "fdw_invalid_column_number",
476
+ HV004: "fdw_invalid_data_type",
477
+ HV006: "fdw_invalid_data_type_descriptors",
478
+ HV091: "fdw_invalid_descriptor_field_identifier",
479
+ HV00B: "fdw_invalid_handle",
480
+ HV00C: "fdw_invalid_option_index",
481
+ HV00D: "fdw_invalid_option_name",
482
+ HV090: "fdw_invalid_string_length_or_buffer_length",
483
+ HV00A: "fdw_invalid_string_format",
484
+ HV009: "fdw_invalid_use_of_null_pointer",
485
+ HV014: "fdw_too_many_handles",
486
+ HV001: "fdw_out_of_memory",
487
+ HV00P: "fdw_no_schemas",
488
+ HV00J: "fdw_option_name_not_found",
489
+ HV00K: "fdw_reply_handle",
490
+ HV00Q: "fdw_schema_not_found",
491
+ HV00R: "fdw_table_not_found",
492
+ HV00L: "fdw_unable_to_create_execution",
493
+ HV00M: "fdw_unable_to_create_reply",
494
+ HV00N: "fdw_unable_to_establish_connection",
495
+ P0000: "plpgsql_error",
496
+ P0001: "raise_exception",
497
+ P0002: "no_data_found",
498
+ P0003: "too_many_rows",
499
+ P0004: "assert_failure",
500
+ XX000: "internal_error",
501
+ XX001: "data_corrupted",
502
+ XX002: "index_corrupted",
503
+ };
245
504
 
246
505
  //@ts-ignore
247
506
  return c2[code] || errs[code] || code;
@@ -250,5 +509,4 @@ export const sqlErrCodeToMsg = (code: string) => {
250
509
  https://www.postgresql.org/docs/13/errcodes-appendix.html
251
510
  JSON.stringify([...THE_table_$0.rows].map(t => [...t.children].map(u => u.innerText)).filter((d, i) => i && d.length > 1).reduce((a, v)=>({ ...a, [v[0]]: v[1] }), {}))
252
511
  */
253
- }
254
-
512
+ };