npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dbml/core

v6.1.0

Published

> TODO: description

Downloads

901,049

Readme

@dbml/core

Refer to @dbml/core for the complete API reference.

Installation

npm install @dbml/core

# or if you're using yarn
yarn add @dbml/core

SQL Parser Feature Support

This section documents the SQL parsing capabilities for each supported database when importing SQL to DBML.

For more detailed documentation on each SQL parser, see the individual parser READMEs:

Support Legend

| Symbol | Meaning | |--------|---------| | ✓ | Fully supported and correctly parsed | | ◐ | Valid SQL that is parsed, but some options/clauses are ignored | | ✗ | Valid SQL syntax, but the parser fails to generate output | | — | Syntax not valid for this database |

CREATE TABLE

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Basic syntax | ✓ | ✓ | ✓ | ✓ | ✓ | | Parameterized types (e.g., VARCHAR(255)) | ✓ | ✓ | ✓ | ✓ | ✓ | | Array types (e.g., INTEGER[]) | ✓ | — | — | — | — | | Enumerated types (ENUM) | ✓ | ✓ | — | — | — | | Temporary tables | ◐ | ✗ | ✓ | ◐ | ◐ | | CREATE TABLE AS SELECT | ✗ | ✗ | ✗ | ✗ | ✗ | | Table options (ENGINE, TABLESPACE, etc.) | ◐ | ◐ | ◐ | ◐ | ◐ | | Other column properties (COLLATE, etc.) | ◐ | ✗ | ◐ | ◐ | ◐ | | Generated/Computed columns | ◐ | ◐ | ◐ | ◐ | ◐ |

Notes:

  • MSSQL:
    • Temporary tables use # prefix (local) and ## prefix (global)
    • Square bracket identifiers ([identifier]) are supported

PRIMARY KEY

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Column-level | ✓ | ✓ | ✓ | ✓ | ✓ | | Table-level | ✓ | ✓ | ✓ | ✓ | ✓ | | Multi-column | ✓ | ✓ | ✓ | ✓ | ✓ | | Explicitly named (CONSTRAINT name) | ✓ | ✓ | ✓ | ✓ | ✓ | | CLUSTERED/NONCLUSTERED | — | — | ◐ | — | — |

FOREIGN KEY

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Column-level (REFERENCES) | ✓ | ✓ | ✗ | ✓ | ✗ | | Table-level | ✓ | ✓ | ✓ | ✓ | ✗ | | Multi-column | ✓ | ✓ | ✓ | ✓ | ✗ | | Explicitly named (CONSTRAINT name) | ✓ | ✓ | ✓ | ✓ | ✗ | | ON UPDATE action | ✓ | ✓ | ✓ | — | ✗ | | ON DELETE action | ✓ | ✓ | ✓ | ✓ | ✗ |

Notes:

  • MSSQL: Column-level FOREIGN KEY has a known bug - use table-level syntax instead
  • Snowflake: All FOREIGN KEY definitions have a known bug producing undefined errors

UNIQUE

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Column-level | ✓ | ✓ | ✓ | ✓ | ✓ | | Table-level | ✓ | ✓ | ✓ | ✓ | ✓ | | Multi-column | ✓ | ✓ | ✓ | ✓ | ✓ | | Explicitly named (CONSTRAINT name) | ✓ | ✓ | ◐ | ✓ | ◐ | | UNIQUE KEY/UNIQUE INDEX syntax | — | ✓ | — | — | — |

CHECK

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Column-level | ✓ | ✓ | ✓ | ✓ | ✗ | | Table-level | ✓ | ✓ | ✓ | ✓ | ✗ | | Explicitly named (CONSTRAINT name) | ✓ | ✓ | ✓ | ✓ | ✗ |

DEFAULT

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Column-level | ✓ | ✓ | ✓ | ✓ | ✓ | | Function as default | ✓ | ✓ | ✓ | ✓ | ✓ | | Explicitly named (CONSTRAINT name) | — | — | ◐ | — | ◐ |

NOT NULL

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Column-level NOT NULL | ✓ | ✓ | ✓ | ✓ | ✓ | | Explicit column-level NULL | ✓ | ✓ | ✓ | ✓ | ✓ |

Auto-Increment Columns

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | SERIAL (pseudo-type) | ✓ | — | — | — | — | | BIGSERIAL (pseudo-type) | ✓ | — | — | — | — | | AUTO_INCREMENT (column attribute) | — | ✓ | — | — | — | | IDENTITY(seed, increment) (column property) | — | — | ✓ | — | ✓ | | GENERATED AS IDENTITY (column property) | ✓ | — | ✗ | ✓ | ✗ | | GENERATED ALWAYS AS IDENTITY | ✓ | — | — | ✓ | — | | GENERATED BY DEFAULT AS IDENTITY | ✓ | — | — | ✓ | — |

Inline Indexes

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Column-level indexes | — | ✗ | — | — | — | | Table-level INDEX/KEY | — | ✓ | — | ✓ | — | | Named indexes | — | ✓ | — | ✓ | — | | Multi-column indexes | — | ✓ | — | ✓ | — | | USING BTREE/HASH | — | ✓ | — | — | — | | FULLTEXT/SPATIAL | — | ◐ | — | — | — |


CREATE INDEX

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Basic CREATE INDEX | ✓ | ✓ | ✓ | ✓ | — | | Multi-column index | ✓ | ✓ | ✓ | ✓ | — | | UNIQUE index | ✓ | ✓ | ✓ | ✓ | — | | Function-based index | ✓ | ✓ | — | ✓ | — | | BTREE | ✓ | ✓ | ✗ | — | — | | HASH | ✓ | ✓ | — | — | — | | GIST | ✓ | — | — | — | — | | BRIN | ✓ | — | — | — | — | | GIN | ✓ | — | — | — | — | | Partial/Filtered index (WHERE) | ◐ | ✗ | ◐ | ◐ | — | | FULLTEXT | — | ◐ | ✗ | — | — | | SPATIAL | — | ◐ | ✗ | — | — |

Notes:

  • MSSQL: Function-based indexes use computed columns instead

INSERT Statements

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Basic INSERT ... VALUES | ✓ | ✓ | ✓ | ✓ | ✗ | | Multi-row INSERT | ✓ | ✓ | ✓ | — | ✓ | | INSERT ... SELECT | ✗ | ✗ | ✗ | ✗ | ✗ | | INSERT ... with returned rows (RETURNING, OUTPUT) | ◐ | — | ◐ | ◐ | — | | INSERT ... ON CONFLICT/DUPLICATE KEY | ◐ | ◐ | — | — | — |

Notes:

  • Oracle: Uses INSERT ALL syntax for multi-row inserts (not supported)

ALTER TABLE

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | ADD COLUMN | ✗ | ✗ | ✗ | ✗ | ✗ | | DROP COLUMN | ✗ | ✗ | ✗ | ✗ | ✗ | | ALTER/MODIFY COLUMN | ✗ | ✗ | ✗ | ✗ | ✗ | | RENAME COLUMN | ✗ | ✗ | ✗ | ✗ | ✗ | | ADD CONSTRAINT | | | | | | | - DEFAULT | ✗ | ✗ | ✓ | ✓ | ✗ | | - NOT NULL | ✗ | ✗ | ✗ | ✓ | ✗ | | - CHECK | ✓ | ✓ | ✓ | ✓ | — | | - UNIQUE | ✓ | ✗ | ✓ | ✓ | ✓ | | - PRIMARY KEY | ✓ | ✓ | ✓ | ✓ | ✗ | | - FOREIGN KEY | ✓ | ✓ | ✓ | ✓ | ✓ | | DROP CONSTRAINT | ✗ | ✗ | ✗ | ✗ | ✗ |


Comments

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | Table comments | ✓ | ✓ | ◐ | ✓ | ✓ | | Column comments | ✓ | ✓ | ◐ | ✓ | ✗ | | Comment syntax | COMMENT ON | Inline COMMENT | sp_addextendedproperty | COMMENT ON | Inline COMMENT |

Notes:

  • MSSQL: Comments via sp_addextendedproperty have unreliable parsing

Other DDL Statements

| Feature | PostgreSQL | MySQL | MSSQL | Oracle | Snowflake | |---------|------------|-------|-------|--------|-----------| | DROP TABLE | ✗ | ✗ | ✗ | ✗ | ✗ | | DROP INDEX | ✗ | ✗ | ✗ | ✗ | — | | ALTER INDEX | ✗ | — | ✗ | ✗ | — | | CREATE VIEW | ✗ | ✗ | ✗ | ✗ | ✗ |