onetonfoot / SQLFluff.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQLFluff

To install run

]add SQLFluff.jl

This package is a thin wrapper around SQLStrings which adds linting via sqlfluff, so that incorrect SQL should throw a informative error for example

sql"SELET * FROM table "
# ERROR: SQLParseError(Line 1, Position 1: Found unparsable section: 'SELET * FROM mytable')

You can configure you specific dialect with

dialect!("sqlite")

Where the supported dialects are

[
    "ansi",
    "bigquery",
    "db2",
    "exasol",
    "hive",
    "mysql",
    "oracle",
    "postgres",
    "redshift",
    "snowflake",
    "sparksql",
    "sqlite",
    "teradata",
    "tsql",
]

TODO: Support interpolations, otherwise what's the point lol

ezoic increase your site revenue

About

License:MIT License


Languages

Language:Julia 100.0%