Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
0064bb0
fix(dml): preserve leading zeros and boolean strings in string column…
ZhuchkaTriplesix Aug 26, 2026
d399650
fix(dml): differentiate literal 'NULL' string from database NULL (#595)
ZhuchkaTriplesix Aug 26, 2026
432caae
feat(dml): add visual duplicate warning in DML Preview dialog for tab…
ZhuchkaTriplesix Aug 26, 2026
ea6cfab
perf(pool): tune idleDisposeDelay to 4 seconds for rapid tab switchin…
ZhuchkaTriplesix Aug 26, 2026
c036df7
Merge pull request #598 from QueryaHub/issue/594-preserve-leading-zer…
ZhuchkaTriplesix Aug 26, 2026
031d54d
Merge pull request #599 from QueryaHub/issue/595-differentiate-null-s…
ZhuchkaTriplesix Aug 26, 2026
cecf5d2
Merge pull request #600 from QueryaHub/issue/596-dml-preview-no-pk-wa…
ZhuchkaTriplesix Aug 26, 2026
4d4ce89
Merge pull request #601 from QueryaHub/issue/597-tune-connection-pool…
ZhuchkaTriplesix Aug 26, 2026
b2a9999
test(docker): expand multi-engine test seeds with comprehensive data …
ZhuchkaTriplesix Aug 26, 2026
f1cd7bc
perf(grid): optimize sortResultGridRows with precomputed sort keys (#…
ZhuchkaTriplesix Aug 26, 2026
1142ed1
perf(calc): optimize GridSelectionCalcEngine median calculation with …
ZhuchkaTriplesix Aug 26, 2026
b8fd55e
fix(storage): enable WAL mode and busy_timeout in LocalDb for concurr…
ZhuchkaTriplesix Aug 26, 2026
191584c
fix(theme): expand typography monospace fallback stack with Cascadia …
ZhuchkaTriplesix Aug 26, 2026
0c4586f
fix(theme): improve accent color contrast in light default theme (#609)
ZhuchkaTriplesix Aug 26, 2026
fb30da2
fix(linux): suppress benign GDK cursor theme and synthetic device log…
ZhuchkaTriplesix Aug 26, 2026
0b46a91
Merge pull request #615 from QueryaHub/issue/602-schwartzian-sort-opt…
ZhuchkaTriplesix Aug 26, 2026
1c01bde
Merge pull request #616 from QueryaHub/issue/603-quickselect-median-calc
ZhuchkaTriplesix Aug 26, 2026
ab5962f
Merge pull request #617 from QueryaHub/issue/611-local-db-wal-busy-ti…
ZhuchkaTriplesix Aug 26, 2026
157b5f0
Merge pull request #618 from QueryaHub/issue/613-expand-mono-font-stack
ZhuchkaTriplesix Aug 26, 2026
17a2790
fix(theme): sync _lightColorScheme primary and ring with accentCyanLi…
ZhuchkaTriplesix Aug 26, 2026
adc6919
Merge pull request #619 from QueryaHub/issue/609-light-theme-accent-c…
ZhuchkaTriplesix Aug 26, 2026
991b110
Merge pull request #620 from QueryaHub/issue/614-suppress-gdk-log-spam
ZhuchkaTriplesix Aug 26, 2026
bcc2cda
feat(a11y): add explicit FocusTraversalGroup to multi-section connect…
ZhuchkaTriplesix Aug 26, 2026
c490441
sec(editor): add confirmation modal for destructive DDL and DML opera…
ZhuchkaTriplesix Aug 26, 2026
2482803
sec(storage): implement in-memory secret scrubbing for database passw…
ZhuchkaTriplesix Aug 26, 2026
4292923
feat(onboarding): expand welcome tour guide with 6 interactive steps …
ZhuchkaTriplesix Aug 26, 2026
a8b0706
fix(test): remove unused import in connection_dialog_focus_traversal_…
ZhuchkaTriplesix Aug 26, 2026
298c51b
perf(memory): introduce string interning pool for low-cardinality que…
ZhuchkaTriplesix Aug 26, 2026
0f65d7b
Merge pull request #621 from QueryaHub/issue/610-focus-traversal-conn…
ZhuchkaTriplesix Aug 26, 2026
f2f60ff
Merge pull request #622 from QueryaHub/issue/608-destructive-sql-conf…
ZhuchkaTriplesix Aug 26, 2026
bb81dac
Merge pull request #623 from QueryaHub/issue/607-secret-scrubbing
ZhuchkaTriplesix Aug 26, 2026
4b0dfa8
Merge pull request #624 from QueryaHub/issue/606-welcome-tour-guide
ZhuchkaTriplesix Aug 26, 2026
f48512a
Merge pull request #625 from QueryaHub/issue/604-string-interning-pool
ZhuchkaTriplesix Aug 26, 2026
7872e66
feat(macos): implement native PlatformMenuBar for macOS system menu (…
ZhuchkaTriplesix Aug 26, 2026
533fc54
perf(memory): explore compact typed storage and lazy cell stringifica…
ZhuchkaTriplesix Aug 26, 2026
598a432
feat(extensions): Querya Extension Driver Mutation Standard (#563)
ZhuchkaTriplesix Aug 26, 2026
d4c8213
test(golden): add explicit @Tags(['golden']) annotation to golden tests
ZhuchkaTriplesix Aug 26, 2026
072a4c5
Merge pull request #626 from QueryaHub/issue/612-macos-platform-menu-bar
ZhuchkaTriplesix Aug 26, 2026
780f69b
Merge pull request #627 from QueryaHub/issue/605-compact-typed-storage
ZhuchkaTriplesix Aug 26, 2026
6cd49b1
Merge pull request #628 from QueryaHub/issue/563-extension-mutation-s…
ZhuchkaTriplesix Aug 26, 2026
1ef62be
fix(storage): ensure monotonic ID ordering for sql query history list…
ZhuchkaTriplesix Aug 26, 2026
8ada5e7
Merge pull request #629 from QueryaHub/fix/sql-history-order-batch-prune
ZhuchkaTriplesix Aug 26, 2026
aa1fffe
ui(motion): harmonize connection workspace motion to prevent dual-axi…
ZhuchkaTriplesix Aug 29, 2026
69bb272
feat(ux): bi-directional navigation between statistics/home and activ…
ZhuchkaTriplesix Aug 29, 2026
adc1aef
fix(ux): add fluid transitions and persistent breadcrumbs to Mongo an…
ZhuchkaTriplesix Aug 29, 2026
7df9cb9
feat(tree): sync active table/view selection to connections sidebar t…
ZhuchkaTriplesix Aug 29, 2026
03ef645
Merge pull request #634 from QueryaHub/issue/631-motion-harmonization
ZhuchkaTriplesix Aug 29, 2026
efdc8ec
Merge pull request #635 from QueryaHub/issue/630-bidirectional-naviga…
ZhuchkaTriplesix Aug 29, 2026
bb39a27
Merge pull request #636 from QueryaHub/issue/632-mongo-redis-fluid-tr…
ZhuchkaTriplesix Aug 29, 2026
aebe782
Merge pull request #637 from QueryaHub/issue/633-sidebar-tree-selecti…
ZhuchkaTriplesix Aug 29, 2026
1b4b973
sec(extensions): add destructive SQL confirmation dialog for extensio…
ZhuchkaTriplesix Aug 30, 2026
135f6e5
Merge pull request #641 from QueryaHub/issue/638-extension-destructiv…
ZhuchkaTriplesix Aug 30, 2026
1b563cb
feat(tree): support active selection highlighting in SduiTreeBuilder …
ZhuchkaTriplesix Aug 30, 2026
3f07b5b
Merge pull request #642 from QueryaHub/issue/639-sdui-tree-selection-…
ZhuchkaTriplesix Aug 30, 2026
c9f59df
fix(workspace): make restoreLastSelectedObject connection-type-aware …
ZhuchkaTriplesix Aug 30, 2026
fcc8fc4
Merge pull request #643 from QueryaHub/issue/640-connection-type-awar…
ZhuchkaTriplesix Aug 30, 2026
ffe749a
refactor(core): eliminate inverted core-to-feature imports and extrac…
ZhuchkaTriplesix Aug 30, 2026
404e64c
Merge pull request #647 from QueryaHub/issue/644-eliminate-inverted-c…
ZhuchkaTriplesix Aug 30, 2026
0a3eb1b
fix(storage): ensure single-flight thread-safe LocalDb._open initiali…
ZhuchkaTriplesix Aug 30, 2026
fdb2b42
Merge pull request #648 from QueryaHub/issue/645-localdb-single-fligh…
ZhuchkaTriplesix Aug 30, 2026
51b59a5
refactor(workspace): modularize shared SQL editor and result workbenc…
ZhuchkaTriplesix Aug 30, 2026
137b90f
Merge pull request #649 from QueryaHub/issue/646-modularize-shared-wo…
ZhuchkaTriplesix Aug 30, 2026
c5a2160
perf(workspace): memoize DataGrid filtering in ResultsTab
ZhuchkaTriplesix Aug 30, 2026
cf8b5ed
Merge pull request #653 from QueryaHub/issue/650-memoize-results-tab-…
ZhuchkaTriplesix Aug 30, 2026
2cfd61e
perf(workspace): debounce filter input in DataGridFilterBar
ZhuchkaTriplesix Aug 30, 2026
270c90b
Merge pull request #654 from QueryaHub/issue/651-debounce-datagrid-fi…
ZhuchkaTriplesix Aug 30, 2026
48554c3
perf(workspace): offload massive grid selection statistics calculatio…
ZhuchkaTriplesix Aug 30, 2026
399d787
Merge pull request #655 from QueryaHub/issue/652-offload-massive-grid…
ZhuchkaTriplesix Aug 30, 2026
37d2ea6
fix(sqlite): configure busy_timeout on SQLite connections
ZhuchkaTriplesix Aug 30, 2026
7e5d133
Merge pull request #659 from QueryaHub/issue/656-sqlite-busy-timeout
ZhuchkaTriplesix Aug 30, 2026
0893b3a
fix(redis): guard disconnect against null check operator exceptions
ZhuchkaTriplesix Aug 30, 2026
e7cb534
Merge pull request #660 from QueryaHub/issue/657-redis-safe-disconnect
ZhuchkaTriplesix Aug 30, 2026
813aab1
feat(workspace): support binary and BLOB data types in DML mutation e…
ZhuchkaTriplesix Aug 30, 2026
b373fb7
Merge pull request #661 from QueryaHub/issue/658-dml-binary-blob-support
ZhuchkaTriplesix Aug 30, 2026
acc4475
feat(workspace): implement comprehensive keyboard navigation and mult…
ZhuchkaTriplesix Aug 30, 2026
b1a6ec8
Merge pull request #664 from QueryaHub/issue/662-grid-keyboard-naviga…
ZhuchkaTriplesix Aug 30, 2026
de4c626
feat(workspace): expand rich cell inspector modal with XML/HTML forma…
ZhuchkaTriplesix Aug 30, 2026
c5daddc
Merge pull request #665 from QueryaHub/issue/663-rich-cell-inspector-…
ZhuchkaTriplesix Aug 30, 2026
9957075
fix(extensions): harden plugin rpc bridge against stdin flush hangs a…
ZhuchkaTriplesix Aug 30, 2026
7c40ecd
Merge pull request #668 from QueryaHub/issue/666-plugin-rpc-bridge-re…
ZhuchkaTriplesix Aug 30, 2026
6fe525f
feat(extensions): implement extension driver session restart and reco…
ZhuchkaTriplesix Aug 30, 2026
94cbb13
Merge pull request #669 from QueryaHub/issue/667-extension-driver-res…
ZhuchkaTriplesix Aug 30, 2026
d68191c
perf(workspace): harden memory lifecycle, staging buffer disposal, an…
ZhuchkaTriplesix Aug 30, 2026
6c47c6e
Merge pull request #671 from QueryaHub/issue/670-memory-lifecycle-har…
ZhuchkaTriplesix Aug 30, 2026
608a294
perf(ui): accelerate menubar dropdown open and transition speed (#672)
ZhuchkaTriplesix Aug 30, 2026
8ae21ff
perf(ui): eliminate initial menubar dropdown delay on pointer down (#…
ZhuchkaTriplesix Aug 30, 2026
2177735
Merge pull request #673 from QueryaHub/issue/672-fast-menubar-dropdowns
ZhuchkaTriplesix Aug 30, 2026
2195433
chore(release): prepare release 0.4.14
ZhuchkaTriplesix Aug 30, 2026
f60191e
Merge pull request #674 from QueryaHub/release/0.4.14
ZhuchkaTriplesix Aug 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,58 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.14] - 2026-08-30

Near-instantaneous menubar dropdowns, native macOS PlatformMenuBar integration, destructive query confirmation safety modals, comprehensive memory optimizations (string interning, compact storage), grid keyboard navigation, rich cell inspector, and driver resilience hardening.

### Added

- **Instantaneous Menubar Dropdowns (#672, #673)** — Accelerated dropdown open animation to 60ms with `Curves.easeOutCubic`, eliminated initial pointer-down delay, unhindered titlebar dragging from gesture arena interference, and added toggle-close support.
- **Native macOS PlatformMenuBar Integration (#612, #626)** — Full native macOS top system menu integration with standard application, file, edit, view, and window submenus.
- **Destructive Query Confirmation Modal (#608, #622, #638, #641)** — Safety confirmation dialog for high-risk DDL and DML operations (`DROP`, `TRUNCATE`, bulk `DELETE`/`UPDATE` without `WHERE`) with SQL preview, detected operations list, and explicit acknowledgement check for core and extension workspaces.
- **Full Data Grid Keyboard Navigation (#662, #664)** — Seamless keyboard traversal across virtual grid cells using arrow keys, Tab/Shift+Tab, Enter to commit, and Escape to cancel.
- **Rich Cell Inspector Dialog (#663, #665)** — Dedicated multi-format modal inspector with tabbed views for raw text, JSON, XML/HTML, and binary/hex with word wrap toggle and copy actions.
- **Binary & BLOB Support in DML (#658, #661)** — Added full support for binary BLOB data in cell editing, DML staging buffer, and dialect-specific SQL generation (`X'...'`, `\x...`).
- **Extension Driver Crash Recovery & Restart UI (#667, #669)** — Visual driver crash banner with automatic heartbeat monitoring and one-click manual driver restart button.
- **Interactive Welcome Tour Expansion (#606, #624)** — Expanded onboarding guide with 6 interactive steps, keyboard shortcuts reference matrix, and 1-click sample sandbox setup.
- **Bi-Directional Navigation (#630, #635)** — Quick navigation links between database overview statistics, home view, and active tables.
- **Active Selection Sync to Tree (#633, #637)** — Synchronized active table and view selection in tabs with the connections sidebar tree.
- **Extension Driver SDUI Tree Selection Highlight (#639, #642)** — Visual selection highlighting for SDUI trees rendered by extension drivers.
- **Querya Extension Driver Mutation Standard (#563, #628)** — Formalized mutation standard specification and test suite for extension drivers.

### Changed & Performance

- **String Interning Pool (#604, #625)** — Deduplicated low-cardinality string allocations in query result grids, slashing heap allocations during large dataset exploration.
- **Compact Typed Storage & Lazy Cell Stringification (#605, #627)** — Compact memory representation for primitive column vectors, deferring string conversions until render.
- **Schwartzian Transform Grid Sorting (#602, #615)** — Precomputed sort keys in `sortResultGridRows` to eliminate redundant comparisons during column header sorts.
- **QuickSelect Median Calculation (#603, #616)** — O(N) median computation in `GridSelectionCalcEngine` instead of O(N log N) sorting.
- **Background Selection Calculation Offloading (#652, #655)** — Offloaded massive cell selection statistics calculations to background compute workers to keep the UI at 60 FPS.
- **DataGrid Filter Bar Debouncing (#651, #654)** — Debounced keystroke evaluation in the filter bar to avoid stutter during rapid filter typing.
- **ResultsTab Filtering Memoization (#650, #653)** — Cached filtered row indices when filter predicates and dataset rows remain unchanged across rebuilds.
- **Modularized Shared SQL Editor & Workbench (#646, #649)** — Clean modular decoupling of SQL editor tabs, query runners, and workbench state.
- **Inverted Core Imports Cleanup (#644, #647)** — Eliminated circular/inverted core-to-feature dependencies and cleanly extracted connection models to core.
- **App Lifecycle & Dispose Resource Cleanup (#670, #671)** — Hardened teardown of timer subscriptions, workers, and active sockets upon window closure.
- **Connection Pool Delay Tuning (#597, #601)** — Reduced idle connection disposal delay to 4 seconds for rapid tab switching.

### Fixed

- **In-Memory Secret Scrubbing (#607, #623)** — Zeroed in-memory buffers for database passwords and sensitive connection parameters immediately after authentication.
- **Redis Safe Disconnect & Socket Resilience (#657, #660)** — Protected Redis clients against unhandled socket close exceptions and connection teardown race conditions.
- **SQLite WAL Mode & Busy Timeout (#611, #617, #656, #659)** — Enabled Write-Ahead Logging (WAL) and 5000ms busy timeout in LocalDb and SQLite workspaces to eliminate database lock errors.
- **LocalDb Single-Flight Initialization (#645, #648)** — Guarded `LocalDb._open` against concurrent re-initialization race conditions.
- **Plugin JSON-RPC Bridge Resilience (#666, #668)** — Added heartbeat ping-pong, buffered message queues, and graceful restart on extension pipe drops.
- **SQL History Monotonic Ordering & Pruning (#629)** — Guaranteed monotonic ordering by auto-incrementing ID in query history queries and batch prune operations.
- **Literal 'NULL' vs Database NULL Differentiation (#595, #599)** — Fixed DML preview and staging buffer improperly treating the literal text `'NULL'` as SQL `NULL`.
- **DML Leading Zeroes Preservation (#594, #598)** — Prevented numeric string values (such as postal codes or phone numbers with leading zeroes) from being coerced to integers in generated DML.
- **Missing Primary Key Warning in DML (#596, #600)** — Displayed explicit duplicate key warnings in the DML preview modal for tables lacking primary keys.
- **Motion Wobble Harmonization (#631, #634)** — Harmonized workspace transition curves to eliminate dual-axis wobble during connection switching.
- **MongoDB & Redis Breadcrumbs (#632, #636)** — Preserved persistent breadcrumbs and smooth transitions during NoSQL key and collection navigation.
- **Focus Traversal in Connection Forms (#610, #621)** — Configured explicit `FocusTraversalGroup`s across multi-field connection dialogs.
- **Light Theme Accent Contrast (#609, #619)** — Enhanced light theme accent and ring contrast ratios for WCAG compliance.
- **Monospace Font Stack (#613, #618)** — Added Cascadia Code and Consolas to default monospace font fallback list.
- **Linux GDK Log Spam (#614, #620)** — Suppressed benign synthetic pointer and cursor theme GDK warnings in Linux console logs.


## [0.4.13] - 2026-08-25

Production-ready UI polish, complete interactive Data Grid editing suite, advanced query filtering, fluid collapsible navigation, and platform hardening.
Expand Down
101 changes: 91 additions & 10 deletions docker/clickhouse/init/01_seed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ CREATE TABLE IF NOT EXISTS querya.customers
name String,
email String,
city LowCardinality(String),
country LowCardinality(String),
is_vip Bool,
created_at DateTime
)
ENGINE = MergeTree
Expand All @@ -20,7 +22,10 @@ CREATE TABLE IF NOT EXISTS querya.products
sku String,
title String,
category LowCardinality(String),
price Decimal(10, 2)
price Decimal(10, 2),
cost Decimal(10, 2),
stock UInt32,
tags Array(String)
)
ENGINE = MergeTree
ORDER BY id;
Expand All @@ -31,6 +36,7 @@ CREATE TABLE IF NOT EXISTS querya.orders
customer_id UInt32,
status LowCardinality(String),
total Decimal(12, 2),
discount Decimal(5, 2),
placed_at DateTime
)
ENGINE = MergeTree
Expand All @@ -49,24 +55,93 @@ ORDER BY (order_id, product_id);
CREATE TABLE IF NOT EXISTS querya.events
(
event_id UUID,
event_time DateTime,
event_time DateTime64(3),
user_id UInt32,
event_type LowCardinality(String),
path String,
country LowCardinality(String),
ip_v4 IPv4,
properties Map(String, String),
revenue Decimal(12, 4)
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(event_time)
ORDER BY (event_time, user_id);

-- Comprehensive ClickHouse Data Types Table
CREATE TABLE IF NOT EXISTS querya.all_clickhouse_types
(
id UInt32,
col_int8 Int8,
col_int16 Int16,
col_int32 Int32,
col_int64 Int64,
col_uint8 UInt8,
col_uint16 UInt16,
col_uint32 UInt32,
col_uint64 UInt64,
col_float32 Float32,
col_float64 Float64,
col_decimal Decimal(18, 4),
col_string String,
col_fixed_string FixedString(8),
col_low_card LowCardinality(String),
col_date Date,
col_date32 Date32,
col_datetime DateTime,
col_datetime64 DateTime64(3),
col_uuid UUID,
col_ipv4 IPv4,
col_ipv6 IPv6,
col_enum Enum8('alpha' = 1, 'beta' = 2, 'gamma' = 3),
col_bool Bool,
col_array_str Array(String),
col_array_int Array(Int32),
col_tuple Tuple(title String, count UInt16),
col_map Map(String, String),
col_nullable_str Nullable(String),
col_nullable_int Nullable(Int32)
)
ENGINE = MergeTree
ORDER BY id;

INSERT INTO querya.all_clickhouse_types VALUES
(
1, -128, -32768, -2147483648, -9223372036854775808,
255, 65535, 4294967295, 18446744073709551615,
3.14159, 2.718281828459045, 1234567890.1234,
'ClickHouse String with emoji 🚀', 'CLICKHSE', 'Berlin',
'2026-08-26', '2026-08-26', '2026-08-26 10:30:00', '2026-08-26 10:30:00.123',
'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', '192.168.1.1', '2001:db8::1',
'alpha', true,
['one', 'two', 'three'], [10, 20, 30],
('Tuple Example', 42),
map('env', 'production', 'tier', 'gold'),
'Non-null string', 100
),
(
2, 0, 0, 0, 0,
0, 0, 0, 0,
0.0, 0.0, 0.0000,
'', '00000000', 'London',
'1970-01-01', '1970-01-01', '1970-01-01 00:00:00', '1970-01-01 00:00:00.000',
'00000000-0000-0000-0000-000000000000', '0.0.0.0', '::',
'beta', false,
[], [],
('', 0),
map(),
NULL, NULL
);

-- 500 customers
INSERT INTO querya.customers
SELECT
toUInt32(number + 1) AS id,
concat('Customer ', toString(number + 1)) AS name,
concat('user', toString(number + 1), '@example.com') AS email,
['Berlin', 'London', 'Madrid', 'Paris', 'Tokyo', 'New York', 'São Paulo', 'Cairo'][number % 8 + 1] AS city,
['DEU', 'GBR', 'ESP', 'FRA', 'JPN', 'USA', 'BRA', 'EGY'][number % 8 + 1] AS country,
(number % 5 = 0) AS is_vip,
now() - toIntervalDay(number % 365) AS created_at
FROM numbers(500);

Expand All @@ -77,7 +152,10 @@ SELECT
concat('SKU-', leftPad(toString(number + 1), 4, '0')) AS sku,
concat('Product ', toString(number + 1)) AS title,
['Electronics', 'Books', 'Home', 'Sports', 'Fashion'][number % 5 + 1] AS category,
toDecimal64(round(4.99 + (number % 200) * 1.37, 2), 2) AS price
toDecimal64(round(4.99 + (number % 200) * 1.37, 2), 2) AS price,
toDecimal64(round(2.00 + (number % 100) * 0.95, 2), 2) AS cost,
toUInt32(number * 12 % 300) AS stock,
['popular', 'new_arrival', 'sale'] AS tags
FROM numbers(80);

-- 2_000 orders
Expand All @@ -87,6 +165,7 @@ SELECT
toUInt32((number % 500) + 1) AS customer_id,
['new', 'paid', 'shipped', 'cancelled', 'refunded'][number % 5 + 1] AS status,
toDecimal64(round(9.99 + (number % 150) * 2.41, 2), 2) AS total,
toDecimal64(round((number % 10) * 1.5, 2), 2) AS discount,
now() - toIntervalHour(number % (24 * 120)) AS placed_at
FROM numbers(2000);

Expand All @@ -99,14 +178,16 @@ SELECT
toDecimal64(round(4.99 + (number % 200) * 1.37, 2), 2) AS unit_price
FROM numbers(6000);

-- 50_000 analytics events
-- 10_000 events
INSERT INTO querya.events
SELECT
generateUUIDv4() AS event_id,
now() - toIntervalSecond(number % (86400 * 30)) AS event_time,
now64(3) - toIntervalMinute(number % (60 * 24 * 30)) AS event_time,
toUInt32((number % 500) + 1) AS user_id,
['page_view', 'add_to_cart', 'purchase', 'search', 'login'][number % 5 + 1] AS event_type,
concat('/app/', ['home', 'catalog', 'product', 'checkout', 'account'][number % 5 + 1]) AS path,
['DE', 'GB', 'ES', 'FR', 'JP', 'US', 'BR', 'EG'][number % 8 + 1] AS country,
if(number % 5 = 2, toDecimal64(round((number % 100) * 1.25, 4), 4), toDecimal64(0, 4)) AS revenue
FROM numbers(50000);
['pageview', 'click', 'scroll', 'purchase', 'add_to_cart'][number % 5 + 1] AS event_type,
['/home', '/products', '/checkout', '/cart', '/profile'][number % 5 + 1] AS path,
['DEU', 'USA', 'GBR', 'FRA', 'JPN', 'CAN'][number % 6 + 1] AS country,
toIPv4(concat('192.168.1.', toString(1 + (number % 254)))) AS ip_v4,
map('browser', 'Chrome', 'version', '128.0') AS properties,
toDecimal64(round((number % 50) * 1.25, 4), 4) AS revenue
FROM numbers(10000);
Loading
Loading