FlyQL provides identical functionality across Go, Python, and JavaScript. This matrix maps every public API function and type across all three languages.
| Convention | Go | Python | JavaScript |
|---|
| Functions | PascalCase | snake_case | camelCase |
| Types/Classes | PascalCase | PascalCase | PascalCase |
| Constants | PascalCase | UPPER_SNAKE (enum) | UPPER_SNAKE (frozen object) |
Rule: Given an operation name and a language, the function name follows the convention above. For example, “parse key” → ParseKey (Go), parse_key (Python), parseKey (JavaScript).
| Operation | Go | Python | JavaScript |
|---|
| Parse query | Parse(query) | parse(query) | parse(query) |
| Parse key | ParseKey(key) | parse_key(key) | parseKey(key) |
| Bind parameters | BindParams(node, params) | bind_params(node, params) | bindParams(node, params) |
| Types | | | |
| AST node | Node | Node | Node |
| Expression | Expression | Expression | Expression |
| Key | Key | Key | Key |
| Parameter | Parameter | Parameter | Parameter |
| FunctionCall | FunctionCall | FunctionCall | FunctionCall |
| Column | Column | Column | Column |
| Column schema | ColumnSchema | ColumnSchema | ColumnSchema |
| Range | Range | Range | Range |
| Operators | string constants | Operator, BoolOperator (enums) | Operator, BoolOperator |
Column/value type (flyql.Type) | flyql.Type (flyql.TypeString, …) | Type (Type.String, …) | Type (Type.String, …) |
| Parser literal kind | literal.Integer, etc. | LiteralKind.INTEGER, etc. | LiteralKind.INTEGER, etc. |
| Operation | Go | Python | JavaScript |
|---|
| AST → WHERE SQL | ToSQLWhere(root, columns) | to_sql_where(root, columns) | generateWhere(root, columns) |
| Expression → SQL | ExpressionToSQLWhere(expr, columns) | expression_to_sql_where(expr, columns) | (internal) |
| Escape parameter | EscapeParam(item) | escape_param(item) | escapeParam(item) |
| Escape identifier | EscapeIdentifier(name) (PG only) | escape_identifier(name) (PG only) | escapeIdentifier(name) (PG only) |
All three dialects (ClickHouse, PostgreSQL, StarRocks) expose the same function names. Import from the dialect-specific subpath:
| Dialect | Go | Python | JavaScript |
|---|
| ClickHouse | generators/clickhouse | flyql.generators.clickhouse.generator | flyql/generators/clickhouse |
| PostgreSQL | generators/postgresql | flyql.generators.postgresql.generator | flyql/generators/postgresql |
| StarRocks | generators/starrocks | flyql.generators.starrocks.generator | flyql/generators/starrocks |
| Operation | Go | Python | JavaScript |
|---|
| Columns → SELECT SQL | ToSQLSelect(text, columns) | to_sql_select(text, columns) | generateSelect(text, columns) |
| Result types | SelectResult, SelectColumn | SelectResult, SelectColumn | (returned as object) |
| Operation | Go | Python | JavaScript |
|---|
| Evaluate AST | evaluator.Evaluate(root, record) | evaluator.evaluate(root, record) | evaluator.evaluate(root, record) |
| Convenience match | Match(query, data) | (use Evaluator) | match(query, data) |
| Types | | | |
| Evaluator | NewEvaluator() | Evaluator() | Evaluator() |
| Record | NewRecord(data) | Record(data=data) | Record(data) |
| Operation | Go | Python | JavaScript |
|---|
| Parse columns | Parse(text) | parse(text) | parse(text) |
| Parse to dicts | (N/A) | parse_to_dicts(text) | parseToDicts(text) |
| Parse to JSON | ParseToJSON(text) | parse_to_json(text) | parseToJson(text) |
| Validate | Diagnose(parsed, schema) | diagnose(parsed, schema) | diagnose(parsed, schema) |
| Types | | | |
| Parsed column | ParsedColumn | ParsedColumn | ParsedColumn |
The tokenizer is a shared primitive that groups the parser’s per-character output into typed tokens with {text, type, start, end}. Use it to build custom highlighters or formatters on top of FlyQL.
| Operation | Go | Python | JavaScript |
|---|
| Tokenize query | Tokenize(text, "query") | tokenize(text) | tokenize(text) |
| Tokenize columns | (N/A) | (raises ValueError) | tokenize(text, { mode: 'columns' }) |
| Types | | | |
| Token | Token (plain struct) | Token (frozen dataclass) | plain object |
Columns mode is JavaScript-only. Python raises ValueError and Go returns a non-nil error with the message columns mode is only available in the JavaScript package.
| Operation | Go | Python | JavaScript |
|---|
| Registry | DefaultRegistry() | default_registry() | defaultRegistry() |
| Types | | | |
| Transformer interface | Transformer (interface) | Transformer (ABC) | Transformer (class) |
| Transformer input/output type | flyql.Type | Type | Type |
| Arg spec | ArgSpec | ArgSpec | ArgSpec |
| Registry type | TransformerRegistry | TransformerRegistry | TransformerRegistry |
| Operation | Go | Python | JavaScript |
|---|
| Diagnose AST | Diagnose(root, schema) | diagnose(root, schema) | diagnose(root, schema) |
| Build schema from columns | FromColumns(cols) | ColumnSchema.from_columns(cols) | ColumnSchema.fromColumns(cols) |
| Build schema from plain object | FromPlainObject(obj) | ColumnSchema.from_plain_object(obj) | ColumnSchema.fromPlainObject(obj) |
| Resolve nested path | schema.Resolve(segments) | schema.resolve(segments) | schema.resolve(segments) |
| Types | | | |
| Diagnostic | Diagnostic | Diagnostic | Diagnostic |
| Column schema | *ColumnSchema | ColumnSchema | ColumnSchema |
Each dialect package exposes a helper that bridges from a list of dialect-specific Columns to a canonical flyql.ColumnSchema for use with the validator. See Column Types for the full contract.
| Dialect | Go | Python | JavaScript |
|---|
| ClickHouse | clickhouse.ToFlyQLSchema(cols) | clickhouse.to_flyql_schema(cols) | toFlyQLSchema(cols) |
| PostgreSQL | postgresql.ToFlyQLSchema(cols) | postgresql.to_flyql_schema(cols) | toFlyQLSchema(cols) |
| StarRocks | starrocks.ToFlyQLSchema(cols) | starrocks.to_flyql_schema(cols) | toFlyQLSchema(cols) |
Python — from flyql import parse, bind_params, Node, Expression, Parameter, FunctionCall, Key, Column, ColumnSchema, Operator, Range, Diagnostic, diagnose, Type, LiteralKind
JavaScript — import { parse, bindParams, Node, Expression, Parameter, FunctionCall, Key, Column, ColumnSchema, Operator, Range, Type, LiteralKind } from 'flyql'
Go — import "github.com/iamtelescope/flyql/golang" (core, exports flyql.Type and flyql.Type* constants), dialect-specific generator imports separately