Code Monkey home page Code Monkey logo

vscode-dbml's Introduction

DBML Language Support

Version 0.3.5 Badge MIT License Badge

This Visual Studio Code extension provides language support for the Database Markup Language (DBML).

Syntax Highlighting

Syntax highlighting is enabled for files with the .dbml extension.

Syntax Example

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) 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.

Contributing

If you want to add to this project, feel free to fork the repository and submit a pull request.

vscode-dbml's People

Contributors

mattmeyers avatar jaimeloeuf avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.