sql-query-identifier
sql-query-identifier copied to clipboard
A SQL query identifier (e.g. INSERT, SELECT, CREATE TABLE, and etc.)
Previously we were not capturing parameters in CTEs, as they are not considered a statement. This PR makes it so we add those params to the next statement. NOTE: I...
Looking at https://github.com/coresql/sql-query-identifier/actions/runs/4308916845, many of the reported errors are the same across workflows, and it's just ending up visual noise. Should just run it in its own workflow, especially given...
Currently it seems that this package doesn't support using MySQL's `DELIMITER` keyword which is commonly used with stored procedures which contain multiple statements. I've created a very basic example below...
Currently it seems that this package doesn't support using the `#` syntax for inline comments in MySQL. **Example Input** ```mysql select 1; # inline comment select 2 ``` **Expected Output**...
See https://clickhouse.com/docs/en/sql-reference/statements/create/view, it supports the following two modifiers for creating views: `LIVE` and `WINDOW`: an example usage: ``` CREATE LIVE VIEW lv AS SELECT sum(x) FROM mt; CREATE WINDOW VIEW...
For example, Postgresql supports: - `$1` - `:paramname` SQLite: https://www.sqlite.org/c3ref/bind_blob.html - ? - ?NNN - :VVV - @VVV - $VVV MySQL: - ?? - identifiers - ? - values https://github.com/mysqljs/mysql#preparing-queries...
Test query: ```sql CREATE OR REPLACE FUNCTION f_grp_prod(text) RETURNS TABLE ( name text , result1 double precision , result2 double precision) LANGUAGE plpgsql STABLE AS $$ DECLARE r mytable%ROWTYPE; _round...
For example, `EXPLAIN SELECT 1`, where this is currently identified as `UNKNOWN`. We should probably support this as it's somewhat common, and easy to support (just detect if first word...
Right now we export the `Dialect` and `ExecutionType` as string union types. While this works, it would be better to use [string enums](https://www.typescriptlang.org/docs/handbook/enums.html#string-enums) like: ``` enum ExecutionType { LISTING =...
In both sqlectron and beekeeper-studio, it looks like we pretty universally use sql-query-identifier with `strict: false`. I propose just making that the default as it's probably the better behavior than...