prostgles-server 4.2.639 → 4.2.641

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 (98) hide show
  1. package/debug/diff-review-build.log +4 -0
  2. package/debug/diff-review-test-server.log +551 -0
  3. package/debug/diff-review-tests-build.log +0 -0
  4. package/debug/nested-aggregate-build.log +4 -0
  5. package/debug/nested-aggregate-test-compile.log +0 -0
  6. package/debug/nested-aggregate-test-server.log +586 -0
  7. package/debug/sort-query-build.log +4 -0
  8. package/debug/sort-query-tests-build.log +0 -0
  9. package/debug/sync-logging-build.log +4 -0
  10. package/debug/sync-logging-main.log +688 -0
  11. package/debug/sync-logging-server-build.log +0 -0
  12. package/debug/sync-race-client-build.log +12 -0
  13. package/debug/sync-race-main-e2e-final.log +659 -0
  14. package/debug/sync-race-main-e2e.log +643 -0
  15. package/debug/sync-race-server-build.log +11 -0
  16. package/debug/sync-race-test-lib-final.log +59 -0
  17. package/debug/sync-race-test-lib.log +59 -0
  18. package/debug/sync-review-build.log +4 -0
  19. package/debug/sync-review-client-build.log +0 -0
  20. package/debug/sync-review-main-final.log +685 -0
  21. package/debug/sync-review-main.log +644 -0
  22. package/debug/sync-review-server-build.log +0 -0
  23. package/debug/sync-review-syncData.js +147 -0
  24. package/debug/sync-review-without-reconcile.log +647 -0
  25. package/dist/Auth/AuthHandler.d.ts +2 -2
  26. package/dist/Auth/AuthHandler.d.ts.map +1 -1
  27. package/dist/Auth/AuthHandler.js.map +1 -1
  28. package/dist/Auth/AuthTypes.d.ts +2 -2
  29. package/dist/Auth/AuthTypes.d.ts.map +1 -1
  30. package/dist/Auth/utils/getClientRequestIPsInfo.d.ts +2 -2
  31. package/dist/Auth/utils/getClientRequestIPsInfo.d.ts.map +1 -1
  32. package/dist/DBEventsManager.d.ts +5 -5
  33. package/dist/DBEventsManager.d.ts.map +1 -1
  34. package/dist/DBEventsManager.js.map +1 -1
  35. package/dist/DboBuilder/DboBuilderTypes.d.ts +1 -1
  36. package/dist/DboBuilder/DboBuilderTypes.d.ts.map +1 -1
  37. package/dist/DboBuilder/QueryBuilder/getJoinQuery.d.ts.map +1 -1
  38. package/dist/DboBuilder/QueryBuilder/getJoinQuery.js +4 -3
  39. package/dist/DboBuilder/QueryBuilder/getJoinQuery.js.map +1 -1
  40. package/dist/DboBuilder/dboBuilderUtils.d.ts +1 -1
  41. package/dist/DboBuilder/dboBuilderUtils.d.ts.map +1 -1
  42. package/dist/DboBuilder/dboBuilderUtils.js +3 -2
  43. package/dist/DboBuilder/dboBuilderUtils.js.map +1 -1
  44. package/dist/DboBuilder/runSql/QueryStreamer.d.ts +2 -2
  45. package/dist/DboBuilder/runSql/QueryStreamer.d.ts.map +1 -1
  46. package/dist/Logging.d.ts +4 -0
  47. package/dist/Logging.d.ts.map +1 -1
  48. package/dist/Prostgles.d.ts +4 -4
  49. package/dist/Prostgles.d.ts.map +1 -1
  50. package/dist/Prostgles.js.map +1 -1
  51. package/dist/ProstglesTypes.d.ts +3 -3
  52. package/dist/ProstglesTypes.d.ts.map +1 -1
  53. package/dist/PubSubManager/PubSubManager.d.ts +8 -7
  54. package/dist/PubSubManager/PubSubManager.d.ts.map +1 -1
  55. package/dist/PubSubManager/PubSubManager.js.map +1 -1
  56. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.d.ts +2 -2
  57. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.d.ts.map +1 -1
  58. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.js +1 -3
  59. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.js.map +1 -1
  60. package/dist/PubSubManager/SyncReplication/logSyncError.d.ts +6 -0
  61. package/dist/PubSubManager/SyncReplication/logSyncError.d.ts.map +1 -0
  62. package/dist/PubSubManager/SyncReplication/logSyncError.js +18 -0
  63. package/dist/PubSubManager/SyncReplication/logSyncError.js.map +1 -0
  64. package/dist/PubSubManager/SyncReplication/syncData.d.ts.map +1 -1
  65. package/dist/PubSubManager/SyncReplication/syncData.js +48 -27
  66. package/dist/PubSubManager/SyncReplication/syncData.js.map +1 -1
  67. package/dist/PubSubManager/addSync.d.ts.map +1 -1
  68. package/dist/PubSubManager/addSync.js +3 -3
  69. package/dist/PubSubManager/addSync.js.map +1 -1
  70. package/dist/PubSubManager/addTrigger.d.ts +2 -2
  71. package/dist/PubSubManager/addTrigger.d.ts.map +1 -1
  72. package/dist/PubSubManager/addTrigger.js.map +1 -1
  73. package/dist/WebsocketAPI/onSocketConnected.d.ts +2 -2
  74. package/dist/WebsocketAPI/onSocketConnected.d.ts.map +1 -1
  75. package/dist/WebsocketAPI/onSocketConnected.js.map +1 -1
  76. package/dist/WebsocketAPI/pushSocketSchema.d.ts +2 -2
  77. package/dist/WebsocketAPI/pushSocketSchema.d.ts.map +1 -1
  78. package/dist/WebsocketAPI/pushSocketSchema.js.map +1 -1
  79. package/lib/Auth/AuthHandler.ts +2 -2
  80. package/lib/Auth/AuthTypes.ts +2 -2
  81. package/lib/Auth/utils/getClientRequestIPsInfo.ts +2 -2
  82. package/lib/DBEventsManager.ts +5 -5
  83. package/lib/DboBuilder/DboBuilderTypes.ts +1 -1
  84. package/lib/DboBuilder/QueryBuilder/getJoinQuery.ts +5 -4
  85. package/lib/DboBuilder/dboBuilderUtils.ts +7 -2
  86. package/lib/DboBuilder/runSql/QueryStreamer.ts +2 -2
  87. package/lib/Logging.ts +5 -0
  88. package/lib/Prostgles.ts +2 -2
  89. package/lib/ProstglesTypes.ts +3 -3
  90. package/lib/PubSubManager/PubSubManager.ts +7 -6
  91. package/lib/PubSubManager/SyncReplication/getSyncUtilFunctions.ts +3 -8
  92. package/lib/PubSubManager/SyncReplication/logSyncError.ts +22 -0
  93. package/lib/PubSubManager/SyncReplication/syncData.ts +54 -30
  94. package/lib/PubSubManager/addSync.ts +3 -4
  95. package/lib/PubSubManager/addTrigger.ts +2 -2
  96. package/lib/WebsocketAPI/onSocketConnected.ts +2 -2
  97. package/lib/WebsocketAPI/pushSocketSchema.ts +2 -2
  98. package/package.json +1 -1
@@ -0,0 +1,685 @@
1
+
2
+ > server_tests@1.0.0 test-client
3
+ > TEST_TYPE=client node --trace-uncaught --test dist/server/index.js
4
+
5
+ Prostgles: SQL file executed successfuly /home/s/prostgles-server-js/tests/server/init.sql
6
+ Running queries: /* prostgles internal query that should be excluded from schema watch */
7
+
8
+ DROP TABLE IF EXISTS "lookup_col1" CASCADE;
9
+ CREATE TABLE IF NOT EXISTS "lookup_col1" (
10
+ id TEXT PRIMARY KEY
11
+ , "description" TEXT
12
+ );
13
+ Running queries: /* prostgles internal query that should be excluded from schema watch */
14
+
15
+ CREATE TABLE "files" (
16
+ "id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
17
+ "storage_key" UUID UNIQUE ,
18
+ "extension" TEXT NOT NULL DEFAULT '' ,
19
+ "content_type" TEXT NOT NULL DEFAULT '' ,
20
+ "content_length" BIGINT NOT NULL DEFAULT 0 ,
21
+ "etag" TEXT NOT NULL DEFAULT '' ,
22
+ "original_name" TEXT NOT NULL ,
23
+ "original_last_modified" TIMESTAMPTZ ,
24
+ "description" TEXT ,
25
+ "url" TEXT NOT NULL DEFAULT '' ,
26
+ "cloud_url" TEXT ,
27
+ "signed_url" TEXT ,
28
+ "signed_url_expires" BIGINT ,
29
+ "added" TIMESTAMP NOT NULL DEFAULT NOW() ,
30
+ "updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
31
+ "deleted" TIMESTAMPTZ ,
32
+ "deleted_from_storage" TIMESTAMPTZ ,
33
+ "data" BYTEA NOT NULL CHECK (data = decode('01', 'hex')) ,
34
+ "version" INTEGER NOT NULL DEFAULT 1 ,
35
+ "metadata" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"description":{"type":"string"}}}'::TEXT, "metadata", '{"table":"files","column":"metadata"}' ))
36
+ );
37
+ CREATE TABLE "files_versions" (
38
+ "id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
39
+ "storage_key" UUID NOT NULL ,
40
+ "extension" TEXT NOT NULL DEFAULT '' ,
41
+ "content_type" TEXT NOT NULL DEFAULT '' ,
42
+ "content_length" BIGINT NOT NULL DEFAULT 0 ,
43
+ "etag" TEXT NOT NULL DEFAULT '' ,
44
+ "original_name" TEXT NOT NULL ,
45
+ "original_last_modified" TIMESTAMPTZ ,
46
+ "description" TEXT ,
47
+ "url" TEXT NOT NULL DEFAULT '' ,
48
+ "cloud_url" TEXT ,
49
+ "signed_url" TEXT ,
50
+ "signed_url_expires" BIGINT ,
51
+ "added" TIMESTAMP NOT NULL DEFAULT NOW() ,
52
+ "updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
53
+ "deleted" TIMESTAMPTZ ,
54
+ "deleted_from_storage" TIMESTAMPTZ ,
55
+ "file_id" UUID NOT NULL ,
56
+ "version" INTEGER NOT NULL ,
57
+ "created" TIMESTAMP NOT NULL DEFAULT NOW() ,
58
+ "metadata" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"description":{"type":"string"}}}'::TEXT, "metadata", '{"table":"files_versions","column":"metadata"}' ))
59
+ );
60
+ ALTER TABLE "files_versions" ADD CONSTRAINT "prostgles_file_version_e24fec525e76b3433749621f589d35d9" FOREIGN KEY (file_id) REFERENCES "files"(id) ON DELETE CASCADE;
61
+ CREATE UNIQUE INDEX "prostgles_file_version_9692aae50022f45f1098646939b287b1_key" ON "files_versions" (file_id, version);
62
+ COMMENT ON INDEX "prostgles_file_version_9692aae50022f45f1098646939b287b1_key" IS 'd4af15d064cae99adac0c1194199a9e3';
63
+ CREATE TABLE "users_public_info" (
64
+ "id" SERIAL PRIMARY KEY ,
65
+ "name" TEXT ,
66
+ "avatar" UUID REFERENCES files ON DELETE CASCADE ,
67
+ "sid" TEXT
68
+ );
69
+ DROP TABLE IF EXISTS "users";
70
+ CREATE TABLE "users" (
71
+ "id" SERIAL PRIMARY KEY ,
72
+ "email" TEXT NOT NULL ,
73
+ "status" TEXT NOT NULL CHECK("status" = 'active' OR "status" = 'disabled' OR "status" = 'pending'),
74
+ "type" TEXT NOT NULL ,
75
+ "preferences" JSONB NOT NULL CHECK(prostgles.validate_jsonb_schema('{"type":{"showIntro":{"type":"boolean","optional":true},"theme":{"enum":["light","dark","auto"],"optional":true},"others":{"type":"any[]"}}}'::TEXT, "preferences", '{"table":"users","column":"preferences"}' ))
76
+ );
77
+ DROP TABLE IF EXISTS "tjson";
78
+ CREATE TABLE "tjson" (
79
+ "json" JSONB NOT NULL CHECK(prostgles.validate_jsonb_schema('{"type":{"a":{"type":"boolean"},"arr":{"enum":["1","2","3"]},"arr1":{"enum":[1,2,3]},"arr2":{"type":"integer[]"},"arrStr":{"type":"string[]","optional":true,"nullable":true},"o":{"optional":true,"nullable":true,"oneOfType":[{"o1":"integer"},{"o2":"boolean"}]}}}'::TEXT, "json", '{"table":"tjson","column":"json"}' )),
80
+ "colOneOf" TEXT NOT NULL CHECK("colOneOf" = 'a' OR "colOneOf" = 'b' OR "colOneOf" = 'c'),
81
+ "status" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"oneOfType":[{"ok":{"type":"string"}},{"err":{"type":"string"}},{"loading":{"type":{"loaded":{"type":"number"},"total":{"type":"number"}}}}]}'::TEXT, "status", '{"table":"tjson","column":"status"}' )),
82
+ "jsonOneOf" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"oneOfType":[{"command":{"enum":["a"]}},{"command":{"enum":["b"]},"option":{"type":"integer[]"}}]}'::TEXT, "jsonOneOf", '{"table":"tjson","column":"jsonOneOf"}' )),
83
+ "table_config" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"referencedTables":{"optional":true,"arrayOfType":{"name":"string","minFiles":"number"}},"recType":{"nullable":true,"optional":true,"record":{"keysEnum":["a","b"],"values":{"type":{"bools":"boolean[]"}}}}}}'::TEXT, "table_config", '{"table":"tjson","column":"table_config"}' ))
84
+ );
85
+ Running queries: /* prostgles internal query that should be excluded from schema watch */
86
+
87
+ ALTER TABLE "uuid_text" ADD FOREIGN KEY (col1) REFERENCES lookup_col1(id);
88
+ ALTER TABLE "uuid_text" ADD FOREIGN KEY (col2) REFERENCES lookup_col1(id);
89
+ ALTER TABLE "uuid_text" ADD FOREIGN KEY (col3) REFERENCES lookup_col1(id);
90
+ DROP TABLE IF EXISTS "api_table";
91
+ CREATE TABLE "api_table" (
92
+ "id" SERIAL PRIMARY KEY
93
+ );
94
+ Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
95
+ Prostgles: Created typescript schema definition file:
96
+ DBGeneratedSchema.ts
97
+ (server): prostgles onReady
98
+ (server): Waiting for client...
99
+ (client) t+ 0ms Started client...
100
+ onSocketConnect 5DPoR_NA9ZYnvqM6AAAA
101
+ (server): Client connected -> console does not work. use log function. socket.id: 5DPoR_NA9ZYnvqM6AAAA
102
+ (client) t+ 55ms Client connect.
103
+ (client) t+ 168ms TEST_NAME: main Started
104
+ Client log (client) t+ 183ms Starting isomorphic queries
105
+ ▶ Isomorphic queries
106
+ ✔ Deleting stale data (11.533088ms)
107
+ {
108
+ message: 'malformed array literal: "a"',
109
+ length: 149,
110
+ name: 'error',
111
+ severity: 'ERROR',
112
+ code: '22P02',
113
+ detail: 'Array value must start with "{" or dimension information.',
114
+ position: '325',
115
+ file: 'arrayfuncs.c',
116
+ line: '262',
117
+ routine: 'array_in',
118
+ query: '-- prostgles query id: d36b594f-74f9-4eb3-818b-94645393dffd\n' +
119
+ 'SET LOCAL "prostgles.user" \n' +
120
+ `TO '{"id":"1","type":"public"}';\n` +
121
+ 'SELECT \n' +
122
+ ' "prostgles_root_table_alias"."id" AS "id", \n' +
123
+ ' "prostgles_root_table_alias"."h" AS "h", \n' +
124
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
125
+ ' FROM ( \n' +
126
+ ' SELECT * \n' +
127
+ ' FROM items \n' +
128
+ ` WHERE "h" = 'a' \n` +
129
+ ' ) prostgles_root_table_alias \n' +
130
+ ' LIMIT 0',
131
+ code_info: 'invalid_text_representation'
132
+ }
133
+ {
134
+ message: 'malformed array literal: "a"',
135
+ length: 149,
136
+ name: 'error',
137
+ severity: 'ERROR',
138
+ code: '22P02',
139
+ detail: 'Array value must start with "{" or dimension information.',
140
+ position: '325',
141
+ file: 'arrayfuncs.c',
142
+ line: '262',
143
+ routine: 'array_in',
144
+ query: '-- prostgles query id: 6bcd0991-f148-48a7-83c4-bd79bf9334ff\n' +
145
+ 'SET LOCAL "prostgles.user" \n' +
146
+ `TO '{"id":"1","type":"public"}';\n` +
147
+ 'SELECT \n' +
148
+ ' "prostgles_root_table_alias"."id" AS "id", \n' +
149
+ ' "prostgles_root_table_alias"."h" AS "h", \n' +
150
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
151
+ ' FROM ( \n' +
152
+ ' SELECT * \n' +
153
+ ' FROM items \n' +
154
+ ` WHERE "h" = 'a' \n` +
155
+ ' ) prostgles_root_table_alias \n' +
156
+ ' LIMIT 0',
157
+ code_info: 'invalid_text_representation'
158
+ }
159
+ ✔ Error structure malformed array literal (40.913251ms)
160
+ ✔ Table info (2.419503ms)
161
+ ✔ Prepare data (65.110389ms)
162
+ ✔ Test bytea (23.470867ms)
163
+ ✔ abortSignal terminates a running query (5552.467708ms)
164
+ ✔ Client queries are aborted no more than after n seconds (14013.04466ms)
165
+ ✔ Subscription tracked_columns get merged correctly (0.566719ms)
166
+ Created PubSubManager
167
+ ✔ Aggregate subscription tracks FILTER and ORDER BY dependencies (1030.511143ms)
168
+ ✔ CASE select and subscription dependencies (660.412477ms)
169
+ ✔ Subscription tracks non-selected ORDER BY columns (661.607547ms)
170
+ ✔ merge json (16.804604ms)
171
+ ✔ json array converted to pg array filter bug (3.119549ms)
172
+ ✔ onConflict do update (10.827449ms)
173
+ ✔ Local file upload (54.260157ms)
174
+ ✔ Local file delete (18.910838ms)
175
+ ✔ Local file update (55.549833ms)
176
+ ✔ getColumns definition (4.377103ms)
177
+ ✔ returnType (2.190279ms)
178
+ ✔ Table config triggers (11.249279ms)
179
+ ✔ $unnest_words (2.125494ms)
180
+ ✔ Group by/Distinct (3.080684ms)
181
+ ✔ sql returntype default-with-rollback (31.229438ms)
182
+ ✔ returnType: value (2.207776ms)
183
+ ✔ PostgreSQL array element (7.992951ms)
184
+ ✔ FTS filtering (10.976158ms)
185
+ ✔ $term_highlight (8.821189ms)
186
+ ✔ funcFilters: $term_highlight (3.025961ms)
187
+ Client log (client) t+ 22522ms [{"name":null}]
188
+ Client log (client) t+ 22527ms [{"name":"zz3zz1"}]
189
+ Pushing 1 rows to socket x9
190
+ Client log (client) t+ 23175ms []
191
+ ✔ subscribe skipChangedColumnsCheck false by default = sub should not fire if selected data did not change (873.171155ms)
192
+ Pushing 0 rows to socket
193
+ Client log (client) t+ 25915ms [{"name":null}]
194
+ Client log (client) t+ 25921ms [{"name":"zz3zz1"}]
195
+ Client log (client) t+ 26128ms [{"name":"zz3zz1"}]
196
+ Client log (client) t+ 26343ms [{"name":"zz3zz1"}]
197
+ Pushing 1 rows to socket x4
198
+ Client log (client) t+ 26548ms []
199
+ ✔ subscribe skipChangedColumnsCheck true (3375.51524ms)
200
+ Pushing 0 rows to socket
201
+ Pushing 1 rows to socket x4
202
+ Client log unsubscribe start - various
203
+ Client log unsubscribe end - various
204
+ ✔ subscribe (61.052396ms)
205
+ Pushing 0 rows to socket
206
+ Pushing 1 rows to socket
207
+ ✔ subscribe to schema.table (20.67697ms)
208
+ Pushing 2 rows to socket
209
+ ✔ parallel subscriptions (2013.240254ms)
210
+ Client log (client) t+ 33057ms updateAll done in 1706
211
+ Client log (client) t+ 34680ms updateAll done in 1619
212
+ Pushing 0 rows to socket
213
+ Pushing 3 rows to socket
214
+ Client log (client) t+ 35225ms Locks: [{"pid":273,"blocking_pids":[269],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1003'\n WHERE id = 1003;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1002'\n WHERE id = 1002;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
215
+ Client log (client) t+ 35240ms Locks: [{"pid":273,"blocking_pids":[265],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1016'\n WHERE id = 1016;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":null}]
216
+ Client log (client) t+ 35359ms Locks: [{"pid":252,"blocking_pids":[273],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1102'\n WHERE id = 1102;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1103'\n WHERE id = 1103;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
217
+ Client log (client) t+ 35392ms Locks: [{"pid":268,"blocking_pids":[270],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1130'\n WHERE id = 1130;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1131'\n WHERE id = 1131;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
218
+ Client log (client) t+ 35415ms Locks: [{"pid":274,"blocking_pids":[272],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1148'\n WHERE id = 1148;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1147'\n WHERE id = 1147;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
219
+ Client log (client) t+ 35756ms Locks: [{"pid":270,"blocking_pids":[],"wait_event":null,"wait_event_type":null,"query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1396'\n WHERE id = 1396;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":null}]
220
+ Client log (client) t+ 35814ms Locks: [{"pid":270,"blocking_pids":[274],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1437'\n WHERE id = 1437;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1436'\n WHERE id = 1436;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
221
+ Client log (client) t+ 35924ms Locks: [{"pid":271,"blocking_pids":[272],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1512'\n WHERE id = 1512;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":null}]
222
+ Client log (client) t+ 35939ms Locks: [{"pid":273,"blocking_pids":[270],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1522'\n WHERE id = 1522;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1520'\n WHERE id = 1520;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
223
+ Client log (client) t+ 35953ms Locks: [{"pid":268,"blocking_pids":[252],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1528'\n WHERE id = 1528;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1530'\n WHERE id = 1530;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
224
+ Client log (client) t+ 36032ms Locks: [{"pid":274,"blocking_pids":[271],"wait_event":null,"wait_event_type":null,"query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1587'\n WHERE id = 1587;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1588'\n WHERE id = 1588;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
225
+ Client log (client) t+ 36061ms Locks: [{"pid":252,"blocking_pids":[269],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1607'\n WHERE id = 1607;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":null}]
226
+ Client log (client) t+ 36069ms Locks: [{"pid":265,"blocking_pids":[268],"wait_event":"PgSleep","wait_event_type":"Timeout","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1612'\n WHERE id = 1612;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1613'\n WHERE id = 1613;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
227
+ Client log (client) t+ 36542ms Locks: [{"pid":273,"blocking_pids":[274],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1947'\n WHERE id = 1947;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1948'\n WHERE id = 1948;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
228
+ Client log (client) t+ 36582ms Locks: [{"pid":270,"blocking_pids":[273],"wait_event":null,"wait_event_type":null,"query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1977'\n WHERE id = 1977;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":null}]
229
+ Pushing 996 rows to socket
230
+ Client log (client) t+ 36614ms updateAll done in 1925
231
+ Pushing 1000 rows to socket x2
232
+ ✔ subscriptions do not serialize transactions (9780.960648ms)
233
+ Pushing 3 rows to socket
234
+ Pushing 1 rows to socket
235
+ throttling sub for 1700 ms
236
+ throttling finished. pushSubData...
237
+ Pushing 1 rows to socket
238
+ throttling sub for 1700 ms
239
+ ✔ subscribeOne with throttle (1764.753899ms)
240
+ throttling sub for 1700 ms
241
+ throttling finished. pushSubData...
242
+ ✔ subscribeOne with throttle skipFirst: true (1703.376448ms)
243
+ Pushing 1 rows to socket
244
+ throttling finished. pushSubData...
245
+ Pushing 1 rows to socket
246
+ ✔ subscribeOne without skipFirst (1019.020619ms)
247
+ Pushing 0 rows to socket
248
+ Pushing 1 rows to socket
249
+ ✔ subscribeOne with skipFirst: true (1540.544722ms)
250
+ Pushing 0 rows to socket x2
251
+ ✔ subscribeOne actions: { insert: true } (1552.50546ms)
252
+ Pushing 1 rows to socket
253
+ ✔ subscribeOne actions: { insert: false } (1556.744529ms)
254
+ ✔ JSON filtering (4.825935ms)
255
+ ✔ Complex filtering (4.088346ms)
256
+ ✔ template_string function (4.421227ms)
257
+ ✔ Between filtering (3.262849ms)
258
+ ✔ In filtering (2.913085ms)
259
+ ✔ Order by (3.494873ms)
260
+ ✔ Order by aliased func (2.025427ms)
261
+ ✔ Filter by aliased func (2.04301ms)
262
+ ✔ Count with Filter by aliased func (2.580951ms)
263
+ ✔ Count with Aggregate and Filter by aliased func (2.449897ms)
264
+ ✔ Count with complex filter (2.288744ms)
265
+ ✔ Order by aggregation (1.838887ms)
266
+ ✔ Aggregate FILTER and ORDER BY (2.081589ms)
267
+ ✔ Column alias func (2.104804ms)
268
+ ✔ Order by colliding alias name (1.886358ms)
269
+ ✔ Update batch example (17.606593ms)
270
+ Client log TODO: socket.io stringifies dates
271
+ ✔ Function example (23.98571ms)
272
+ ✔ JSONB filtering (13.127625ms)
273
+ ✔ Postgis examples (11.597941ms)
274
+ ✔ jsonbSchema validation (16.648766ms)
275
+ ✔ find and findOne (5.479741ms)
276
+ ✔ Result size (3.580726ms)
277
+ ✔ Basic exists (3.927052ms)
278
+ ✔ Basic fts with shorthand notation (8.714674ms)
279
+ ✔ Exists with shortest path wildcard filter example (5.098996ms)
280
+ ✔ Exists with exact path filter example (2.199943ms)
281
+ ✔ Not Exists with exact path filter example (2.283518ms)
282
+ ✔ Upsert example (14.040256ms)
283
+ ✔ Joins example (2.205126ms)
284
+ ✔ Joins repeating table example (2.614384ms)
285
+ ✔ Join aggregate functions example (6.279214ms)
286
+ ✔ $rowhash example (3.910367ms)
287
+ ✔ Reference column nested insert (5.517447ms)
288
+ ✔ Join escaped table names with quotes (9.778532ms)
289
+ Pushing 0 rows to socket x2
290
+ Client log (client) t+ 47970ms {
291
+ "item": {
292
+ "\"id0\"": 1,
293
+ "\"quoted1_id\"": 1,
294
+ "\"text_col0\"": "0"
295
+ },
296
+ "runs": 0
297
+ }
298
+ Client log (client) t+ 47974ms {
299
+ "item": {
300
+ "\"id0\"": 1,
301
+ "\"quoted1_id\"": 1,
302
+ "\"text_col0\"": "1"
303
+ },
304
+ "runs": 1
305
+ }
306
+ Client log unsubscribe start - """quoted0"""
307
+ Client log unsubscribe end - """quoted0"""
308
+ ✔ subscribe to escaped table name (11.155044ms)
309
+ Pushing 1 rows to socket x2
310
+ ✔ subscribe using a filter bigger than block_size (14.781048ms)
311
+ ✔ Reverse join with agg (13.396715ms)
312
+ Pushing 0 rows to socket
313
+ Client log {"_rows":[{"id":1,"t1":null,"tr2":[{"id":1,"tr1_id":1,"t1":"a","t2":"b"}],"tr3":[]},{"id":2,"t1":null,"tr2":[{"id":2,"tr1_id":2,"t1":"a","t2":"b"}],"tr3":[]}],"runs":1}
314
+ Client log {"_rows":[{"id":1,"t1":null,"tr2":[{"id":1,"tr1_id":1,"t1":"a","t2":"b"},{"id":3,"tr1_id":1,"t1":"a","t2":"b"}],"tr3":[]},{"id":2,"t1":null,"tr2":[{"id":2,"tr1_id":2,"t1":"a","t2":"b"}],"tr3":[]}],"runs":2}
315
+ ✔ Related table subscribe (9058.178644ms)
316
+ Pushing 2 rows to socket x2
317
+ ✔ Aggregate FILTER registers joined dependency triggers (656.556761ms)
318
+ ✔ Nested sort by computed col (7.401268ms)
319
+ ✔ Nested function on different than source column getNewQuery name bug fix (2.662029ms)
320
+ ✔ Reference column deep nested insert (18.817853ms)
321
+ ✔ Multi reference column nested insert (17.220463ms)
322
+ ✔ Join path with order by nested (16.37312ms)
323
+ ✔ Self join (25.511288ms)
324
+ ✔ One to many multi join duplicate row bug fix (23.807837ms)
325
+ Client log (client) t+ 57841ms various id=99 count 1
326
+ Pushing 1 rows to socket x3
327
+ Client log (client) t+ 57845ms various id=99 count
328
+ Client log ok
329
+ Error within running subscription
330
+ _psqlWS_..various.{"id":99}.{"select":{"name":1}}.m.sub {
331
+ message: 'column prostgles_root_table_alias.name does not exist',
332
+ length: 130,
333
+ name: 'error',
334
+ severity: 'ERROR',
335
+ code: '42703',
336
+ position: '133',
337
+ file: 'parse_relation.c',
338
+ line: '3716',
339
+ routine: 'errorMissingColumn',
340
+ query: '-- prostgles query id: 329d3470-8c6a-4bfb-8b1b-69eb55991e30\n' +
341
+ 'SET LOCAL "prostgles.user" \n' +
342
+ `TO '{"id":"1","type":"public"}';\n` +
343
+ 'SELECT \n' +
344
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
345
+ ' FROM ( \n' +
346
+ ' SELECT * \n' +
347
+ ' FROM various \n' +
348
+ ' WHERE "id" = 99 \n' +
349
+ ' ) prostgles_root_table_alias \n' +
350
+ ' LIMIT 1000',
351
+ code_info: 'undefined_column'
352
+ }
353
+ Client log (client) t+ 59865ms various id=99 count
354
+ Client log (client) t+ 59865ms Error in subscription callback: {"message":"column prostgles_root_table_alias.name does not exist","length":130,"name":"error","severity":"ERROR","code":"42703","position":"133","file":"parse_relation.c","line":"3716","routine":"errorMissingColumn","query":"-- prostgles query id: 329d3470-8c6a-4bfb-8b1b-69eb55991e30\nSET LOCAL \"prostgles.user\" \nTO '{\"id\":\"1\",\"type\":\"public\"}';\nSELECT \n \"prostgles_root_table_alias\".\"name\" AS \"name\" \n FROM ( \n SELECT * \n FROM various \n WHERE \"id\" = 99 \n ) prostgles_root_table_alias \n LIMIT 1000","code_info":"undefined_column"}
355
+ Client log ok
356
+ ✔ subscribe triggers with stale schema should fail gracefully and never block other queries (6559.639489ms)
357
+ ✔ Isomorphic queries (64203.698886ms)
358
+ ✔ Having clause (3.679871ms)
359
+ ✔ Having clause with complex filter (2.540301ms)
360
+ Client log (client) t+ 64407ms auth.user: {"sid":"main","uid":"1","id":"1","type":"public"}
361
+ ✔ Nested join having clause (3.876884ms)
362
+ ▶ isomorphic typed queries
363
+ ✔ isLookupTable DB Types from colConf (0.194114ms)
364
+ ✔ isLookupTable DB Types from reference column actual definition (0.101737ms)
365
+ ✔ isLookupTable pkey column itself is typed (0.075603ms)
366
+ ✔ isomorphic typed queries (0.533529ms)
367
+ ▶ Client only queries
368
+ ✔ modifyClientSchema adds custom table and column metadata (3.858042ms)
369
+ ✔ SQL Stream more than 1k records (23.92187ms)
370
+ ✔ SQL Stream persistedConnection with streamLimit works for subsequent queries (13.758264ms)
371
+ ✔ SQL Stream ensure the connection is never released (same pg_backend_pid is the same for subsequent) when using persistConnectionId (14.261896ms)
372
+ ✔ SQL Stream stop kills the query (1020.76937ms)
373
+ ✔ SQL Stream limit works (21.843087ms)
374
+ ✔ SQL Stream stop with terminate kills the query (expect flakiness) (136.990585ms)
375
+ ✔ SQL Stream (16.074266ms)
376
+ ✔ SQL Stream parallel execution + parameters (13.241801ms)
377
+ ✔ SQL Stream query error structure matches default sql run error (11.792064ms)
378
+ ✔ SQL Stream streamLimit (12.078012ms)
379
+ ✔ SQL Stream table fields are the same as on default request (27.93197ms)
380
+ ✔ SQL Stream works for multiple statements (13.997905ms)
381
+ Client log (client) t+ 65756ms Checking public data
382
+ ✔ Check tableSchema (17.569625ms)
383
+ ✔ Security rules example (35.487949ms)
384
+ Client log (client) t+ 65802ms Started testRealtime
385
+ Client log (client) t+ 65830ms 1790258786040: sub stats: x10 -> 0 x20 ->0
386
+ Client log (client) t+ 65840ms 1790258786050: sync stats: x10 -> 0 x20 -> 0
387
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 0)
388
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 1)
389
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 2)
390
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 3)
391
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 4)
392
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 5)
393
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 6)
394
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 7)
395
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 8)
396
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 9)
397
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 10)
398
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 11)
399
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 12)
400
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 13)
401
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 14)
402
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 15)
403
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 16)
404
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 17)
405
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 18)
406
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 19)
407
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 20)
408
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 21)
409
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 22)
410
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 23)
411
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 24)
412
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 25)
413
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 26)
414
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 27)
415
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 28)
416
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 29)
417
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 30)
418
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 31)
419
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 32)
420
+ Client log (client) t+ 65841ms 1790258786051: sync: p.$update({ x: 10 }); (id: 33)
421
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 34)
422
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 35)
423
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 36)
424
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 37)
425
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 38)
426
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 39)
427
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 40)
428
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 41)
429
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 42)
430
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 43)
431
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 44)
432
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 45)
433
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 46)
434
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 47)
435
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 48)
436
+ Client log (client) t+ 65842ms 1790258786052: sync: p.$update({ x: 10 }); (id: 49)
437
+ Pushing 0 rows to socket x3
438
+ upsertData (from client): inserted( 0 ) updated( 50 ) total( 50 )
439
+ last insert undefined
440
+ last update {"id":49,"x":10,"y":49,"flight_number":"FN49","last_updated":1790258786052}
441
+ Client log (client) t+ 65916ms 1790258786126: sub stats: x10 -> 50 x20 ->0
442
+ Pushing 50 rows to socket
443
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
444
+ last insert undefined
445
+ last update undefined
446
+ server.syncBatch planes: inserted( 0 ) updated( 50 ) deleted( 0 ) pushed to client( 50 ) total( 100 ) undefined
447
+ Client log (client) t+ 65924ms 1790258786134: sync stats: x10 -> 50 x20 -> 0
448
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 50)
449
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 51)
450
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 52)
451
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 53)
452
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 54)
453
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 55)
454
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 56)
455
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 57)
456
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 58)
457
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 59)
458
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 60)
459
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 61)
460
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 62)
461
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 63)
462
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 64)
463
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 65)
464
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 66)
465
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 67)
466
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 68)
467
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 69)
468
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 70)
469
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 71)
470
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 72)
471
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 73)
472
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 74)
473
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 75)
474
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 76)
475
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 77)
476
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 78)
477
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 79)
478
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 80)
479
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 81)
480
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 82)
481
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 83)
482
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 84)
483
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 85)
484
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 86)
485
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 87)
486
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 88)
487
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 89)
488
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 90)
489
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 91)
490
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 92)
491
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 93)
492
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 94)
493
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 95)
494
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 96)
495
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 97)
496
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 98)
497
+ Client log (client) t+ 65925ms 1790258786135: sync: p.$update({ x: 10 }); (id: 99)
498
+ Client log (client) t+ 65930ms 1790258786140: sync stats: x10 -> 100 x20 -> 0
499
+ upsertData (from WAL): inserted( 0 ) updated( 0 ) total( 1 )
500
+ last insert undefined
501
+ last update undefined
502
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 50 )
503
+ last insert undefined
504
+ last update {"id":50,"x":10,"last_updated":1790258786135}
505
+ Client log (client) t+ 66049ms 1790258786259: sub stats: x10 -> 51 x20 ->0
506
+ Pushing 51 rows to socket
507
+ upsertData (from WAL): inserted( 0 ) updated( 49 ) total( 49 )
508
+ last insert undefined
509
+ last update {"id":99,"x":10,"last_updated":1790258786135}
510
+ Client log (client) t+ 66195ms 1790258786405: sub stats: x10 -> 100 x20 ->0
511
+ Client log (client) t+ 68196ms 1790258788406: sub: db.planes.update({}, { x: 20, last_updated });
512
+ Client log (client) t+ 68213ms 1790258788421: sub: Updated to x20 100
513
+ Pushing 100 rows to socket
514
+ Client log (client) t+ 68222ms 1790258788432: sync stats: x10 -> 50 x20 -> 50
515
+ Client log (client) t+ 68237ms 1790258788447: sync stats: x10 -> 0 x20 -> 100
516
+ ✔ Realtime (2445.483622ms)
517
+ Client log (client) t+ 68237ms 1790258788447: sync end: Finished replication test. Inserting 100 rows then updating two times took: 435ms
518
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
519
+ last insert undefined
520
+ last update undefined x2
521
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 100 ) total( 100 ) undefined
522
+ Client log (client) t+ 68240ms sync handlesOnData true 100
523
+ ✔ sync handlesOnData true -> false no data bug (2002.079161ms)
524
+ ﹣ Security rules example (0.228259ms) # SKIP
525
+ ✔ Client only queries (5832.724735ms)
526
+ ▶ React hooks
527
+ ✔ useFind (527.484554ms)
528
+ {
529
+ message: 'items4.named is invalid/disallowed for filtering. Allowed columns: added, "id", "public", "name"'
530
+ }
531
+ ✔ useSubscribe (530.78116ms)
532
+ ✔ useFindOne (512.977526ms)
533
+ Pushing 1 rows to socket
534
+ {
535
+ message: 'items4.named is invalid/disallowed for filtering. Allowed columns: added, "id", "public", "name"'
536
+ }
537
+ ✔ useSubscribeOne (529.217ms)
538
+ ✔ useCount (516.475121ms)
539
+ ✔ useSize (515.887835ms)
540
+ ✔ useCount planes (256.705548ms)
541
+ Pushing 2 rows to socket
542
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
543
+ last insert undefined
544
+ last update undefined
545
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
546
+ last insert undefined
547
+ last update undefined
548
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
549
+ Client log (client) t+ 73933ms 1790258794143: sync stats: x10 -> 0 x20 -> 99
550
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
551
+ last insert undefined
552
+ last update undefined
553
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 2 ) total( 100 ) undefined
554
+ ✔ useSync (545.096575ms)
555
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
556
+ last insert undefined
557
+ last update undefined x2
558
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
559
+ Client log (client) t+ 74211ms 1790258794421: sync stats: x10 -> 0 x20 -> 100
560
+ Client log (client) t+ 74211ms 1790258794421: sync end: Finished replication test. Inserting 100 rows then updating two times took: 6409ms
561
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
562
+ Client log (client) t+ 74500ms 1790258794710: sync stats: x10 -> 0 x20 -> 99
563
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
564
+ last insert undefined
565
+ last update undefined x2
566
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
567
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
568
+ ✔ useSync updates invalidate useMemo without mutating old data (361.371996ms)
569
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
570
+ last insert undefined
571
+ last update {"id":0,"x":232,"last_updated":1790258794727}
572
+ Client log (client) t+ 74550ms 1790258794760: sync stats: x10 -> 0 x20 -> 99
573
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
574
+ last insert undefined
575
+ last update undefined
576
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
577
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
578
+ last insert undefined
579
+ last update undefined x2
580
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
581
+ Client log (client) t+ 74598ms 1790258794808: sync stats: x10 -> 0 x20 -> 99
582
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
583
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
584
+ last insert undefined
585
+ last update undefined x2
586
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
587
+ Client log (client) t+ 74890ms 1790258795100: sync stats: x10 -> 0 x20 -> 99
588
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
589
+ ✔ concurrent useSync hooks with matching options all update (389.151051ms)
590
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
591
+ last insert undefined
592
+ last update {"id":0,"x":32,"last_updated":1790258795115}
593
+ Client log (client) t+ 74951ms 1790258795161: sync stats: x10 -> 0 x20 -> 99
594
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
595
+ last insert undefined
596
+ last update undefined
597
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
598
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
599
+ last insert undefined
600
+ last update undefined
601
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 51 ) total( 52 ) undefined
602
+ Client log (client) t+ 75230ms Reconnected
603
+ Client log (client) t+ 75264ms TEST_NAME: main Started
604
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
605
+ last insert undefined
606
+ last update undefined
607
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
608
+ last insert undefined
609
+ last update undefined
610
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 152 ) total( 202 ) undefined
611
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 52 ) total( 53 ) undefined
612
+ Client log (client) t+ 75289ms 1790258795499: sync stats: x10 -> 1 x20 -> 100
613
+ Client log (client) t+ 75290ms 1790258795500: sync: p.$update({ x: 10 }); (id: 999000)
614
+ Client log (client) t+ 75290ms 1790258795500: sync: p.$update({ x: 10 }); (id: 999001)
615
+ Client log (client) t+ 75290ms 1790258795500: sync: p.$update({ x: 10 }); (id: 999002)
616
+ Client log (client) t+ 75290ms 1790258795500: sync: p.$update({ x: 10 }); (id: 999003)
617
+ Client log (client) t+ 75290ms 1790258795500: sync: p.$update({ x: 10 }); (id: 999004)
618
+ Client log (client) t+ 75290ms 1790258795500: sync: p.$update({ x: 10 }); (id: 999005)
619
+ Client log (client) t+ 75290ms 1790258795500: sync: p.$update({ x: 10 }); (id: 999006)
620
+ Client log (client) t+ 75290ms 1790258795500: sync: p.$update({ x: 10 }); (id: 999007)
621
+ Client log (client) t+ 75290ms 1790258795500: sync: p.$update({ x: 10 }); (id: 999008)
622
+ Client log (client) t+ 75290ms 1790258795500: sync end: Finished replication test. Inserting 100 rows then updating two times took: 7488ms
623
+ Client log (client) t+ 75294ms 1790258795504: sync stats: x10 -> 10 x20 -> 100
624
+ Client log (client) t+ 75294ms 1790258795504: sync end: Finished replication test. Inserting 100 rows then updating two times took: 7492ms
625
+ (server): Client disconnected. socket.id: 5DPoR_NA9ZYnvqM6AAAA
626
+ onSocketConnect 50XjaQpd1tydXBfMAAAB
627
+ (server): Client connected -> console does not work. use log function. socket.id: 50XjaQpd1tydXBfMAAAB
628
+ Client log (client) t+ 75301ms Disconnected
629
+ Client log (client) t+ 76612ms Client connect.
630
+ schemaChanged must syncHandler.destroySyncs()
631
+ Client log (client) t+ 76721ms Reconnected
632
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
633
+ last insert undefined
634
+ last update {"id":999000,"x":10,"last_updated":1790258795500}
635
+ Client log (client) t+ 76753ms TEST_NAME: main Started
636
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
637
+ last insert undefined
638
+ last update undefined
639
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 152 ) total( 202 ) undefined
640
+ Client log (client) t+ 76768ms 1790258796978: sync stats: x10 -> 2 x20 -> 100
641
+ Client log (client) t+ 76769ms 1790258796979: sync: p.$update({ x: 10 }); (id: 999001)
642
+ Client log (client) t+ 76769ms 1790258796979: sync: p.$update({ x: 10 }); (id: 999002)
643
+ Client log (client) t+ 76769ms 1790258796979: sync: p.$update({ x: 10 }); (id: 999003)
644
+ Client log (client) t+ 76769ms 1790258796979: sync: p.$update({ x: 10 }); (id: 999004)
645
+ Client log (client) t+ 76769ms 1790258796979: sync: p.$update({ x: 10 }); (id: 999005)
646
+ Client log (client) t+ 76769ms 1790258796979: sync: p.$update({ x: 10 }); (id: 999006)
647
+ Client log (client) t+ 76769ms 1790258796979: sync: p.$update({ x: 10 }); (id: 999007)
648
+ Client log (client) t+ 76769ms 1790258796979: sync: p.$update({ x: 10 }); (id: 999008)
649
+ Client log (client) t+ 76769ms 1790258796979: sync end: Finished replication test. Inserting 100 rows then updating two times took: 8967ms
650
+ Client log (client) t+ 76773ms 1790258796983: sync stats: x10 -> 10 x20 -> 100
651
+ Client log (client) t+ 76773ms 1790258796983: sync end: Finished replication test. Inserting 100 rows then updating two times took: 8971ms
652
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
653
+ last insert undefined
654
+ last update undefined
655
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 53 ) total( 54 ) undefined
656
+ ✔ concurrent useSync hooks receive inserts after reattachment and reconnect (1863.200282ms)
657
+ Client log (client) t+ 76791ms TEST_NAME: main Finished OK
658
+ ✔ React hooks (6549.610011ms)
659
+ Client log (client) t+ 76798ms 1790258797008: sync stats: x10 -> 10 x20 -> 100
660
+ Client log (client) t+ 76798ms 1790258797008: sync end: Finished replication test. Inserting 100 rows then updating two times took: 8996ms
661
+ upsertData (from client): inserted( 0 ) updated( 8 ) total( 9 )
662
+ last insert undefined
663
+ last update {"id":999008,"x":10,"y":999999,"flight_number":null,"last_updated":1790258796979}
664
+ server.syncBatch planes: inserted( 0 ) updated( 8 ) deleted( 0 ) pushed to client( 1 ) total( 10 ) undefined
665
+ upsertData (from WAL): inserted( 0 ) updated( 0 ) total( 1 )
666
+ last insert undefined
667
+ last update undefined
668
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
669
+ last insert undefined
670
+ last update undefined
671
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 8 ) total( 9 ) undefined
672
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 8 )
673
+ last insert undefined
674
+ last update undefined
675
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 0 ) total( 8 ) undefined
676
+ Client test successful
677
+ (server): Stopping server ...
678
+ ℹ tests 122
679
+ ℹ suites 4
680
+ ℹ pass 121
681
+ ℹ fail 0
682
+ ℹ cancelled 0
683
+ ℹ skipped 1
684
+ ℹ todo 0
685
+ ℹ duration_ms 84523.436295