Langium/SQL is an extensible language server for SQL dialects built on the Langium framework. It provides schema-driven SQL editing with code completion, syntax highlighting, symbol search, and real-time validation. The current stable version is 0.3.2, released on an irregular cadence. Key differentiators include a super-set approach that allows adding missing dialect features to the grammar while protecting others via validations, and high customizability where any behavior can be overridden. It is designed for integration into editors and IDEs via the Language Server Protocol.
npm install langium-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a SQL query using Langium/SQL dialect for MySQL and prints the parse result.
Use import { parseHelper } from 'langium-sql/test-utils'; instead of from 'langium-sql'.Update imports to include the full subpath, e.g., 'langium-sql/dialects/mysql/data-types'.
Ensure the schema file path is correct and check for validation errors in the returned document.
Replace createLangiumSqlServices with createTestServices and pass dialect types explicitly.
Ensure langium-sql version >= 0.3.0, and verify your bundler or TypeScript resolves subpath exports.
Use: const parse = await parseHelper(services.Sql, 'schema.sql'); then const doc = await parse('SELECT ...');Import from 'langium-sql/dialects/mysql/data-types'.