sqlparser 0.23.1
sqlparser: ^0.23.1 copied to clipboard
Parses sqlite statements and performs static analysis on them
0.23.1 #
- Gracefully handle tokenizer errors related to
@or$variables.
0.23.0 #
- Apply type hints for date times on textual datetime functions as well.
0.22.0 #
- Refactor how tables and columns are resolved internally.
- Lint for
DISTINCTmisuse in aggregate function calls. - Support the
RIGHTandFULLjoin operators added in sqlite 3.39.0. - Support
IS DISTINCT FROMandIS NOT DISTINCT FROMsyntax added in sqlite 3.39.0. - Fix type inference for
SUM()calls around int "subtypes" (like booleans).
0.21.0 #
- Analysis support for new features in sqlite version 3.38.
- Replace internal
moorreferences withdriftreferences.
0.20.1 #
- Fix SQL generation for upsert statements with a conflict target.
0.20.0 #
- Support
LISTcolumns for a drift-specific feature.
0.19.2 #
- Improve handling of drift-specific column types in
STRICTtables.
0.19.1 #
- Make the result of
group_concatnullable.
0.19.0 #
- Support generated columns.
- Support features introduced in sqlite version 3.37, most notably
STRICTtables.
0.18.1 #
- Fix the AST comparator missing errors for different amount of children.
0.18.0 #
- Fix unecessary errors around
fts5tables - Merge all moor-specific nodes into a single
visitMoorSpecificvisitor method - Parse
BEGINandCOMMITstatements - Improve type inference around
RETURNINGclauses.
0.17.2 #
- Fix nullability analysis of
COALESCEandIFNULL
0.17.1 #
- Fix nullability analysis of references and star columns
0.17.0 #
- Refactor how tables and columns are resolved in statements
- The new
ResultSetAvailableInStatementclass describes a result set that has been added to a statement, for instance through a from clause - A
TableOrSubquerywith an alias now introduces aTableAliasinstead of the original table
0.16.0 #
- New analysis checks for
RETURNING: Disallowtable.*syntax and aggregate expressions - Support
RAISEexpressions in triggers - Fix resolving columns when
RETURNINGis used in anUPDATE FROMstatement - Fix aliases to rowid being reported as nullable
0.15.0 #
- Breaking: Change
InsertStatement.upsertto a list of upsert clauses- Support multiple upsert clauses
- Do not require a conflict target in the last clause
- Support
RETURNINGclauses in updates, deletes and inserts - Support
FROMclauses inUPDATEstatements - Support
MATERIALIZED/NOT MATERIALIZEDhints in common table expressions - Add
BuiltInMathExtensionwhich corresponds to the-DSQLITE_ENABLE_MATH_FUNCTIONScompile-time option for sqlite. - Add
EngineOptions.versionargument to specify the desired sqlite version. Using newer features will be reported as analysis warnings. - Fix
rankcolumns of fts5 tables being misreported as integers
0.14.0 #
- Fix views using common table expressions
0.13.0-nullsafety.0 #
- Parse ordering in table key constraints
- Deprecate
KeyClause.indexedColumnsin favor ofKeyClause.columns
- Deprecate
0.12.0-nullsafety.0 #
- Migrate to null-safety
- Remove legacy type inference
- Parser support for new moor features
0.11.0 #
- New
package:sqlparser/utils/node_to_text.dartlibrary that turns an AST node back into a textual representation. - Fix precedence of
CASEexpressions
0.10.1 #
- Scan identifiers with
[bracket syntax] NumericTokennow contains individual lexemes making up the number- Improve error messages in some scenarios
- Fix type inference for binary expressions where the operands have incompatible types
- Improve type inference around
NULL
0.10.0 #
- Breaking: Made
RecursiveVisitor.visit,visitListandvisitExceptan extension onAstVisitor. - Support the transformer pattern to modify ast nodes
- Breaking:
FrameBoundary,DeleteTarget,UpdateTarget,DefaultValuesandInsertTargetare no longer constant - Breaking: Removed
visitQueryable. UsedefaultQueryableinstead. - Support parsing and analyzing
CREATE VIEWstatements (seeSchemaFromCreateTable.readView). Thanks to @mqus for their contribution! SqlEngine.parsewill no longer throw when there's a parsing error (useParseResult.errorsinstead).- Parse
DEFERRABLEclauses on foreign key constraints - Parse
NULLS FIRSTandNULLS LASTonORDER BYterms
0.9.0 #
- New
package:sqlparser/utils/find_referenced_tables.dartlibrary. Use it to easily find all referenced tables in a query. - Support row values including warnings about misuse
0.8.1 #
- Support collate expressions in the new type inference ([#533](htt ps://github.com/simolus3/moor/issues/533))
- Added
visitCollateExpressionto the visitor classes
0.8.0 #
- Remove
SqlEngine.withOptionsconstructor - the default constructor now takes options - Changed
SelectStatement.fromfromList<Queryable>toQueryable?. Selecting from multiple tables with a comma will now be parsed as aJoinClause. - Changed
SelectStatementAsSource.statementfromSelectStatementtoBaseSelectStatementand allow compound select statements to appear in aFROMclause - Support the
VALUESclause as select statement - The new type inference engine is now enabled by default and the
enableExperimentalTypeInferenceoption has been removed. To continue using the old engine, theuseLegacyTypeInferenceflag can be used.
0.7.0 #
- New feature: Table valued functions.
- Breaking: Removed the
enableJson1parameter onEngineOptions. Add aJson1Extensioninstance toenabledExtensionsinstead. - Parse
rowidas a valid reference when needed (SELECT rowid FROM tblis now parsed correctly) - Parse
CURRENT_TIME,CURRENT_DATEandCURRENT_TIMESTAMP - Parse
UPSERTclauses for insert statements
0.6.0 #
- Breaking: Added an argument type and argument to the visitor classes
- Experimental new type inference algorithm
(
SqlEngine.withOptions(EngineOptions(enableExperimentalTypeInference: true))) - Support
CASTexpressions and theISNULL/NOTNULLpostfixes - Support parsing
CREATE TRIGGERstatements - Support parsing
CREATE INDEXstatements
0.5.0 #
- Optionally support the
json1module - Optionally support the
fts5module
0.4.0 #
- Support common table expressions
- Handle special
rowid,oid,__rowid__references - Support references to
sqlite_masterandsqlite_sequencetables
0.3.0 #
- parse compound select statements
- scan comment tokens
- experimental auto-complete engine (only supports a tiny subset based on the grammar only)
- some features that are specific to moor
0.3.0+1: Accept \r characters as whitespace
0.2.0 #
- Parse
CREATE TABLEstatements - Extract schema information from parsed create table statements with
SchemaFromCreateTable.
0.1.2 #
- parse
COLLATEexpressions - fix wrong order in parsed
LIMITclauses
0.1.1 #
Attempt to recognize when a bound variable should be an array (eg. in WHERE x IN ?). Also fixes a number of parsing
bugs:
- Parses tuples, proper type resolution for
INexpressions - Don't resolve references to tables that don't appear in the surrounding statement.
- Parse joins without any additional operator, e.g.
table1 JOIN table2instead oftable1 CROSS JOIN table2. - Parser now complains when parsing a query doesn't fully consume the input
0.1.0 #
Initial version, can parse most statements but not DELETE, common table expressions and other advanced features.