Code Monkey home page Code Monkey logo

vscode-extension-dbml-viewer's Introduction

DBML Live Preview

MIT License

An extension for Visual Studio Code that provides real-time rendering of a database schema from the generated DBML code.

Roadmap

  • Live preview (eye icon in the top right corner / command palette)
  • Download SVG (in command palette)
  • Code Structure with layout of code
  • Light/dark mode toggle
  • Zooming in/out
  • Change the ugly logo

Demo

Demo

Appendix

This extension is a perfect complement to vscode-dbml (color syntaxing and SQL export commands).

References

Here are some related projects used in this extension

@softwaretechnik-berlin/dbml-renderer

Authors

vscode-extension-dbml-viewer's People

Contributors

durandal14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vscode-extension-dbml-viewer's Issues

Error using decimal(10,2)

If I use the data_type decima(10,2), I get error.

using decimal(10,2)

Table utenti {
    id int [pk, increment]
    nome varchar     
    data_creato timestamp
    numero decimal(10,2)
    nazione_id int
}

immagine

using decimal(10)

Table utenti {
    id int [pk, increment]
    nome varchar     
    data_creato timestamp
    numero decimal(10)
    nazione_id int
}

immagine

Blank after "]", generates error

DBML Live Preview 0.0.1
VSCODE 1.82.2
Windows 10 Pro 22H2

Hello,
when after a closing square bracket, there are one or more blanks, the extension reports an error.
I tried disabling all extensions, but that's not a solution.

immagine

immagine

EXAMPLES

id int [pk, increment]

OK

id int [pk, increment]

Error generating SVG

id int [pk, increment] //

OK

nome varchar

OK

Installation works but no functionality on my machine

I just installed the dbml-viewer from VS Marketplace but it seems to not provide any functionality on my machine: The eye icon does not show (and there is no .DBML syntax highlighting in case this also comes with dbml-viewer).

I am on Windows 10. There were no errors during installation. I tried to restart VS Code and Windows but it did not help.

Any idea what could be the problem?

[Question] How to turn on Dark Mode?

I see that in the features listed, it states that you can toggle dark mode when rendering. How exactly do you do that? I can't find the option.

Disable Auto-Preview of Diagrams for `.dbml` Files

Use Case

The extension is essential for daily tasks, offering great value through diagram previews of .dbml files. However, the automatic preview on file edit can be distracting. Users sometimes need to edit .dbml files without the immediate preview.

Issue

Currently, the extension auto-launches the preview window upon .dbml file edits, which can disrupt the workflow.

Request

Implement a feature to disable auto-preview, allowing diagram previews only when the user initiates it (e.g., by clicking an 'eye' button).

This enhancement would significantly improve workflow flexibility and user experience.


Update: It is not easily reproducible since the issue is fixed upon the editor reload.

Parsing not equivalent to dbdiagram.io

Awesome work!!
I was playing around with dbdiagram.io for a while and absolutely love it.
However I would prefer to keep the files in my local repo and was thus looking for a vs code plugin to render them.
I copied the db definitions from dbdiagram and the parser startet to throw errors at me.
It seems your parser is a bit stricter than the one used on dbdiagram.io!

a few examples

valid on dbdiagram.io

table user {
    id uuid pk
    name text unique
    verbandsschlüssel char(1) 
} 

only valid as

table user {
    id uuid [pk]
    name text [unique]
    verbandsschluessel char(1)
} 

As most users are probably coming to the plugin via dbdiagram.io it would probably be could to keep the parser on pair with the online. Might have a bit more time next week and could also have a look and try to implement the necessary changes.

Zooming capability

Hello,

I don't seem to be able to zoom in or out of an ERD in the preview? Not yet possible? if not, possible soon? I have to deal with pretty big schemas and this extension would help a lot with the right visual capabilities. Thanks!

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.