Registry / database / flyql
library1.0.0jsnpmunverified

FlyQL is a lightweight, injection-proof query language that parses human-readable filter expressions into a portable AST, transpiles to SQL across ClickHouse, PostgreSQL, and StarRocks, and evaluates in-memory. Current stable version is 1.0.0, released infrequently. It differentiates from similar tools (e.g., TypeORM, Sequelize) by focusing on safe query parsing with AST support and multiple SQL dialects. Unlike raw SQL builders, FlyQL parses a DSL that cannot be directly injected, and its AST can be used for custom transformations. It also includes column expression parsing and syntax highlighting.

npm install flyql
INSTALL
IMPORT
SIG · FLYQL
F
flyql
databasejavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse
import { parse } from 'flyql'
const { parse } = require('flyql')
ESM-only; no CommonJS support.
generateWhere
import { generateWhere, newColumn } from 'flyql/generators/clickhouse'
import { generateWhere } from 'flyql'
Generators are in subpaths; must import from the specific dialect path.
match
import { match } from 'flyql/matcher'
import { match } from 'flyql'
Matcher is in a separate subpath; not exported from main.

Parses a filter expression and generates ClickHouse SQL WHERE clause.

import { parse } from 'flyql' import { generateWhere, newColumn } from 'flyql/generators/clickhouse' const result = parse("status >= 400 and host like 'prod%'") const columns = { status: newColumn({ name: 'status', type: 'UInt32' }), host: newColumn({ name: 'host', type: 'String' }), } const sql = generateWhere(result.root, columns) console.log(sql) // e.g., "(status >= 400) AND (host LIKE 'prod%')"
Debug
Known issues
breakingNode.js version requirement: Node.js >= 18.0.0 / 16+
fix
Ensure Node.js 16+ is installed (v18 recommended).
affects: >=1.0.0
gotchaGenerators are not part of main export; must import from subpath
fix
Use import from 'flyql/generators/clickhouse' etc.
affects: >=1.0.0
gotchaMatcher is separate subpath, not in core
fix
Import from 'flyql/matcher'.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'flyql'
Package not installed or incorrect import path
fix
Run 'npm install flyql' and ensure import path is correct.
Error: generateWhere is not a function
Importing generateWhere from wrong path
fix
Use 'import { generateWhere } from 'flyql/generators/clickhouse''.
SyntaxError: Unexpected token 'export'
Using CommonJS require() on ESM-only package
fix
Switch to 'import' syntax or use dynamic import.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
packageflyql
flyql — npm install flyql · libregistry