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,643 @@
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
+ INSERT INTO "lookup_col1" ("id", "description") VALUES ('a','desc') ON CONFLICT DO NOTHING;
14
+ INSERT INTO "lookup_col1" ("id", "description") VALUES ('b',null) ON CONFLICT DO NOTHING;
15
+ Running queries: /* prostgles internal query that should be excluded from schema watch */
16
+
17
+ CREATE TABLE "files" (
18
+ "id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
19
+ "storage_key" UUID UNIQUE ,
20
+ "extension" TEXT NOT NULL DEFAULT '' ,
21
+ "content_type" TEXT NOT NULL DEFAULT '' ,
22
+ "content_length" BIGINT NOT NULL DEFAULT 0 ,
23
+ "etag" TEXT NOT NULL DEFAULT '' ,
24
+ "original_name" TEXT NOT NULL ,
25
+ "original_last_modified" TIMESTAMPTZ ,
26
+ "description" TEXT ,
27
+ "url" TEXT NOT NULL DEFAULT '' ,
28
+ "cloud_url" TEXT ,
29
+ "signed_url" TEXT ,
30
+ "signed_url_expires" BIGINT ,
31
+ "added" TIMESTAMP NOT NULL DEFAULT NOW() ,
32
+ "updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
33
+ "deleted" TIMESTAMPTZ ,
34
+ "deleted_from_storage" TIMESTAMPTZ ,
35
+ "data" BYTEA NOT NULL CHECK (data = decode('01', 'hex')) ,
36
+ "version" INTEGER NOT NULL DEFAULT 1 ,
37
+ "metadata" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"description":{"type":"string"}}}'::TEXT, "metadata", '{"table":"files","column":"metadata"}' ))
38
+ );
39
+ CREATE TABLE "files_versions" (
40
+ "id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
41
+ "storage_key" UUID NOT NULL ,
42
+ "extension" TEXT NOT NULL DEFAULT '' ,
43
+ "content_type" TEXT NOT NULL DEFAULT '' ,
44
+ "content_length" BIGINT NOT NULL DEFAULT 0 ,
45
+ "etag" TEXT NOT NULL DEFAULT '' ,
46
+ "original_name" TEXT NOT NULL ,
47
+ "original_last_modified" TIMESTAMPTZ ,
48
+ "description" TEXT ,
49
+ "url" TEXT NOT NULL DEFAULT '' ,
50
+ "cloud_url" TEXT ,
51
+ "signed_url" TEXT ,
52
+ "signed_url_expires" BIGINT ,
53
+ "added" TIMESTAMP NOT NULL DEFAULT NOW() ,
54
+ "updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
55
+ "deleted" TIMESTAMPTZ ,
56
+ "deleted_from_storage" TIMESTAMPTZ ,
57
+ "file_id" UUID NOT NULL ,
58
+ "version" INTEGER NOT NULL ,
59
+ "created" TIMESTAMP NOT NULL DEFAULT NOW() ,
60
+ "metadata" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"description":{"type":"string"}}}'::TEXT, "metadata", '{"table":"files_versions","column":"metadata"}' ))
61
+ );
62
+ ALTER TABLE "files_versions" ADD CONSTRAINT "prostgles_file_version_e24fec525e76b3433749621f589d35d9" FOREIGN KEY (file_id) REFERENCES "files"(id) ON DELETE CASCADE;
63
+ CREATE UNIQUE INDEX "prostgles_file_version_9692aae50022f45f1098646939b287b1_key" ON "files_versions" (file_id, version);
64
+ COMMENT ON INDEX "prostgles_file_version_9692aae50022f45f1098646939b287b1_key" IS 'd4af15d064cae99adac0c1194199a9e3';
65
+ CREATE TABLE "users_public_info" (
66
+ "id" SERIAL PRIMARY KEY ,
67
+ "name" TEXT ,
68
+ "avatar" UUID REFERENCES files ON DELETE CASCADE ,
69
+ "sid" TEXT
70
+ );
71
+ DROP TABLE IF EXISTS "users";
72
+ CREATE TABLE "users" (
73
+ "id" SERIAL PRIMARY KEY ,
74
+ "email" TEXT NOT NULL ,
75
+ "status" TEXT NOT NULL CHECK("status" = 'active' OR "status" = 'disabled' OR "status" = 'pending'),
76
+ "type" TEXT NOT NULL ,
77
+ "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"}' ))
78
+ );
79
+ DROP TABLE IF EXISTS "tjson";
80
+ CREATE TABLE "tjson" (
81
+ "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"}' )),
82
+ "colOneOf" TEXT NOT NULL CHECK("colOneOf" = 'a' OR "colOneOf" = 'b' OR "colOneOf" = 'c'),
83
+ "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"}' )),
84
+ "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"}' )),
85
+ "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"}' ))
86
+ );
87
+ CREATE TABLE "uuid_text" (
88
+ "id" UUID ,
89
+ "col1" TEXT REFERENCES lookup_col1 (id) ,
90
+ "col2" TEXT REFERENCES lookup_col1 (id) ,
91
+ "col3" TEXT REFERENCES lookup_col1
92
+ );
93
+ DROP TABLE IF EXISTS "api_table";
94
+ CREATE TABLE "api_table" (
95
+ "id" SERIAL PRIMARY KEY
96
+ );
97
+ CREATE TABLE "rec_ref" (
98
+ "id" SERIAL PRIMARY KEY
99
+ );
100
+ CREATE TABLE "rec" (
101
+ "id" SERIAL PRIMARY KEY ,
102
+ "parent_id" INTEGER REFERENCES rec ,
103
+ "recf" INTEGER REFERENCES rec_ref
104
+ );
105
+ Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
106
+ Prostgles: Created typescript schema definition file:
107
+ DBGeneratedSchema.ts
108
+ (server): prostgles onReady
109
+ (server): Waiting for client...
110
+ (client) t+ 0ms Started client...
111
+ onSocketConnect voQWbRDe5ssPQ0NjAAAA
112
+ (server): Client connected -> console does not work. use log function. socket.id: voQWbRDe5ssPQ0NjAAAA
113
+ (client) t+ 38ms Client connect.
114
+ (client) t+ 170ms TEST_NAME: main Started
115
+ Client log (client) t+ 190ms Starting isomorphic queries
116
+ ▶ Isomorphic queries
117
+ ✔ Deleting stale data (27.89059ms)
118
+ {
119
+ message: 'malformed array literal: "a"',
120
+ length: 149,
121
+ name: 'error',
122
+ severity: 'ERROR',
123
+ code: '22P02',
124
+ detail: 'Array value must start with "{" or dimension information.',
125
+ position: '325',
126
+ file: 'arrayfuncs.c',
127
+ line: '262',
128
+ routine: 'array_in',
129
+ query: '-- prostgles query id: 3ab2406d-054a-48d6-9081-b5a07b9a3041\n' +
130
+ 'SET LOCAL "prostgles.user" \n' +
131
+ `TO '{"id":"1","type":"public"}';\n` +
132
+ 'SELECT \n' +
133
+ ' "prostgles_root_table_alias"."id" AS "id", \n' +
134
+ ' "prostgles_root_table_alias"."h" AS "h", \n' +
135
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
136
+ ' FROM ( \n' +
137
+ ' SELECT * \n' +
138
+ ' FROM items \n' +
139
+ ` WHERE "h" = 'a' \n` +
140
+ ' ) prostgles_root_table_alias \n' +
141
+ ' LIMIT 0',
142
+ code_info: 'invalid_text_representation'
143
+ }
144
+ {
145
+ message: 'malformed array literal: "a"',
146
+ length: 149,
147
+ name: 'error',
148
+ severity: 'ERROR',
149
+ code: '22P02',
150
+ detail: 'Array value must start with "{" or dimension information.',
151
+ position: '325',
152
+ file: 'arrayfuncs.c',
153
+ line: '262',
154
+ routine: 'array_in',
155
+ query: '-- prostgles query id: a4dd132a-05d3-4007-9c98-845ce7c444fb\n' +
156
+ 'SET LOCAL "prostgles.user" \n' +
157
+ `TO '{"id":"1","type":"public"}';\n` +
158
+ 'SELECT \n' +
159
+ ' "prostgles_root_table_alias"."id" AS "id", \n' +
160
+ ' "prostgles_root_table_alias"."h" AS "h", \n' +
161
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
162
+ ' FROM ( \n' +
163
+ ' SELECT * \n' +
164
+ ' FROM items \n' +
165
+ ` WHERE "h" = 'a' \n` +
166
+ ' ) prostgles_root_table_alias \n' +
167
+ ' LIMIT 0',
168
+ code_info: 'invalid_text_representation'
169
+ }
170
+ ✔ Error structure malformed array literal (60.117517ms)
171
+ ✔ Table info (8.075029ms)
172
+ ✔ Prepare data (67.10337ms)
173
+ ✔ Test bytea (10.720167ms)
174
+ ✔ abortSignal terminates a running query (5553.813662ms)
175
+ ✔ Client queries are aborted no more than after n seconds (14013.877223ms)
176
+ ✔ Subscription tracked_columns get merged correctly (0.591259ms)
177
+ getPubSubManagerInitQuery: No prostgles.versions table found. Creating...
178
+ Created PubSubManager
179
+ ✔ Aggregate subscription tracks FILTER and ORDER BY dependencies (1032.767852ms)
180
+ ✔ CASE select and subscription dependencies (675.297184ms)
181
+ ✔ Subscription tracks non-selected ORDER BY columns (651.508197ms)
182
+ ✔ merge json (11.676459ms)
183
+ ✔ json array converted to pg array filter bug (3.137561ms)
184
+ ✔ onConflict do update (12.676589ms)
185
+ ✔ Local file upload (56.470476ms)
186
+ ✔ Local file delete (39.126965ms)
187
+ ✔ Local file update (88.280821ms)
188
+ ✔ getColumns definition (9.50799ms)
189
+ ✔ returnType (0.99031ms)
190
+ ✔ Table config triggers (6.015033ms)
191
+ ✔ $unnest_words (1.26084ms)
192
+ ✔ Group by/Distinct (2.681249ms)
193
+ ✔ sql returntype default-with-rollback (26.697996ms)
194
+ ✔ returnType: value (3.259573ms)
195
+ ✔ PostgreSQL array element (9.702475ms)
196
+ ✔ FTS filtering (12.513028ms)
197
+ ✔ $term_highlight (7.838336ms)
198
+ ✔ funcFilters: $term_highlight (4.165625ms)
199
+ Client log (client) t+ 22611ms [{"name":null}]
200
+ Client log (client) t+ 22618ms [{"name":"zz3zz1"}]
201
+ Pushing 1 rows to socket x9
202
+ Client log (client) t+ 23270ms []
203
+ ✔ subscribe skipChangedColumnsCheck false by default = sub should not fire if selected data did not change (873.2586ms)
204
+ Pushing 0 rows to socket
205
+ Client log (client) t+ 26015ms [{"name":null}]
206
+ Client log (client) t+ 26021ms [{"name":"zz3zz1"}]
207
+ Client log (client) t+ 26240ms [{"name":"zz3zz1"}]
208
+ Client log (client) t+ 26457ms [{"name":"zz3zz1"}]
209
+ Pushing 1 rows to socket x4
210
+ Client log (client) t+ 26674ms []
211
+ ✔ subscribe skipChangedColumnsCheck true (3402.085972ms)
212
+ Pushing 0 rows to socket
213
+ Pushing 1 rows to socket x4
214
+ Client log unsubscribe start - various
215
+ Client log unsubscribe end - various
216
+ ✔ subscribe (59.790629ms)
217
+ Pushing 0 rows to socket
218
+ Pushing 1 rows to socket
219
+ ✔ subscribe to schema.table (20.925978ms)
220
+ Pushing 2 rows to socket
221
+ ✔ parallel subscriptions (2011.51782ms)
222
+ Client log (client) t+ 33177ms updateAll done in 1705
223
+ Client log (client) t+ 34859ms updateAll done in 1677
224
+ Pushing 0 rows to socket
225
+ Pushing 3 rows to socket
226
+ Client log (client) t+ 35621ms Locks: [{"pid":97,"blocking_pids":[94],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1136'\n WHERE id = 1136;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1137'\n WHERE id = 1137;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
227
+ Client log (client) t+ 35714ms Locks: [{"pid":97,"blocking_pids":[101],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1202'\n WHERE id = 1202;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1203'\n WHERE id = 1203;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
228
+ Client log (client) t+ 35836ms Locks: [{"pid":94,"blocking_pids":[99],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1294'\n WHERE id = 1294;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":null}]
229
+ Client log (client) t+ 36819ms Locks: [{"pid":98,"blocking_pids":[97],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1975'\n WHERE id = 1975;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1974'\n WHERE id = 1974;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
230
+ Pushing 997 rows to socket
231
+ Client log (client) t+ 36854ms updateAll done in 1976
232
+ Pushing 1000 rows to socket x2
233
+ ✔ subscriptions do not serialize transactions (9898.658435ms)
234
+ Pushing 3 rows to socket
235
+ Pushing 1 rows to socket
236
+ throttling sub for 1700 ms
237
+ throttling finished. pushSubData...
238
+ Pushing 1 rows to socket
239
+ throttling sub for 1700 ms
240
+ ✔ subscribeOne with throttle (1751.490377ms)
241
+ throttling sub for 1700 ms
242
+ throttling finished. pushSubData...
243
+ ✔ subscribeOne with throttle skipFirst: true (1703.574956ms)
244
+ Pushing 1 rows to socket
245
+ throttling finished. pushSubData...
246
+ Pushing 1 rows to socket
247
+ ✔ subscribeOne without skipFirst (1038.629062ms)
248
+ Pushing 0 rows to socket
249
+ Pushing 1 rows to socket
250
+ ✔ subscribeOne with skipFirst: true (1526.543855ms)
251
+ Pushing 0 rows to socket x2
252
+ ✔ subscribeOne actions: { insert: true } (1543.360473ms)
253
+ Pushing 1 rows to socket
254
+ ✔ subscribeOne actions: { insert: false } (1550.179601ms)
255
+ ✔ JSON filtering (6.184807ms)
256
+ ✔ Complex filtering (5.003179ms)
257
+ ✔ template_string function (5.118442ms)
258
+ ✔ Between filtering (3.772396ms)
259
+ ✔ In filtering (3.706893ms)
260
+ ✔ Order by (4.576048ms)
261
+ ✔ Order by aliased func (2.791944ms)
262
+ ✔ Filter by aliased func (2.28312ms)
263
+ ✔ Count with Filter by aliased func (3.241413ms)
264
+ ✔ Count with Aggregate and Filter by aliased func (3.24659ms)
265
+ ✔ Count with complex filter (2.815218ms)
266
+ ✔ Order by aggregation (2.199774ms)
267
+ ✔ Aggregate FILTER and ORDER BY (2.320707ms)
268
+ ✔ Column alias func (1.863109ms)
269
+ ✔ Order by colliding alias name (1.815158ms)
270
+ ✔ Update batch example (16.099ms)
271
+ Client log TODO: socket.io stringifies dates
272
+ ✔ Function example (20.557691ms)
273
+ ✔ JSONB filtering (8.773931ms)
274
+ ✔ Postgis examples (21.056761ms)
275
+ ✔ jsonbSchema validation (6.530679ms)
276
+ ✔ find and findOne (2.814625ms)
277
+ ✔ Result size (2.689555ms)
278
+ ✔ Basic exists (8.691991ms)
279
+ ✔ Basic fts with shorthand notation (6.158902ms)
280
+ ✔ Exists with shortest path wildcard filter example (5.680259ms)
281
+ ✔ Exists with exact path filter example (5.429148ms)
282
+ ✔ Not Exists with exact path filter example (1.784446ms)
283
+ ✔ Upsert example (17.34082ms)
284
+ ✔ Joins example (3.555182ms)
285
+ ✔ Joins repeating table example (4.95957ms)
286
+ ✔ Join aggregate functions example (10.183225ms)
287
+ ✔ $rowhash example (7.384273ms)
288
+ ✔ Reference column nested insert (15.389946ms)
289
+ ✔ Join escaped table names with quotes (28.016267ms)
290
+ Pushing 0 rows to socket x2
291
+ Client log (client) t+ 48232ms {
292
+ "item": {
293
+ "\"id0\"": 1,
294
+ "\"quoted1_id\"": 1,
295
+ "\"text_col0\"": "0"
296
+ },
297
+ "runs": 0
298
+ }
299
+ Client log (client) t+ 48244ms {
300
+ "item": {
301
+ "\"id0\"": 1,
302
+ "\"quoted1_id\"": 1,
303
+ "\"text_col0\"": "1"
304
+ },
305
+ "runs": 1
306
+ }
307
+ Client log unsubscribe start - """quoted0"""
308
+ Client log unsubscribe end - """quoted0"""
309
+ ✔ subscribe to escaped table name (25.801142ms)
310
+ Pushing 1 rows to socket x2
311
+ ✔ subscribe using a filter bigger than block_size (19.643842ms)
312
+ ✔ Reverse join with agg (17.0115ms)
313
+ Pushing 0 rows to socket
314
+ 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}
315
+ 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}
316
+ ✔ Related table subscribe (9053.622031ms)
317
+ Pushing 2 rows to socket x2
318
+ ✔ Aggregate FILTER registers joined dependency triggers (667.615765ms)
319
+ ✔ Nested sort by computed col (7.55769ms)
320
+ ✔ Nested function on different than source column getNewQuery name bug fix (4.280501ms)
321
+ ✔ Reference column deep nested insert (18.185832ms)
322
+ ✔ Multi reference column nested insert (10.390883ms)
323
+ ✔ Join path with order by nested (6.710012ms)
324
+ ✔ Self join (11.597621ms)
325
+ ✔ One to many multi join duplicate row bug fix (13.564721ms)
326
+ Client log (client) t+ 58087ms various id=99 count 1
327
+ Pushing 1 rows to socket x3
328
+ Client log (client) t+ 58089ms various id=99 count
329
+ Client log ok
330
+ Error within running subscription
331
+ _psqlWS_..various.{"id":99}.{"select":{"name":1}}.m.sub {
332
+ message: 'column prostgles_root_table_alias.name does not exist',
333
+ length: 130,
334
+ name: 'error',
335
+ severity: 'ERROR',
336
+ code: '42703',
337
+ position: '133',
338
+ file: 'parse_relation.c',
339
+ line: '3716',
340
+ routine: 'errorMissingColumn',
341
+ query: '-- prostgles query id: e170b323-8ce6-4a75-8956-859c005af0bd\n' +
342
+ 'SET LOCAL "prostgles.user" \n' +
343
+ `TO '{"id":"1","type":"public"}';\n` +
344
+ 'SELECT \n' +
345
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
346
+ ' FROM ( \n' +
347
+ ' SELECT * \n' +
348
+ ' FROM various \n' +
349
+ ' WHERE "id" = 99 \n' +
350
+ ' ) prostgles_root_table_alias \n' +
351
+ ' LIMIT 1000',
352
+ code_info: 'undefined_column'
353
+ }
354
+ Client log (client) t+ 60110ms various id=99 count
355
+ Client log (client) t+ 60110ms 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: e170b323-8ce6-4a75-8956-859c005af0bd\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"}
356
+ Client log ok
357
+ ✔ subscribe triggers with stale schema should fail gracefully and never block other queries (6550.829649ms)
358
+ ✔ Isomorphic queries (64436.59877ms)
359
+ ✔ Having clause (4.296036ms)
360
+ ✔ Having clause with complex filter (2.811649ms)
361
+ Client log (client) t+ 64649ms auth.user: {"sid":"main","uid":"1","id":"1","type":"public"}
362
+ ✔ Nested join having clause (4.239451ms)
363
+ ▶ isomorphic typed queries
364
+ ✔ isLookupTable DB Types from colConf (0.249686ms)
365
+ ✔ isLookupTable DB Types from reference column actual definition (0.156375ms)
366
+ ✔ isLookupTable pkey column itself is typed (0.144185ms)
367
+ ✔ isomorphic typed queries (0.761513ms)
368
+ ▶ Client only queries
369
+ ✔ modifyClientSchema adds custom table and column metadata (3.454331ms)
370
+ ✔ SQL Stream more than 1k records (19.975282ms)
371
+ ✔ SQL Stream persistedConnection with streamLimit works for subsequent queries (12.064345ms)
372
+ ✔ SQL Stream ensure the connection is never released (same pg_backend_pid is the same for subsequent) when using persistConnectionId (11.473374ms)
373
+ ✔ SQL Stream stop kills the query (1024.474834ms)
374
+ ✔ SQL Stream limit works (38.027976ms)
375
+ ✔ SQL Stream stop with terminate kills the query (expect flakiness) (135.272921ms)
376
+ ✔ SQL Stream (13.595926ms)
377
+ ✔ SQL Stream parallel execution + parameters (15.114254ms)
378
+ ✔ SQL Stream query error structure matches default sql run error (14.102683ms)
379
+ ✔ SQL Stream streamLimit (14.340461ms)
380
+ ✔ SQL Stream table fields are the same as on default request (30.059864ms)
381
+ ✔ SQL Stream works for multiple statements (15.558119ms)
382
+ Client log (client) t+ 66017ms Checking public data
383
+ ✔ Check tableSchema (18.641485ms)
384
+ ✔ Security rules example (53.819773ms)
385
+ Client log (client) t+ 66093ms Started testRealtime
386
+ Client log (client) t+ 66124ms 1790244591575: sub stats: x10 -> 0 x20 ->0
387
+ Client log (client) t+ 66134ms 1790244591585: sync stats: x10 -> 0 x20 -> 0
388
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 0)
389
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 1)
390
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 2)
391
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 3)
392
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 4)
393
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 5)
394
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 6)
395
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 7)
396
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 8)
397
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 9)
398
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 10)
399
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 11)
400
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 12)
401
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 13)
402
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 14)
403
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 15)
404
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 16)
405
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 17)
406
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 18)
407
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 19)
408
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 20)
409
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 21)
410
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 22)
411
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 23)
412
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 24)
413
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 25)
414
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 26)
415
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 27)
416
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 28)
417
+ Client log (client) t+ 66135ms 1790244591586: sync: p.$update({ x: 10 }); (id: 29)
418
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 30)
419
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 31)
420
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 32)
421
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 33)
422
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 34)
423
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 35)
424
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 36)
425
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 37)
426
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 38)
427
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 39)
428
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 40)
429
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 41)
430
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 42)
431
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 43)
432
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 44)
433
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 45)
434
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 46)
435
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 47)
436
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 48)
437
+ Client log (client) t+ 66136ms 1790244591587: sync: p.$update({ x: 10 }); (id: 49)
438
+ Pushing 0 rows to socket x3
439
+ upsertData (from client): inserted( 0 ) updated( 50 ) total( 50 )
440
+ last insert undefined
441
+ last update {"id":49,"x":10,"y":49,"flight_number":"FN49","last_updated":1790244591587}
442
+ Client log (client) t+ 66216ms 1790244591667: sub stats: x10 -> 50 x20 ->0
443
+ Pushing 50 rows to socket
444
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
445
+ last insert undefined
446
+ last update undefined
447
+ server.syncBatch planes: inserted( 0 ) updated( 50 ) deleted( 0 ) pushed to client( 50 ) total( 100 ) undefined
448
+ Client log (client) t+ 66231ms 1790244591682: sync stats: x10 -> 50 x20 -> 0
449
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 50)
450
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 51)
451
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 52)
452
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 53)
453
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 54)
454
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 55)
455
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 56)
456
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 57)
457
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 58)
458
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 59)
459
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 60)
460
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 61)
461
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 62)
462
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 63)
463
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 64)
464
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 65)
465
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 66)
466
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 67)
467
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 68)
468
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 69)
469
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 70)
470
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 71)
471
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 72)
472
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 73)
473
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 74)
474
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 75)
475
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 76)
476
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 77)
477
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 78)
478
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 79)
479
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 80)
480
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 81)
481
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 82)
482
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 83)
483
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 84)
484
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 85)
485
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 86)
486
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 87)
487
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 88)
488
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 89)
489
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 90)
490
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 91)
491
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 92)
492
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 93)
493
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 94)
494
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 95)
495
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 96)
496
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 97)
497
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 98)
498
+ Client log (client) t+ 66231ms 1790244591682: sync: p.$update({ x: 10 }); (id: 99)
499
+ Client log (client) t+ 66235ms 1790244591686: sync stats: x10 -> 100 x20 -> 0
500
+ {
501
+ syncIssue: 'sync.lr[synced_field] is greater than lastRow[synced_field]'
502
+ } planes
503
+ upsertData (from WAL): inserted( 0 ) updated( 0 ) total( 1 )
504
+ last insert undefined
505
+ last update undefined
506
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
507
+ last insert undefined
508
+ last update undefined
509
+ upsertData (from client): inserted( 0 ) updated( 50 ) total( 50 )
510
+ last insert undefined
511
+ last update {"id":99,"x":10,"y":99,"flight_number":"FN99","last_updated":1790244591682}
512
+ Client log (client) t+ 66318ms 1790244591768: sub stats: x10 -> 100 x20 ->0
513
+ Pushing 100 rows to socket
514
+ server.syncBatch planes: inserted( 0 ) updated( 50 ) deleted( 0 ) pushed to client( 0 ) total( 100 ) undefined
515
+ upsertData (from WAL): inserted( 0 ) updated( 0 ) total( 50 )
516
+ last insert undefined
517
+ last update undefined
518
+ Client log (client) t+ 68319ms 1790244593770: sub: db.planes.update({}, { x: 20, last_updated });
519
+ Client log (client) t+ 68339ms 1790244593787: sub: Updated to x20 100
520
+ upsertData (from WAL): inserted( 0 ) updated( 0 ) total( 49 )
521
+ last insert undefined
522
+ last update undefined
523
+ Client log (client) t+ 68353ms 1790244593804: sync stats: x10 -> 50 x20 -> 50
524
+ Client log (client) t+ 68363ms 1790244593814: sync stats: x10 -> 0 x20 -> 100
525
+ ✔ Realtime (2292.344265ms)
526
+ Client log (client) t+ 68363ms 1790244593814: sync end: Finished replication test. Inserting 100 rows then updating two times took: 270ms
527
+ Client log (client) t+ 68364ms sync handlesOnData true 100
528
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
529
+ last insert undefined
530
+ last update undefined x2
531
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 100 ) total( 100 ) undefined
532
+ ✔ sync handlesOnData true -> false no data bug (2001.36175ms)
533
+ ﹣ Security rules example (0.305542ms) # SKIP
534
+ ✔ Client only queries (5715.481612ms)
535
+ ▶ React hooks
536
+ ✔ useFind (528.770694ms)
537
+ {
538
+ message: 'items4.named is invalid/disallowed for filtering. Allowed columns: added, "id", "public", "name"'
539
+ }
540
+ ✔ useSubscribe (529.557941ms)
541
+ ✔ useFindOne (511.529383ms)
542
+ Pushing 1 rows to socket
543
+ {
544
+ message: 'items4.named is invalid/disallowed for filtering. Allowed columns: added, "id", "public", "name"'
545
+ }
546
+ ✔ useSubscribeOne (523.608737ms)
547
+ ✔ useCount (515.171001ms)
548
+ ✔ useSize (515.845771ms)
549
+ ✔ useCount planes (257.433859ms)
550
+ Pushing 2 rows to socket
551
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
552
+ last insert undefined
553
+ last update undefined
554
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
555
+ last insert undefined
556
+ last update undefined
557
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
558
+ Client log (client) t+ 74063ms 1790244599514: sync stats: x10 -> 0 x20 -> 99
559
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
560
+ last insert undefined
561
+ last update undefined
562
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 2 ) total( 100 ) undefined
563
+ ✔ useSync (557.504862ms)
564
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
565
+ last insert undefined
566
+ last update undefined x2
567
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
568
+ Client log (client) t+ 74340ms 1790244599791: sync stats: x10 -> 0 x20 -> 100
569
+ Client log (client) t+ 74340ms 1790244599791: sync end: Finished replication test. Inserting 100 rows then updating two times took: 6247ms
570
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
571
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
572
+ last insert undefined
573
+ last update undefined x2
574
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
575
+ Client log (client) t+ 74628ms 1790244600079: sync stats: x10 -> 0 x20 -> 99
576
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
577
+ ✔ useSync updates invalidate useMemo without mutating old data (360.895169ms)
578
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
579
+ last insert undefined
580
+ last update {"id":0,"x":232,"last_updated":1790244600097}
581
+ Client log (client) t+ 74678ms 1790244600129: sync stats: x10 -> 0 x20 -> 99
582
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
583
+ last insert undefined
584
+ last update undefined
585
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
586
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
587
+ last insert undefined
588
+ last update undefined x2
589
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
590
+ Client log (client) t+ 74719ms 1790244600170: sync stats: x10 -> 0 x20 -> 99
591
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
592
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
593
+ last insert undefined
594
+ last update undefined x2
595
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
596
+ Client log (client) t+ 75004ms 1790244600455: sync stats: x10 -> 0 x20 -> 99
597
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
598
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
599
+ last insert undefined
600
+ last update {"id":0,"x":32,"last_updated":1790244600454}
601
+ ✔ concurrent useSync hooks with matching options all update (359.290813ms)
602
+ Client log (client) t+ 75029ms 1790244600480: sync stats: x10 -> 0 x20 -> 99
603
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
604
+ last insert undefined
605
+ last update undefined
606
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
607
+ Client log (client) t+ 75053ms 1790244600504: sync stats: x10 -> 0 x20 -> 99
608
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
609
+ last insert undefined
610
+ last update undefined
611
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 2 ) undefined
612
+ (server): Client disconnected. socket.id: voQWbRDe5ssPQ0NjAAAA
613
+ onSocketConnect i2e7RHjwuKVv2DmMAAAB
614
+ (server): Client connected -> console does not work. use log function. socket.id: i2e7RHjwuKVv2DmMAAAB
615
+ Client log (client) t+ 75310ms Disconnected
616
+ Client log (client) t+ 76540ms Client connect.
617
+ schemaChanged must syncHandler.destroySyncs()
618
+ Client log (client) t+ 76648ms Reconnected
619
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
620
+ last insert undefined
621
+ last update undefined
622
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 51 ) total( 101 ) undefined
623
+ Client log (client) t+ 76691ms TEST_NAME: main Started
624
+ Client log (client) t+ 76693ms 1790244602144: sync stats: x10 -> 0 x20 -> 99
625
+ Client log (client) t+ 76721ms 1790244602172: sync stats: x10 -> 0 x20 -> 99
626
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
627
+ last insert undefined
628
+ last update undefined x2
629
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 2 ) undefined
630
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 2 ) undefined
631
+ Client log (client) t+ 76724ms TEST_NAME: main Finished OK
632
+ ✔ concurrent useSync hooks receive inserts after a socket reconnect (1696.274711ms)
633
+ ✔ React hooks (6357.147848ms)
634
+ Client test successful
635
+ (server): Stopping server ...
636
+ ℹ tests 122
637
+ ℹ suites 4
638
+ ℹ pass 121
639
+ ℹ fail 0
640
+ ℹ cancelled 0
641
+ ℹ skipped 1
642
+ ℹ todo 0
643
+ ℹ duration_ms 84015.704594
@@ -0,0 +1,11 @@
1
+
2
+ > server_tests@1.0.0 build
3
+ > rm -rf ./node_modules/* && rm -rf ./media/* && rm -rf ./dist/* && npm i && tsc
4
+
5
+
6
+ added 113 packages, and audited 115 packages in 4s
7
+
8
+ 28 packages are looking for funding
9
+ run `npm fund` for details
10
+
11
+ found 0 vulnerabilities