{"id":17329616,"url":"https://github.com/ankoh/dashql","last_synced_at":"2026-03-09T08:02:59.820Z","repository":{"id":102525891,"uuid":"597670390","full_name":"ankoh/dashql","owner":"ankoh","description":"[WIP] Unofficial SQL client for the Hyper database system and Salesforce Data 360","archived":false,"fork":false,"pushed_at":"2026-03-08T17:39:56.000Z","size":29600,"stargazers_count":38,"open_issues_count":12,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-08T21:32:36.002Z","etag":null,"topics":["browser","editor","javascript","node","sql","tauri","wasm","web"],"latest_commit_sha":null,"homepage":"http://dashql.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ankoh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-05T09:15:18.000Z","updated_at":"2026-02-10T05:54:49.000Z","dependencies_parsed_at":"2023-09-24T08:02:28.048Z","dependency_job_id":"3c0932dd-590e-4c04-b00c-873a34ac008a","html_url":"https://github.com/ankoh/dashql","commit_stats":null,"previous_names":["ankoh/sqlynx","ankoh/dashql"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ankoh/dashql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankoh%2Fdashql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankoh%2Fdashql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankoh%2Fdashql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankoh%2Fdashql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankoh","download_url":"https://codeload.github.com/ankoh/dashql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankoh%2Fdashql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30287449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","editor","javascript","node","sql","tauri","wasm","web"],"created_at":"2024-10-15T14:48:56.311Z","updated_at":"2026-03-09T08:02:59.809Z","avatar_url":"https://github.com/ankoh.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"misc/logo-dashql-glyphs/logo.png\" width=100\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ankoh/dashql/actions/workflows/push_main.yml\"\u003e\u003cimg src=\"https://github.com/ankoh/dashql/actions/workflows/push_main.yml/badge.svg?branch=main\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/ankoh/dashql/actions/workflows/renovate.yml\"\u003e\u003cimg src=\"https://github.com/ankoh/dashql/actions/workflows/renovate.yml/badge.svg\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/ankoh/dashql?branch=main\"\u003e\u003cimg src=\"https://coveralls.io/repos/github/ankoh/dashql/badge.svg?branch=main\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MPL-2.0\"\u003e\u003cimg src=\"misc/badge_mpl2.svg?raw=true\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/ankoh/dashql/commits/main\"\u003e\u003cimg src=\"misc/badge_wip.svg?raw=true\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nDashQL is a library for creating and analyzing a compact version of the PostgreSQL AST.\nIt builds around a Bison parser that materializes AST Nodes into a single Flatbuffer vector.\nIt can be compiled to WebAssembly and has been originally built for lightweight SQL instrumentation, running on every user keystroke in DashQL.\n\n_Each AST node is packed into [24 bytes](https://github.com/ankoh/dashql/blob/b95b3f0959f3a17db8378e79d0adb2fa29925a93/proto/fb/dashql/parsed_script.fbs#L357-L364) and references matched substrings in the original script text.\nThis encoding is compact and efficient for simple passes, but is not directly suited for a full semantic analysis._\n\n\u003cimg src=\"misc/ast.png?raw=true\" width=\"680px\"\u003e\n\n---\n\n### Building\n\n```\nmake infra_macos          # Install dependencies to .infra, `infra_linux` for linux\nyarn install              # Install npm packages\n\nmake protobuf             # Generate protocol buffers\nmake flatbuf              # Generate flatbuffers\n\nmake core_native_o0       # Build unoptimized native core library\nmake core_native_o2       # Build optimized native core library with debug symbols\nmake core_native_tests    # Run native tests\nmake core_wasm_o3         # Build optimized wasm core library\nmake core_js_o3           # Build js bundle with wasm module and js api\nmake core_js_tests        # Run js tests using the wasm module\nmake snapshots            # Update snapshots\nmake benchmark_pipeline   # Benchmark the processing pipeline\n\nmake svg_symbols          # Update svg sprites used in the PWA\n\nmake compute_wasm_o3      # Build wasm dataframe library\nmake pwa_tests            # Run js tests of the PWA\n\n# PWA dev server, you will spend most time here during development\n#\n# Make sure to increase the number of file system watchers for hot module reloading:\n# MacOS: sudo sysctl -w kern.maxfiles=524288\n# Linux: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf \u0026\u0026 sudo sysctl -p\n#\nmake pwa_dev              # Run the dev server of the PWA\n\n# Native app\nmake pwa_reloc            # Build relocatable PWA\nmake native_tests         # Run rust tests of native app\nmake native_mac_o0        # Create a debug build packaged as .dmg, open devtools with (cmd + alt + i)\nmake native_mac_universal # Create a universal build packaged as .dmg\nmake native_mac_updates   # Create universal app updates with code signing (requires signing key)\n```\n\n---\n\n### Incremental parsing with Tree-sitter?\n\nTree-sitter is a great parser framework and I recommend everyone to try it out.\nIt gives you flexible incremental parsing without much hassle and is a perfect fit for many editors.\n\nDashQL was built for specific database systems.\nThe systems Hyper, Umbra, NoisePage, AlloyDB and DuckDB all use Bison parsers derived from the PostgreSQL grammar.\nThe PostgreSQL grammar stood the test of time and established itself as de-facto reference for SQL syntax.\nStaying close to PostgreSQL simplifies building frontends for these database systems without worrying too much about grammar differences.\nDashQL builds around a carefully optimized and very fast parser based on the PostgreSQL-grammar and provides lightweight semantic analysis passes, running on every single keystroke.\n\nDashQL is still doing work in `O(text-length)` with every input event, as opposed to `O(change-size)` by Tree-sitter.\nYet, DashQL analyzes most input in well under a millisecond in your browser, even when replacing the entire text.\nAfter all, the parser is not the only component that has to be tuned for fast analysis passes, incremental parsing alone \"only\" gives you a head-start for the AST update.\nDashQL maintains B+-tree ropes, dictionary-encodes and tags SQL object names in-flight and performs efficient post-order DFS traversals through linear scans over a compact AST representation.\n\n---\n\n### What does \"fast\" mean in numbers?\n\nHere are timings for TPC-DS Q1 on my laptop. All steps run single-threaded on a M1Max.\nDashQL spends **5us** with scanning, **10us** with parsing, and **15us** with analyzing, leaving plenty of time for Javascript to reflect changes in the UI.\n\n```\nRun on (10 X 24.1324 MHz CPU s)\nCPU Caches:\n  L1 Data 64 KiB\n  L1 Instruction 128 KiB\n  L2 Unified 4096 KiB (x10)\nLoad Average: 10.72, 6.78, 5.17\n----------------------------------------------------------\nBenchmark                Time             CPU   Iterations\n----------------------------------------------------------\nscan_query            5367 ns         5349 ns       100176\nparse_query          10602 ns        10542 ns        64493\nanalyze_query        15533 ns        15495 ns        45057\nmove_cursor            435 ns          434 ns      1623384\ncomplete_cursor       6200 ns         6173 ns       111914\ncompute_layout       13414 ns        13377 ns        53352\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankoh%2Fdashql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankoh%2Fdashql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankoh%2Fdashql/lists"}