Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattmeyers/vscode-dbml
VS Code language support for DBML
https://github.com/mattmeyers/vscode-dbml
dbml vscode-dbml vscode-extension vscode-language
Last synced: 8 days ago
JSON representation
VS Code language support for DBML
- Host: GitHub
- URL: https://github.com/mattmeyers/vscode-dbml
- Owner: mattmeyers
- License: mit
- Created: 2019-08-01T04:20:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-01T09:01:36.000Z (almost 4 years ago)
- Last Synced: 2024-06-17T22:48:37.293Z (6 months ago)
- Topics: dbml, vscode-dbml, vscode-extension, vscode-language
- Language: TypeScript
- Homepage:
- Size: 248 KB
- Stars: 35
- Watchers: 3
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - mattmeyers/vscode-dbml - VS Code language support for DBML (TypeScript)
README
> ## ⚠️ Please Read ⚠️
>
> I no longer use VS Code and have no intention to actively maintain this extension.
> If you notice any differences between this extension and the official DBML language, please submit a PR with a fix.
> I will happily review, merge, and release any fixes.
> Thanks!# DBML Language Support
[![Version 0.4.1 Badge][version-badge]][changelog] [![MIT License Badge][license-badge]][license]
This Visual Studio Code extension provides language support for the Database Markup Language ([DBML](https://dbml.org)).
## Syntax Highlighting
Syntax highlighting is enabled for files with the `.dbml` extension.
![Syntax Example](https://raw.githubusercontent.com/mattmeyers/vscode-dbml/master/images/dbml_syntax_example.png)
## Commands
### To SQL
When focusing a `.dbml` file, the `DBML: To SQL` command becomes available in the command palette. This command leverages the `@dbml/core` ([source](https://github.com/holistics/dbml/tree/master/packages/dbml-core)) package to generate an SQL script based on the provided schema.
Selecting this commands presents all available dialects. At this time the three available dialects are PostgreSQL, MySQL, and SQL Server. After choosing a dialect, enter an output filename. If a relative path is provided, the generated file will be placed relative to the focused `.dbml` file. Otherwise is will be placed at the provided absolute path.
### From SQL
When focusing a `.sql` file, the `DBML: From SQL` command appears in the command palette. This command acts as the opposite of the `DBML: To SQL` command and generates a `.dbml` from from the provided `.sql` file. The dialect of the SQL must be provided. At this time, this command only works for PostgreSQL and MySQL.
## Snippets
Snippets are provided for quickly creating tables, enums, and references. To use a snippet, begin typing any of the following keys.
- `table`: Create a new table with an auto-incrementing int id as the primary key
- `enum`: Create a new enum
- `oto`: Create a one-to-one reference
- `otm`: Create a one-to-many reference
- `mto`: Create a many-to-one reference
- `mtm`: Create a many-to-many join table## Issues
If you find an error or bug, please [create an issue](https://github.com/mattmeyers/vscode-dbml/issues/new).
## Contributing
If you want to add to this project, feel free to fork the repository and submit a pull request.
[changelog]: ./CHANGELOG.md
[license]: ./LICENSE
[version-badge]: https://img.shields.io/badge/version-0.4.1-blue.svg
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg