From 95d03bda882205df7f241af943c4422a5bd34413 Mon Sep 17 00:00:00 2001 From: Markus Rudolph Date: Mon, 5 Jun 2023 15:37:06 +0200 Subject: [PATCH] Add documentation --- README.md | 4 +- packages/langium-sql/README.md | 51 ++ packages/langium-sql/docs/langium_sql.svg | 601 ++++++++++++++++++++++ 3 files changed, 655 insertions(+), 1 deletion(-) create mode 100644 packages/langium-sql/README.md create mode 100644 packages/langium-sql/docs/langium_sql.svg diff --git a/README.md b/README.md index 484f438..e4bd0d1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # Langium/SQL -This project is going to provide a language server for SQL dialects. \ No newline at end of file +This project provides a language server for SQL dialects. + +Go to the [core package](./packages/langium-sql/README.md) for better documentation. \ No newline at end of file diff --git a/packages/langium-sql/README.md b/packages/langium-sql/README.md new file mode 100644 index 0000000..260790f --- /dev/null +++ b/packages/langium-sql/README.md @@ -0,0 +1,51 @@ +# Langium/SQL + +This project provides a language server for SQL dialects. + +## Features + +* **Schema-driven**: Add a set of table definitions to spread out the world for your SELECT queries. + The table definitions can be located in a different file of the same workspace. You can keep definitions and queries separated. +* **Code completion**: Press Ctrl + Space keys to trigger the completion directly. You will get suggestions for the current context. +* **Syntax highlighting**: to distinguish what are keywords, identifiers, numeric literals and for a better perception of the SQL syntax. +* **Symbol search**: Use Cmd or Ctrl + mouse click on a column name to find the definition of it or explore the places where a column is used. +* **Fast feedback** about contextual correctness: Whether referenced columns exist or types on certain operators are matching. +* **Super-set approach**: Any piece of any dialect that is missing can be added to the main grammar and be protected from other dialects using validations. +* **Highly customizable**: Any behavior or aspect that is missing for your specific use case can be easily overwritten. + + +![](docs/langium_sql.svg) + +## Demo + +We prepared a showcase on the Langium project website. You can find it [here](https://langium.org/showcase/sql/). + +The given schema describes an airport database. It contains tables for airports, airlines, flights, and passengers. The queries are written in the MySQL dialect. + +## Getting started + +### Installation + +```sh +npm install langium-sql +``` + +or + +```sh +yarn add langium-sql +``` + +### Learn more + +Checkout the [announcing blog post](https://www.typefox.io/blog/langium-sql) or the [Langium documentation](https://github.com/langium/langium#documentation) to get familiar with the project structure. + +### Usage and Examples + +``` +TODO +``` + +## License + +[MIT](../../LICENSE) \ No newline at end of file diff --git a/packages/langium-sql/docs/langium_sql.svg b/packages/langium-sql/docs/langium_sql.svg new file mode 100644 index 0000000..be2f71b --- /dev/null +++ b/packages/langium-sql/docs/langium_sql.svg @@ -0,0 +1,601 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +