orez 0.2.27 → 0.2.29

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 (150) hide show
  1. package/package.json +3 -4
  2. package/src/admin/admin-data.test.ts +0 -348
  3. package/src/admin/http-proxy.ts +0 -252
  4. package/src/admin/log-store.ts +0 -192
  5. package/src/admin/server.ts +0 -471
  6. package/src/admin/ui.ts +0 -1322
  7. package/src/bench/proxy-throughput.bench.ts +0 -343
  8. package/src/bench/serial-mutations.bench.ts +0 -270
  9. package/src/browser.ts +0 -203
  10. package/src/cf-do/.wrangler/cache/cf.json +0 -1
  11. package/src/cf-do/.wrangler/state/v3/cache/miniflare-CacheObject/metadata.sqlite +0 -0
  12. package/src/cf-do/.wrangler/state/v3/cache/miniflare-CacheObject/metadata.sqlite-shm +0 -0
  13. package/src/cf-do/.wrangler/state/v3/cache/miniflare-CacheObject/metadata.sqlite-wal +0 -0
  14. package/src/cf-do/.wrangler/state/v3/do/zero-do-ZeroDO/0ffaabee41a60e04dd0eb7db3073f0a40139e6a97ccd26823967acb652b89a7b.sqlite +0 -0
  15. package/src/cf-do/.wrangler/state/v3/do/zero-do-ZeroDO/metadata.sqlite +0 -0
  16. package/src/cf-do/.wrangler/state/v3/do/zero-do-ZeroDO/metadata.sqlite-shm +0 -0
  17. package/src/cf-do/.wrangler/state/v3/do/zero-do-ZeroDO/metadata.sqlite-wal +0 -0
  18. package/src/cf-do/.wrangler/tmp/bundle-0z4CpE/middleware-insertion-facade.js +0 -11
  19. package/src/cf-do/.wrangler/tmp/bundle-0z4CpE/middleware-loader.entry.ts +0 -134
  20. package/src/cf-do/.wrangler/tmp/bundle-vYmw0E/middleware-insertion-facade.js +0 -11
  21. package/src/cf-do/.wrangler/tmp/bundle-vYmw0E/middleware-loader.entry.ts +0 -134
  22. package/src/cf-do/.wrangler/tmp/dev-cbILNo/worker.js +0 -1059
  23. package/src/cf-do/.wrangler/tmp/dev-cbILNo/worker.js.map +0 -8
  24. package/src/cf-do/.wrangler/tmp/dev-qbho19/worker.js +0 -1059
  25. package/src/cf-do/.wrangler/tmp/dev-qbho19/worker.js.map +0 -8
  26. package/src/cf-do/ARCHITECTURE.md +0 -93
  27. package/src/cf-do/CHAT_E2E.md +0 -213
  28. package/src/cf-do/watermark.test.ts +0 -103
  29. package/src/cf-do/watermark.ts +0 -118
  30. package/src/cf-do/worker.ts +0 -1041
  31. package/src/cf-do/wrangler.toml +0 -11
  32. package/src/cf-pglite/README.md +0 -19
  33. package/src/change-tracking.ts +0 -25
  34. package/src/child-process.test.ts +0 -147
  35. package/src/child-process.ts +0 -90
  36. package/src/cli-entry.ts +0 -72
  37. package/src/cli.test.ts +0 -40
  38. package/src/cli.ts +0 -1214
  39. package/src/config.ts +0 -150
  40. package/src/do-sql-tracking.test.ts +0 -19
  41. package/src/do-sql-tracking.ts +0 -19
  42. package/src/index.ts +0 -1215
  43. package/src/integration/integration.test.ts +0 -517
  44. package/src/integration/native-binary.guard.test.ts +0 -13
  45. package/src/integration/native-startup.test.ts +0 -44
  46. package/src/integration/replication-latency.test.ts +0 -428
  47. package/src/integration/restore-live-stress.test.ts +0 -433
  48. package/src/integration/restore-reset.test.ts +0 -400
  49. package/src/integration/restore.test.ts +0 -274
  50. package/src/integration/test-permissions.ts +0 -147
  51. package/src/load-config.ts +0 -46
  52. package/src/log.ts +0 -96
  53. package/src/mutex.ts +0 -47
  54. package/src/pg-proxy-browser.singledb.test.ts +0 -233
  55. package/src/pg-proxy-browser.ts +0 -2022
  56. package/src/pg-proxy-do-backend.test.ts +0 -3890
  57. package/src/pg-proxy-do-backend.ts +0 -7191
  58. package/src/pg-proxy.ts +0 -1087
  59. package/src/pg-sqlite-compiler/README.md +0 -53
  60. package/src/pg-sqlite-compiler/catalog/seed.ts +0 -524
  61. package/src/pg-sqlite-compiler/fixtures/pgsqlite/arithmetic.json +0 -307
  62. package/src/pg-sqlite-compiler/fixtures/pgsqlite/array.json +0 -377
  63. package/src/pg-sqlite-compiler/fixtures/pgsqlite/cast.json +0 -12
  64. package/src/pg-sqlite-compiler/fixtures/pgsqlite/catalog.json +0 -447
  65. package/src/pg-sqlite-compiler/fixtures/pgsqlite/create-table.json +0 -32
  66. package/src/pg-sqlite-compiler/fixtures/pgsqlite/datetime.json +0 -397
  67. package/src/pg-sqlite-compiler/fixtures/pgsqlite/enum.json +0 -337
  68. package/src/pg-sqlite-compiler/fixtures/pgsqlite/insert.json +0 -337
  69. package/src/pg-sqlite-compiler/fixtures/pgsqlite/json.json +0 -537
  70. package/src/pg-sqlite-compiler/fixtures/pgsqlite/misc.json +0 -1837
  71. package/src/pg-sqlite-compiler/index.ts +0 -73
  72. package/src/pg-sqlite-compiler/integration.test.ts +0 -136
  73. package/src/pg-sqlite-compiler/passes/ast-utils.ts +0 -113
  74. package/src/pg-sqlite-compiler/passes/catalog.ts +0 -65
  75. package/src/pg-sqlite-compiler/passes/datetime.ts +0 -74
  76. package/src/pg-sqlite-compiler/passes/index.ts +0 -49
  77. package/src/pg-sqlite-compiler/passes/types.ts +0 -156
  78. package/src/pg-sqlite-compiler/smoke.test.ts +0 -69
  79. package/src/pg-sqlite-compiler/test/catalog.test.ts +0 -171
  80. package/src/pg-sqlite-compiler/test/corpus.test.ts +0 -161
  81. package/src/pg-sqlite-compiler/test/datetime.oracle.test.ts +0 -102
  82. package/src/pg-sqlite-compiler/test/oracle.ts +0 -237
  83. package/src/pg-sqlite-compiler/test/types.test.ts +0 -109
  84. package/src/pg-sqlite-compiler/types.ts +0 -63
  85. package/src/pglite-ipc.test.ts +0 -116
  86. package/src/pglite-ipc.ts +0 -266
  87. package/src/pglite-manager.ts +0 -557
  88. package/src/pglite-web-proxy.test.ts +0 -57
  89. package/src/pglite-web-proxy.ts +0 -221
  90. package/src/pglite-web-worker.ts +0 -152
  91. package/src/pglite-worker-thread.ts +0 -253
  92. package/src/port.ts +0 -25
  93. package/src/process-title.ts +0 -9
  94. package/src/recovery.ts +0 -155
  95. package/src/replication/change-tracker.test.ts +0 -357
  96. package/src/replication/change-tracker.ts +0 -279
  97. package/src/replication/handler.test.ts +0 -511
  98. package/src/replication/handler.ts +0 -1190
  99. package/src/replication/pgoutput-encoder.test.ts +0 -697
  100. package/src/replication/pgoutput-encoder.ts +0 -373
  101. package/src/replication/tcp-replication.test.ts +0 -876
  102. package/src/replication/zero-compat.test.ts +0 -1150
  103. package/src/restore-stress.test.ts +0 -188
  104. package/src/s3-local.ts +0 -203
  105. package/src/shim/hooks.mjs +0 -120
  106. package/src/shim/register.mjs +0 -4
  107. package/src/sqlite-mode/apply-mode.ts +0 -224
  108. package/src/sqlite-mode/index.ts +0 -15
  109. package/src/sqlite-mode/native-binary.ts +0 -89
  110. package/src/sqlite-mode/package-resolve.ts +0 -17
  111. package/src/sqlite-mode/resolve-mode.ts +0 -80
  112. package/src/sqlite-mode/shim-template.ts +0 -159
  113. package/src/sqlite-mode/sqlite-mode.test.ts +0 -427
  114. package/src/sqlite-mode/types.ts +0 -30
  115. package/src/vite-plugin.ts +0 -67
  116. package/src/wasm-sqlite.test.ts +0 -537
  117. package/src/worker/browser-admin.ts +0 -52
  118. package/src/worker/browser-build-config.test.ts +0 -71
  119. package/src/worker/browser-build-config.ts +0 -109
  120. package/src/worker/browser-embed-admin.test.ts +0 -75
  121. package/src/worker/browser-embed.ts +0 -345
  122. package/src/worker/cf-patches.ts +0 -384
  123. package/src/worker/embed-integration.test.ts +0 -321
  124. package/src/worker/index.ts +0 -138
  125. package/src/worker/shims/fastify.test.ts +0 -255
  126. package/src/worker/shims/fastify.ts +0 -306
  127. package/src/worker/shims/http-service.test.ts +0 -355
  128. package/src/worker/shims/http-service.ts +0 -293
  129. package/src/worker/shims/node-stub.ts +0 -290
  130. package/src/worker/shims/oxfmt.ts +0 -3
  131. package/src/worker/shims/postgres-browser.ts +0 -59
  132. package/src/worker/shims/postgres-socket.test.ts +0 -576
  133. package/src/worker/shims/postgres-socket.ts +0 -310
  134. package/src/worker/shims/postgres.test.ts +0 -364
  135. package/src/worker/shims/postgres.ts +0 -1454
  136. package/src/worker/shims/sqlite-browser.test.ts +0 -233
  137. package/src/worker/shims/sqlite-browser.ts +0 -175
  138. package/src/worker/shims/sqlite.test.ts +0 -786
  139. package/src/worker/shims/sqlite.ts +0 -978
  140. package/src/worker/shims/stream-browser.ts +0 -15
  141. package/src/worker/shims/ws-browser.test.ts +0 -205
  142. package/src/worker/shims/ws-browser.ts +0 -248
  143. package/src/worker/shims/ws.test.ts +0 -288
  144. package/src/worker/shims/ws.ts +0 -467
  145. package/src/worker/shims/zero-process-env.ts +0 -11
  146. package/src/worker/types.ts +0 -75
  147. package/src/worker/worker-integration.test.ts +0 -223
  148. package/src/worker/worker.test.ts +0 -136
  149. package/src/worker/zero-cache-embed-cf.ts +0 -463
  150. package/src/worker/zero-cache-embed.ts +0 -277
@@ -1,307 +0,0 @@
1
- {
2
- "source": "erans/pgsqlite tests/",
3
- "bucket": "arithmetic",
4
- "count": 60,
5
- "cases": [
6
- {
7
- "name": "arithmetic_null_test-1",
8
- "sql": "SELECT val1 + val2 AS sum_result FROM null_data WHERE id = 1",
9
- "source": "arithmetic_null_test.rs"
10
- },
11
- {
12
- "name": "arithmetic_null_test-2",
13
- "sql": "SELECT val1 + val2 AS sum_result FROM null_data WHERE id = 2",
14
- "source": "arithmetic_null_test.rs"
15
- },
16
- {
17
- "name": "arithmetic_null_test-3",
18
- "sql": "SELECT val1 + val2 AS sum_result FROM null_data WHERE id = 3",
19
- "source": "arithmetic_null_test.rs"
20
- },
21
- {
22
- "name": "arithmetic_null_test-4",
23
- "sql": "SELECT val1 + val2 AS sum_result FROM null_data WHERE id = 4",
24
- "source": "arithmetic_null_test.rs"
25
- },
26
- {
27
- "name": "arithmetic_null_test-5",
28
- "sql": "SELECT amount * 1.1 AS with_tax FROM nullable WHERE id = 1",
29
- "source": "arithmetic_null_test.rs"
30
- },
31
- {
32
- "name": "arithmetic_null_test-6",
33
- "sql": "SELECT amount * 1.1 AS with_tax FROM nullable WHERE id = 2",
34
- "source": "arithmetic_null_test.rs"
35
- },
36
- {
37
- "name": "arithmetic_null_test-7",
38
- "sql": "SELECT (a + b) * c AS result FROM complex_null WHERE id = 1",
39
- "source": "arithmetic_null_test.rs"
40
- },
41
- {
42
- "name": "arithmetic_null_test-8",
43
- "sql": "SELECT (a + b) * c AS result FROM complex_null WHERE id = 2",
44
- "source": "arithmetic_null_test.rs"
45
- },
46
- {
47
- "name": "arithmetic_null_test-9",
48
- "sql": "SELECT (a + b) * c AS result FROM complex_null WHERE id = 3",
49
- "source": "arithmetic_null_test.rs"
50
- },
51
- {
52
- "name": "arithmetic_null_test-10",
53
- "sql": "SELECT price * 1.0 * (1.0 - COALESCE(discount, 0.0)) AS final_price FROM defaults WHERE id = 1",
54
- "source": "arithmetic_null_test.rs"
55
- },
56
- {
57
- "name": "arithmetic_null_test-11",
58
- "sql": "SELECT price * 1.0 * (1.0 - COALESCE(discount, 0.0)) AS final_price FROM defaults WHERE id = 2",
59
- "source": "arithmetic_null_test.rs"
60
- },
61
- {
62
- "name": "arithmetic_null_test-12",
63
- "sql": "SELECT base_val + 10.0 AS total FROM param_null WHERE id = 1",
64
- "source": "arithmetic_null_test.rs"
65
- },
66
- {
67
- "name": "arithmetic_null_test-13",
68
- "sql": "SELECT base_val + 10.0 AS total FROM param_null WHERE id = 2",
69
- "source": "arithmetic_null_test.rs"
70
- },
71
- {
72
- "name": "arithmetic_null_test-14",
73
- "sql": "SELECT CAST(50.0 + NULL AS REAL) AS total",
74
- "source": "arithmetic_null_test.rs"
75
- },
76
- {
77
- "name": "arithmetic_complex_test-1",
78
- "sql": "SELECT ((a + b) * c) / d AS complex_result FROM calc_data WHERE id = 1",
79
- "source": "arithmetic_complex_test.rs"
80
- },
81
- {
82
- "name": "arithmetic_complex_test-2",
83
- "sql": "SELECT CAST((a + (b * c)) AS REAL) / CAST(d AS REAL) AS different_grouping FROM calc_data WHERE id = 1",
84
- "source": "arithmetic_complex_test.rs"
85
- },
86
- {
87
- "name": "arithmetic_complex_test-3",
88
- "sql": "SELECT a * (b + (c * d)) AS deeply_nested FROM calc_data WHERE id = 1",
89
- "source": "arithmetic_complex_test.rs"
90
- },
91
- {
92
- "name": "arithmetic_complex_test-4",
93
- "sql": "SELECT quantity * price * (1 - discount) * (1 + tax_rate) AS total_amount FROM sales WHERE id = 1",
94
- "source": "arithmetic_complex_test.rs"
95
- },
96
- {
97
- "name": "arithmetic_complex_test-5",
98
- "sql": "SELECT quantity * price AS subtotal, quantity * price * (1 - discount) AS discounted, quantity * price * (1 - discount) * (1 + tax_rate) AS final_total FROM sales WHERE id = 1",
99
- "source": "arithmetic_complex_test.rs"
100
- },
101
- {
102
- "name": "arithmetic_complex_test-6",
103
- "sql": "SELECT ROUND(value * 2, 2) AS rounded_double FROM measurements WHERE id = 1",
104
- "source": "arithmetic_complex_test.rs"
105
- },
106
- {
107
- "name": "arithmetic_complex_test-7",
108
- "sql": "SELECT ABS(value) * 10.0 AS abs_times_ten FROM measurements WHERE id = 2",
109
- "source": "arithmetic_complex_test.rs"
110
- },
111
- {
112
- "name": "arithmetic_complex_test-8",
113
- "sql": "SELECT sqrt(value) + 10 AS sqrt_plus_ten FROM measurements WHERE id = 3",
114
- "source": "arithmetic_complex_test.rs"
115
- },
116
- {
117
- "name": "arithmetic_complex_test-9",
118
- "sql": "SELECT int_col + real_col AS int_plus_real FROM mixed WHERE id = 1",
119
- "source": "arithmetic_complex_test.rs"
120
- },
121
- {
122
- "name": "arithmetic_complex_test-10",
123
- "sql": "SELECT int_col * decimal_col AS int_times_decimal FROM mixed WHERE id = 1",
124
- "source": "arithmetic_complex_test.rs"
125
- },
126
- {
127
- "name": "arithmetic_complex_test-11",
128
- "sql": "SELECT decimal_col / int_col AS decimal_div_int FROM mixed WHERE id = 1",
129
- "source": "arithmetic_complex_test.rs"
130
- },
131
- {
132
- "name": "arithmetic_complex_test-12",
133
- "sql": "SELECT v1 + v2 * v3 - CAST(v4 AS REAL) / CAST(v5 AS REAL) + v1 * v2 + v3 * v4 - v5 AS long_expr FROM nums WHERE id = 1",
134
- "source": "arithmetic_complex_test.rs"
135
- },
136
- {
137
- "name": "arithmetic_complex_test-13",
138
- "sql": "SELECT ((((v1 + 1) * 2) - 3) / CAST(4 AS REAL)) * 5 AS chained FROM nums WHERE id = 1",
139
- "source": "arithmetic_complex_test.rs"
140
- },
141
- {
142
- "name": "arithmetic_complex_test-14",
143
- "sql": "SELECT amount * 1.0 * CASE \n WHEN status = 'premium' THEN 1.5 \n WHEN status = 'standard' THEN 1.2 \n ELSE 1.0 \n END AS adjusted_amount \n FROM conditions \n ORDER BY id",
144
- "source": "arithmetic_complex_test.rs"
145
- },
146
- {
147
- "name": "arithmetic_edge_cases_test-1",
148
- "sql": "SELECT numerator / denominator AS result FROM test_div WHERE id = 1",
149
- "source": "arithmetic_edge_cases_test.rs"
150
- },
151
- {
152
- "name": "arithmetic_edge_cases_test-2",
153
- "sql": "SELECT numerator / denominator AS result FROM test_div WHERE id = 2",
154
- "source": "arithmetic_edge_cases_test.rs"
155
- },
156
- {
157
- "name": "arithmetic_edge_cases_test-3",
158
- "sql": "SELECT big_val * 1000 AS huge FROM large_nums WHERE id = 1",
159
- "source": "arithmetic_edge_cases_test.rs"
160
- },
161
- {
162
- "name": "arithmetic_edge_cases_test-4",
163
- "sql": "SELECT big_val / 1000 AS tiny FROM large_nums WHERE id = 2",
164
- "source": "arithmetic_edge_cases_test.rs"
165
- },
166
- {
167
- "name": "arithmetic_edge_cases_test-5",
168
- "sql": "SELECT val + 100 AS result FROM negatives WHERE id = 1",
169
- "source": "arithmetic_edge_cases_test.rs"
170
- },
171
- {
172
- "name": "arithmetic_edge_cases_test-6",
173
- "sql": "SELECT val * -2 AS result FROM negatives WHERE id = 2",
174
- "source": "arithmetic_edge_cases_test.rs"
175
- },
176
- {
177
- "name": "arithmetic_edge_cases_test-7",
178
- "sql": "SELECT price * 1.1 AS TotalPrice FROM items WHERE id = 1",
179
- "source": "arithmetic_edge_cases_test.rs"
180
- },
181
- {
182
- "name": "arithmetic_edge_cases_test-8",
183
- "sql": "SELECT price * 1.2 as finalprice FROM items WHERE id = 1",
184
- "source": "arithmetic_edge_cases_test.rs"
185
- },
186
- {
187
- "name": "arithmetic_edge_cases_test-9",
188
- "sql": "SELECT price * 1.3 As MixedCase FROM items WHERE id = 1",
189
- "source": "arithmetic_edge_cases_test.rs"
190
- },
191
- {
192
- "name": "arithmetic_edge_cases_test-10",
193
- "sql": "SELECT int_val * real_val AS simple_mult FROM mixed_types WHERE id = 1",
194
- "source": "arithmetic_edge_cases_test.rs"
195
- },
196
- {
197
- "name": "arithmetic_edge_cases_test-11",
198
- "sql": "SELECT CAST(text_val AS REAL) + 10 AS text_math FROM mixed_types WHERE id = 1",
199
- "source": "arithmetic_edge_cases_test.rs"
200
- },
201
- {
202
- "name": "arithmetic_edge_cases_test-12",
203
- "sql": "SELECT a + b AS addition FROM calc WHERE id = 1",
204
- "source": "arithmetic_edge_cases_test.rs"
205
- },
206
- {
207
- "name": "arithmetic_edge_cases_test-13",
208
- "sql": "SELECT a - b AS subtraction FROM calc WHERE id = 1",
209
- "source": "arithmetic_edge_cases_test.rs"
210
- },
211
- {
212
- "name": "arithmetic_edge_cases_test-14",
213
- "sql": "SELECT a * b AS multiplication FROM calc WHERE id = 1",
214
- "source": "arithmetic_edge_cases_test.rs"
215
- },
216
- {
217
- "name": "arithmetic_edge_cases_test-15",
218
- "sql": "SELECT a / b AS division FROM calc WHERE id = 1",
219
- "source": "arithmetic_edge_cases_test.rs"
220
- },
221
- {
222
- "name": "arithmetic_edge_cases_test-16",
223
- "sql": "SELECT CAST(a AS INTEGER) % CAST(c AS INTEGER) AS modulo FROM calc WHERE id = 1",
224
- "source": "arithmetic_edge_cases_test.rs"
225
- },
226
- {
227
- "name": "arithmetic_edge_cases_test-17",
228
- "sql": "SELECT a.val + b.val AS sum_result FROM precision_test a, precision_test b WHERE a.id = 1 AND b.id = 2",
229
- "source": "arithmetic_edge_cases_test.rs"
230
- },
231
- {
232
- "name": "arithmetic_subquery_test-1",
233
- "sql": "SELECT name, (SELECT SUM(amount * (1.0 - c.discount)) FROM orders o WHERE o.customer_id = c.id) AS total_after_discount \n FROM customers c \n ORDER BY id",
234
- "source": "arithmetic_subquery_test.rs"
235
- },
236
- {
237
- "name": "arithmetic_subquery_test-2",
238
- "sql": "SELECT customer_id, avg_amount * 1.1 AS projected_avg \n FROM (SELECT customer_id, AVG(amount) AS avg_amount FROM orders GROUP BY customer_id) t\n ORDER BY customer_id",
239
- "source": "arithmetic_subquery_test.rs"
240
- },
241
- {
242
- "name": "arithmetic_subquery_test-3",
243
- "sql": "WITH product_totals AS (\n SELECT product, \n SUM(quantity) AS total_quantity,\n SUM(quantity * unit_price) AS total_revenue\n FROM sales\n GROUP BY product\n )\n SELECT product, \n total_revenue / total_quantity AS avg_price_per_unit,\n total_revenue * 1.2 AS projected_revenue\n FROM product_totals\n ORDER BY product",
244
- "source": "arithmetic_subquery_test.rs"
245
- },
246
- {
247
- "name": "arithmetic_subquery_test-4",
248
- "sql": "WITH RECURSIVE factorial AS (\n SELECT 1 AS n, 1.0 AS fact\n UNION ALL\n SELECT n + 1, fact * (n + 1)\n FROM factorial\n WHERE n < 5\n )\n SELECT n, fact AS factorial_value\n FROM factorial\n ORDER BY n",
249
- "source": "arithmetic_subquery_test.rs"
250
- },
251
- {
252
- "name": "arithmetic_subquery_test-5",
253
- "sql": "SELECT p.name, r.name AS region, \n price_with_tax, \n price_with_tax + r.shipping_cost AS final_price\n FROM products p\n CROSS JOIN regions r\n JOIN (\n SELECT p2.id AS product_id, r2.id AS region_id,\n p2.base_price * (1 + r2.tax_rate) AS price_with_tax\n FROM products p2\n CROSS JOIN regions r2\n ) calc ON calc.product_id = p.id AND calc.region_id = r.id\n ORDER BY p.id, r.id",
254
- "source": "arithmetic_subquery_test.rs"
255
- },
256
- {
257
- "name": "arithmetic_subquery_test-6",
258
- "sql": "SELECT category,\n avg_value,\n avg_value * 2 AS double_avg,\n (SELECT (t2.avg_value - t1.avg_value) * 100 / t1.avg_value\n FROM (SELECT AVG(value) AS avg_value FROM metrics) t2) AS pct_diff_from_overall\n FROM (SELECT category, AVG(value) AS avg_value FROM metrics GROUP BY category) t1\n ORDER BY category",
259
- "source": "arithmetic_subquery_test.rs"
260
- },
261
- {
262
- "name": "arithmetic_aliasing_test-1",
263
- "sql": "SELECT price * 1.1 AS price_with_markup FROM products WHERE id = 1",
264
- "source": "arithmetic_aliasing_test.rs"
265
- },
266
- {
267
- "name": "arithmetic_aliasing_test-2",
268
- "sql": "SELECT price * quantity AS total, price * tax_rate AS tax_amount FROM products WHERE id = 1",
269
- "source": "arithmetic_aliasing_test.rs"
270
- },
271
- {
272
- "name": "arithmetic_aliasing_test-3",
273
- "sql": "SELECT price + 10 adjusted_price FROM products WHERE id = 1",
274
- "source": "arithmetic_aliasing_test.rs"
275
- },
276
- {
277
- "name": "arithmetic_aliasing_test-4",
278
- "sql": "SELECT cost * markup AS selling_price FROM items WHERE id = $1",
279
- "source": "arithmetic_aliasing_test.rs"
280
- },
281
- {
282
- "name": "arithmetic_aliasing_test-5",
283
- "sql": "SELECT cost * markup + 5 AS final_price FROM items WHERE id = $1",
284
- "source": "arithmetic_aliasing_test.rs"
285
- },
286
- {
287
- "name": "arithmetic_aliasing_test-6",
288
- "sql": "SELECT amount * 1.1 AS total_with_tax, created_at AT TIME ZONE 'UTC' AS utc_time FROM orders WHERE id = 1",
289
- "source": "arithmetic_aliasing_test.rs"
290
- },
291
- {
292
- "name": "arithmetic_aliasing_test-7",
293
- "sql": "SELECT num * 2.0 AS result FROM test_values WHERE id = 1",
294
- "source": "arithmetic_aliasing_test.rs"
295
- },
296
- {
297
- "name": "arithmetic_aliasing_test-8",
298
- "sql": "SELECT quantity * price AS total_value FROM inventory WHERE id = 1",
299
- "source": "arithmetic_aliasing_test.rs"
300
- },
301
- {
302
- "name": "arithmetic_aliasing_test-9",
303
- "sql": "SELECT CAST(price AS REAL) / quantity AS unit_price FROM inventory WHERE id = 1",
304
- "source": "arithmetic_aliasing_test.rs"
305
- }
306
- ]
307
- }