Skip to content

@sqlrooms/duckdb-core / parseQualifiedSqlIdentifier

Function: parseQualifiedSqlIdentifier() ​

parseQualifiedSqlIdentifier(qualifiedName): Partial<QualifiedTableName> | undefined

Parses a possibly-qualified SQL identifier into database, schema, and table segments. The parser is quote-aware, so dots inside double-quoted identifiers are treated as part of the current segment.

Parameters ​

ParameterType
qualifiedNamestring | undefined

Returns ​

Partial<QualifiedTableName> | undefined

Example ​

ts
parseQualifiedSqlIdentifier('schema.table')
// {schema: 'schema', table: 'table'}
parseQualifiedSqlIdentifier('"memory"."main"."events.2026"')
// {database: 'memory', schema: 'main', table: 'events.2026'}