Skip to content

Cross-Language API Matrix

FlyQL provides identical functionality across Go, Python, and JavaScript. This matrix maps every public API function and type across all three languages.

ConventionGoPythonJavaScript
FunctionsPascalCasesnake_casecamelCase
Types/ClassesPascalCasePascalCasePascalCase
ConstantsPascalCaseUPPER_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).

OperationGoPythonJavaScript
Parse queryParse(query)parse(query)parse(query)
Parse keyParseKey(key)parse_key(key)parseKey(key)
Bind parametersBindParams(node, params)bind_params(node, params)bindParams(node, params)
Types
AST nodeNodeNodeNode
ExpressionExpressionExpressionExpression
KeyKeyKeyKey
ParameterParameterParameterParameter
FunctionCallFunctionCallFunctionCallFunctionCall
ColumnColumnColumnColumn
Column schemaColumnSchemaColumnSchemaColumnSchema
RangeRangeRangeRange
Operatorsstring constantsOperator, BoolOperator (enums)Operator, BoolOperator
Column/value type (flyql.Type)flyql.Type (flyql.TypeString, …)Type (Type.String, …)Type (Type.String, …)
Parser literal kindliteral.Integer, etc.LiteralKind.INTEGER, etc.LiteralKind.INTEGER, etc.
OperationGoPythonJavaScript
AST → WHERE SQLToSQLWhere(root, columns)to_sql_where(root, columns)generateWhere(root, columns)
Expression → SQLExpressionToSQLWhere(expr, columns)expression_to_sql_where(expr, columns)(internal)
Escape parameterEscapeParam(item)escape_param(item)escapeParam(item)
Escape identifierEscapeIdentifier(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:

DialectGoPythonJavaScript
ClickHousegenerators/clickhouseflyql.generators.clickhouse.generatorflyql/generators/clickhouse
PostgreSQLgenerators/postgresqlflyql.generators.postgresql.generatorflyql/generators/postgresql
StarRocksgenerators/starrocksflyql.generators.starrocks.generatorflyql/generators/starrocks
OperationGoPythonJavaScript
Columns → SELECT SQLToSQLSelect(text, columns)to_sql_select(text, columns)generateSelect(text, columns)
Result typesSelectResult, SelectColumnSelectResult, SelectColumn(returned as object)
OperationGoPythonJavaScript
Evaluate ASTevaluator.Evaluate(root, record)evaluator.evaluate(root, record)evaluator.evaluate(root, record)
Convenience matchMatch(query, data)(use Evaluator)match(query, data)
Types
EvaluatorNewEvaluator()Evaluator()Evaluator()
RecordNewRecord(data)Record(data=data)Record(data)
OperationGoPythonJavaScript
Parse columnsParse(text)parse(text)parse(text)
Parse to dicts(N/A)parse_to_dicts(text)parseToDicts(text)
Parse to JSONParseToJSON(text)parse_to_json(text)parseToJson(text)
ValidateDiagnose(parsed, schema)diagnose(parsed, schema)diagnose(parsed, schema)
Types
Parsed columnParsedColumnParsedColumnParsedColumn

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.

OperationGoPythonJavaScript
Tokenize queryTokenize(text, "query")tokenize(text)tokenize(text)
Tokenize columns(N/A)(raises ValueError)tokenize(text, { mode: 'columns' })
Types
TokenToken (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.

OperationGoPythonJavaScript
RegistryDefaultRegistry()default_registry()defaultRegistry()
Types
Transformer interfaceTransformer (interface)Transformer (ABC)Transformer (class)
Transformer input/output typeflyql.TypeTypeType
Arg specArgSpecArgSpecArgSpec
Registry typeTransformerRegistryTransformerRegistryTransformerRegistry
OperationGoPythonJavaScript
Diagnose ASTDiagnose(root, schema)diagnose(root, schema)diagnose(root, schema)
Build schema from columnsFromColumns(cols)ColumnSchema.from_columns(cols)ColumnSchema.fromColumns(cols)
Build schema from plain objectFromPlainObject(obj)ColumnSchema.from_plain_object(obj)ColumnSchema.fromPlainObject(obj)
Resolve nested pathschema.Resolve(segments)schema.resolve(segments)schema.resolve(segments)
Types
DiagnosticDiagnosticDiagnosticDiagnostic
Column schema*ColumnSchemaColumnSchemaColumnSchema

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.

DialectGoPythonJavaScript
ClickHouseclickhouse.ToFlyQLSchema(cols)clickhouse.to_flyql_schema(cols)toFlyQLSchema(cols)
PostgreSQLpostgresql.ToFlyQLSchema(cols)postgresql.to_flyql_schema(cols)toFlyQLSchema(cols)
StarRocksstarrocks.ToFlyQLSchema(cols)starrocks.to_flyql_schema(cols)toFlyQLSchema(cols)

Pythonfrom flyql import parse, bind_params, Node, Expression, Parameter, FunctionCall, Key, Column, ColumnSchema, Operator, Range, Diagnostic, diagnose, Type, LiteralKind

JavaScriptimport { parse, bindParams, Node, Expression, Parameter, FunctionCall, Key, Column, ColumnSchema, Operator, Range, Type, LiteralKind } from 'flyql'

Goimport "github.com/iamtelescope/flyql/golang" (core, exports flyql.Type and flyql.Type* constants), dialect-specific generator imports separately