codemirror/lang-sql is an open-source project on GitHub with 100 stars, written primarily in TypeScript. SQL language support for the CodeMirror code editor
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This repository has moved to https://code.haverbeke.berlin/codemirror/lang-sql
@codemirror/lang-sql
[ WEBSITE | ISSUES | FORUM | CHANGELOG ]
This package implements SQL language support for the
CodeMirror code editor.
The project page has more information, a
number of examples and the
documentation.
This code is released under an
MIT license.
We aim to be an inclusive, welcoming community. To make that explicit,
we have a code of
conduct that applies
to communication around the project.
Usage
import {EditorView, basicSetup} from "codemirror"
import {sql} from "@codemirror/lang-sql"
const view = new EditorView({
parent: document.body,
doc: `select * from users where age > 20`,
extensions: [basicSetup, sql()]
})
Use sql({dialect: PostgreSQL}) or similar to select a specific SQL
dialect.
API Reference
sql(config?: SQLConfig = {}) → LanguageSupport
SQL language support for the given SQL dialect, with keyword
completion, and, if provided, schema-based completion as extra
extensions.
interface
SQLConfig
Options used to configure an SQL extension.
dialect?: SQLDialect
The dialect to use. Defaults to
StandardSQL.
schema?: SQLNamespace
You can use this to define the schemas, tables, and their fields
for autocompletion.
defaultTable?: string
When given, columns from the named table can be completed
directly at the top level.
defaultSchema?: string
When given, tables prefixed with this schema name can be
completed directly at the top level.
upperCaseKeywords?: boolean
When set to true, keyword completions will be upper-case.
The type used to describe a level of the schema for
completion. Can be an array of
options (columns), an object mapping table or schema names to
deeper levels, or a {self, children} object that assigns a
completion option to use for its parent property, when the default option
(its name as label and type "type") isn't suitable.
class
SQLDialect
Represents an SQL dialect.
language: LRLanguage
The language for this dialect.
spec: SQLDialectSpec
The spec used to define this dialect.
extension: Extension
Returns the language for this dialect as an extension.
The most recent commit recorded on codemirror/lang-sql was 6 months ago, based on the GitHub push timestamp. The repository has 48 forks — one of the better signals of community interest.
How many stars does codemirror/lang-sql have?
codemirror/lang-sql has 100 GitHub stars — refresh the page for the live number, or check github.com/codemirror/lang-sql. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is codemirror/lang-sql open source?
Yes — codemirror/lang-sql ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/codemirror/lang-sql.
What is codemirror/lang-sql?
codemirror/lang-sql (codemirror/lang-sql) is a TypeScript project on GitHub. From the project's own README: SQL language support for the CodeMirror code editor
Where do I read more about codemirror/lang-sql?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/codemirror/lang-sql is the definitive source.
Read full README in the tab above.
Still deciding about lang-sql?
One click hands the question to an AI along with this page — see what it says about lang-sql.