Simon Binder
f42357c1d9
Fix error message in fts5 functions
2021-09-11 16:53:32 +02:00
Simon Binder
40bc3a17bb
Organize imports
2021-09-10 11:43:21 +02:00
Simon Binder
07cba75ea8
Parse transaction blocks
2021-09-09 18:05:03 +02:00
Simon Binder
cc6d553fa6
Format with Dart 2.14
2021-09-09 17:07:41 +02:00
Simon Binder
16bc11540b
Introduce single visitor method for moor-specific nodes
2021-09-08 23:20:45 +02:00
Simon Binder
3be320d0c5
Parse BEGIN and COMMIT statements
2021-09-08 22:53:57 +02:00
Simon Binder
b9c609a5f2
Analysis support around strict tables
2021-08-28 17:40:21 +02:00
Simon Binder
074b663b79
Parse "STRICT" table definitions
2021-08-28 16:32:00 +02:00
Simon Binder
59e6df76a3
Prepare 4.5.0 release
2021-08-20 18:58:15 +02:00
Simon Binder
33fd36df80
Fix nullability analysis for COALESCE and IFNULL
2021-07-26 20:39:59 +02:00
Simon Binder
3bf91ed6c3
Fix _encapsulate nullability for null literals
2021-07-26 18:56:22 +02:00
Simon Binder
aa75cbaa19
Prepare parser for schema support
2021-07-22 21:32:53 +02:00
Simon Binder
ed338f2fb0
Fix token range for postfix expressions
2021-07-22 12:06:50 +02:00
Simon Binder
f3e3801909
Migrate builders to null safety
2021-07-18 22:54:55 +02:00
Simon Binder
c12de0b8a9
Fix nullability analysis of references
2021-07-07 21:25:57 +02:00
Simon Binder
ab79ec1e88
Prepare 4.4.0 release
2021-07-03 13:36:43 +02:00
Simon Binder
8a529b3821
Support latest sqlite in parser, update changelog
2021-06-30 22:30:56 +02:00
Simon Binder
6988d79f09
Fix tests
2021-06-15 22:38:36 +02:00
Simon Binder
8b3cafedbd
Consider views in result set analysis
2021-06-15 21:42:30 +02:00
Simon Binder
0775c093e3
Initial support for custom data classes for views
2021-06-10 21:54:57 +02:00
Simon Binder
e87e4d7a7a
Add tests for available tables to sqlparser
2021-06-04 17:48:22 +02:00
Simon Binder
5d7cb7dbba
Fix nullability of unqualified star columns
2021-06-03 13:12:30 +02:00
Simon Binder
a9efe7f371
Add test to parse required without name
2021-06-01 21:41:41 +02:00
Simon Binder
e1d633526b
Refactor custom table information in sqlparser
2021-05-25 18:46:10 +02:00
Simon Binder
61cb03ad35
Warning when star column is used without table
2021-05-24 12:45:18 +02:00
Simon Binder
a46cc07ed4
Refactor column resolver in sqlparser
...
Fixes #1208
2021-05-21 17:47:14 +02:00
Simon Binder
8f3a976d6e
Fix CI on Dart 2.13
2021-05-18 22:19:57 +02:00
Simon Binder
371e744288
Prepare to release 4.3.0
2021-05-15 17:23:29 +02:00
Simon Binder
0d8741a7b4
Fix nullability in encapsulate
2021-05-13 11:59:01 +02:00
Simon Binder
bc2a2b4d61
Support existing data classes for moor tables
2021-05-11 22:01:51 +02:00
Simon Binder
258512e044
Support dart placeholders for inserts
2021-05-06 22:35:57 +02:00
Simon Binder
0e4541a987
Generate non-nullable nested result sets
2021-05-06 17:20:13 +02:00
Simon Binder
b6a2fcd603
Copy list in transformChildren
2021-05-05 19:46:13 +02:00
Simon Binder
1de5479d60
Add explicit aliases with new codegen
2021-05-04 21:00:28 +02:00
Simon Binder
adb27d056b
Start phasing out SqlTypeSystem
2021-04-25 16:14:33 +02:00
Simon Binder
17f43bc9fc
Parse RAISE expressions ( #1154 )
2021-04-21 20:29:50 +02:00
Simon Binder
67f7e269e0
Lift parser.dart out of singleton dir
2021-04-21 19:59:18 +02:00
Simon Binder
fd18984cae
Fix formatting issues in CI
2021-04-13 22:30:19 +02:00
Simon Binder
602212f99d
Support REQUIRED annotation for query vars
2021-04-13 22:14:12 +02:00
Simon Binder
1e962312ca
Improve UX when importing part files ( #1136 )
2021-04-11 19:56:13 +02:00
Simon Binder
10266ed7a6
Remove moor-specific nodes from ast megalib
2021-04-11 16:43:35 +02:00
Simon Binder
9b6b5d1b69
Make rowid aliases non-nullable ( #1128 )
2021-04-02 21:54:31 +02:00
Simon Binder
eb39738460
Initial support for RETURNING in the generator
2021-03-30 23:24:28 +02:00
Simon Binder
5ac0582280
Properly resolve RETURNING columns
2021-03-30 11:03:12 +02:00
Simon Binder
0842a47d31
Two more lints for RETURNING clauses
2021-03-30 10:30:24 +02:00
Simon Binder
5ce5a48cff
Prefer a space after a closing ) in functions
2021-03-23 19:31:55 +01:00
Simon Binder
f76044989e
Adopt minimum SDK version, fix docs on mobile
2021-03-19 20:35:08 +01:00
Simon Binder
bdf7d22776
Bump versions of moor, moor_generator and sqlparser
2021-03-18 16:25:00 +01:00
Simon Binder
7c911713de
Two more analysis errors around RETURNING
2021-03-13 22:25:39 +01:00
Simon Binder
ab75b764f2
Resolve columns of a returning clause
2021-03-13 21:50:35 +01:00
Simon Binder
af5491e15f
Warn when RETURNING is used on an unsupported version
2021-03-13 20:56:53 +01:00
Simon Binder
b9b7f407c9
Parse RETURNING clauses
2021-03-13 20:41:14 +01:00
Simon Binder
687263dd66
Analysis support for generalized upserts
2021-03-13 16:07:12 +01:00
Simon Binder
c9f8af346d
Parse more than ON CONFLICT clause
2021-03-13 15:21:27 +01:00
Simon Binder
3cf3be27ae
sqlparser: Support the built-in math extension
2021-03-13 14:37:44 +01:00
Simon Binder
b110773053
Support MATERIALIZED / NOT MATERIALIZED
2021-03-13 14:00:06 +01:00
Simon Binder
68b3d7d634
Add sqlite version argument to engine
2021-03-13 13:25:16 +01:00
Simon Binder
580b94f176
Start splitting up ast.dart
2021-03-13 13:08:10 +01:00
Simon Binder
d61e219311
Analysis for FROM clauses in UPDATE statements
2021-03-13 12:49:46 +01:00
Simon Binder
3000cb2e44
Parse FROM clauses for update statements
2021-03-13 12:02:35 +01:00
Simon Binder
725cad3651
Fix types of the rank column ( #1066 )
2021-02-25 20:29:57 +01:00
Simon Binder
9bb2a24abf
Prepare 4.1 release
2021-02-20 22:03:34 +01:00
Simon Binder
535425e34f
Document confusing code
2021-02-14 16:50:21 +01:00
Simon Binder
968af8f56e
Fix analysis for views with CTEs
2021-02-14 16:36:01 +01:00
Simon Binder
61d5b7897a
Upgrade dependencies where possible
2021-02-14 14:06:51 +01:00
Simon Binder
75f1032474
Fix tests in sqlparser
2021-02-12 13:55:34 +01:00
Hossein Yousefi
c0fc691a94
view analyzer class added
2021-02-11 18:38:41 +01:00
Hossein Yousefi
c9269e13be
added support for CREATE VIEW in .moor files
2021-02-10 16:23:51 +01:00
Simon Binder
76e6d2d219
Fix whitespace handling in new SQL generator
2021-01-24 12:27:53 +01:00
Simon Binder
4ba12c4868
Strip whitespace and comments from generated queries
2021-01-23 21:03:03 +01:00
Simon Binder
4940ed5be8
Fix broken sqlparser test
2021-01-18 19:24:47 +01:00
Simon Binder
a375caaa44
Add lint for duplicate PRIMARY KEY constraints
2021-01-18 15:11:46 +01:00
Simon Binder
5ff74c7bcb
Improve table analysis, parse key ordering ( #1007 )
2021-01-18 14:44:05 +01:00
Simon Binder
1ff10f47c2
Remove part files of parser
2021-01-18 11:15:31 +01:00
Simon Binder
c5cbd1b62e
Release moor 4 preview to pub
2021-01-11 20:15:10 +01:00
Simon Binder
b8eed2f75b
Make order by placeholders optional ( #998 )
2021-01-08 22:30:17 +01:00
Simon Binder
fa0cda6ffe
Add regression test for #978
2020-12-19 17:34:32 +01:00
Simon Binder
6aa022e547
Add nullability hints, generate nullable variables
2020-12-14 18:35:19 +01:00
Simon Binder
efe0df519b
Improve type inference around IS expressions
2020-12-14 17:48:50 +01:00
Simon Binder
a749f38e2b
Make columns from LEFT OUTER joins nullable
2020-12-12 23:22:21 +01:00
Simon Binder
1d0cba14cd
Merge types2 and rest of types
2020-12-12 21:31:27 +01:00
Simon Binder
9025280a89
Migrate sqlparser to null safety
2020-12-11 10:53:17 +01:00
Simon Binder
35d2d1fca8
Merge branch 'develop' into nnbd
...
# Conflicts:
# moor/test/data/tables/custom_tables.g.dart
2020-12-04 20:01:22 +01:00
Simon Binder
0c075a2b44
Support overriding column getters and table classes ( #932 )
2020-11-23 20:01:31 +01:00
Simon Binder
a73b9334b6
Reduce usages of covariant
2020-11-23 19:00:29 +01:00
Simon Binder
9e60acfe18
Fix new errors from GitHub actions
2020-11-20 18:25:53 +01:00
Simon Binder
bf7a8bc872
Fix resolving some references ( #917 )
2020-11-16 16:22:18 +01:00
Simon Binder
1d7479226a
Parse NULL column constraints to fix parsing errors ( #909 )
2020-11-07 12:32:45 +01:00
Simon Binder
71e5c4941e
Support comparing types with different names
2020-10-23 19:22:30 +02:00
Simon Binder
e29fcf93f7
Publish moor 3.4, sqlparser 0.11
2020-10-22 14:17:54 +02:00
Simon Binder
732369c25c
sqlparser: Give CASE a higher precedence
2020-10-22 13:30:43 +02:00
Simon Binder
89e019f756
Resolve type of EXISTS expressions in types2 ( #874 )
2020-10-16 12:31:18 +02:00
Simon Binder
fac99e1d6b
Run CI with Dart 2.10
2020-10-02 18:43:27 +02:00
Simon Binder
fa432ee17a
Add test for type hints in between expressions
2020-09-06 13:27:30 +02:00
Simon Binder
6e157b02c9
Add formatting test for default placeholder values
2020-08-30 14:08:30 +02:00
Simon Binder
2ae2388878
Support default values for Dart placeholders ( #753 )
2020-08-30 13:48:47 +02:00
Simon Binder
57efa4bb89
Add more tests for node to text
2020-08-22 12:36:36 +02:00
Simon Binder
6fba2555c1
Api to turn AST nodes into a textual represenation
2020-08-21 16:44:17 +02:00
Simon Binder
a037de6621
Support rowid resolution outside of selects
...
This fixes #754
2020-08-10 10:46:33 +02:00
Simon Binder
0d9196dca8
Resolve columns in CREATE TRIGGER declaration ( #751 )
2020-08-07 20:38:32 +02:00
Simon Binder
c2ce934361
Apply type converters on variables ( #730 )
2020-07-23 17:30:26 +02:00
Simon Binder
640cae1244
Scan [identifiers] in sql queries ( #724 )
2020-07-22 10:43:44 +02:00
Simon Binder
ba708ee9c5
Merge branch 'use-sqlite3-package' into develop
2020-07-18 17:47:27 +02:00
Simon Binder
144116b5e1
Re-run generator in Flutter example, fix type inference bug ( #715 )
2020-07-18 13:38:21 +02:00
Simon Binder
cb7c36d63b
sqlparser: Improve numeric token parsing
2020-07-18 11:01:04 +02:00
Simon Binder
800ee8ac3a
Add implicit cast when inferring binary expressions
2020-07-18 09:49:49 +02:00
Simon Binder
74caeced85
Fix typo in parsing error message
2020-07-12 17:59:24 +02:00
Simon Binder
5b1a36df8e
Fix typo in parsing error message
2020-07-12 17:58:45 +02:00
Simon Binder
35629abf2b
Migrate sqlparser from moor_ffi to sqlite3
2020-07-10 17:32:45 +02:00
Simon Binder
7ff91a620a
Some improvements related to generator error recovery
2020-07-07 23:01:02 +02:00
Simon Binder
ac20d9b324
Fix some pub warnings that appeared during publishing
2020-06-28 21:17:33 +02:00
Simon Binder
3a558c3d1d
Prepare moor 3.2, moor_ffi 0.7 release
2020-06-28 17:27:32 +02:00
Simon Binder
2897dd4ae0
Parse NULLS FIRST and NULLS LAST
2020-06-27 14:38:16 +02:00
Simon Binder
5136412573
Parse DEFERRABLE clauses on foreign key constraints
2020-06-27 14:26:09 +02:00
Simon Binder
211b6fa2e9
sqlparser: Support remaining sqlite keywords
2020-06-26 22:54:42 +02:00
Simon Binder
d5c6467e37
Finish documentation, remove unnecessary null hint
2020-06-24 17:11:41 +02:00
Simon Binder
ccea0a5d36
Don't throw parsing errors for top-level statements
2020-06-24 17:08:13 +02:00
Simon Binder
c342b29b33
Fix sqlparser crashes related to unknown tables
2020-06-19 13:43:16 +02:00
Simon Binder
5c9c175c85
Merge branch 'develop' of gh:simolus3/moor into develop
2020-06-17 23:00:56 +02:00
Markus Richter
85ac74f69f
add suggested test(s)
2020-06-17 21:22:03 +02:00
Markus Richter
f298a10636
Allow Backticks(`) for escaping identifiers
...
This is sqlite-conformant behaviour according to https://sqlite.org/lang_keywords.html .
2020-06-17 17:20:44 +02:00
Simon Binder
1e8a1de6c0
sqlparser: Add visit methods for Queryable subclasses
2020-06-16 14:25:31 +02:00
Simon Binder
5c6331e486
sqlparser: Make InsertSource an AstNode
2020-06-15 17:45:28 +02:00
Simon Binder
7ae3783473
sqlparser: Make TriggerTarget an ast node
2020-06-15 17:21:49 +02:00
Simon Binder
896d62d76c
Support nested CASE expressions ( #609 )
2020-06-02 12:05:02 +02:00
Simon Binder
fee32fc302
Start with transformers in sqlparser
2020-05-24 22:30:25 +02:00
Simon Binder
01e5a47189
Make utility visitor methods an extension
2020-05-24 19:53:36 +02:00
Simon Binder
e772ca0225
Support views in ReferencedTablesVisitor
2020-05-23 15:27:58 +02:00
Simon Binder
3db0fd57f1
Update changelog to include views in sqlparser
2020-05-22 17:33:34 +02:00
Simon Binder
8aca8db941
Merge branch 'views' of https://github.com/mqus/moor into mqus-views
...
# Conflicts:
# sqlparser/test/analysis/schema/from_create_table_test.dart
2020-05-22 17:29:04 +02:00
Simon Binder
5d93f9fcf9
Analysis support for custom result sets
2020-05-21 15:22:49 +02:00
Markus Richter
5596c30cc7
Support subquery expressions in types2 ( #583 )
2020-05-19 19:42:36 +02:00
Simon Binder
65f02cb22c
Prepare 3.1 release of moor, 0.6 or moor_ffi, 0.9 of sqlparser
2020-05-18 20:45:48 +02:00
Simon Binder
52fd09c041
Fix reading a column without datatype
2020-05-17 15:18:25 +02:00
Simon Binder
6b88385755
Rename test files to end with _test.dart
2020-05-16 19:49:00 +02:00
Simon Binder
a1304c537f
Formatting
2020-05-16 19:42:33 +02:00
Simon Binder
888e131d50
Report analysis error for view column mismatches
2020-05-16 19:36:56 +02:00
Simon Binder
58335958c0
Test selecting from a view
2020-05-16 19:29:11 +02:00
Simon Binder
46ba81b672
Interface for columns with type, resolve in ViewReader
2020-05-16 19:16:06 +02:00
Simon Binder
f7e7622b4c
Rename resultset.dart to result_set.dart, format parser test
2020-05-16 18:55:07 +02:00
Markus Richter
df6f6fafa2
Add NamedResultSet type, adress review issues
2020-05-16 13:50:30 +02:00
mqus
0bc2a7548d
Apply suggestions from code review
...
Co-authored-by: Simon Binder <oss@simonbinder.eu>
2020-05-16 12:08:05 +02:00
Markus Richter
186153e585
Add parser test,advance analyzer,fix review issues
...
Also:
- Add toString method to Literal and alter the one on Reference to make debugging and analysing tests easier
- Add `@required` to columns in SelectStatement constructor to make it clear that it can't be null (required by childNodes getter)
2020-05-15 19:58:16 +02:00
Simon Binder
cf830165e1
Support enum converters for moor files, add documentation
2020-05-13 21:43:58 +02:00
Markus Richter
d86d7ab7e3
Parser is ready, work on analyzer was started.
2020-05-13 14:29:22 +02:00
Simon Binder
9841c960d1
Parse row values, warn on misuse
2020-05-06 21:08:47 +02:00
Simon Binder
8b6abd7140
Move referenced table finder to sqlparser package ( #537 )
2020-05-04 22:00:41 +02:00
Simon Binder
28a7451f1d
Merge pull request #536 from mqus/patch-1
...
Fix documentation source code issues
2020-05-04 12:16:53 +02:00
mqus
882b789c1b
Fix example source code issues
...
Just some typos
2020-05-03 22:29:30 +02:00
Simon Binder
bd250ee9e7
Support collate expression with new type inference ( #533 )
2020-05-03 21:13:29 +02:00
Simon Binder
0a30b8a12e
Upgrade integration tests, release sqlparser 0.8
2020-05-03 13:28:34 +02:00
Simon Binder
fc0b1f4388
Use package:charcode for sql scanning
2020-05-02 14:17:49 +02:00
Simon Binder
453ccbefdc
Support double-equals in types2
2020-04-19 13:43:42 +02:00
Simon Binder
6b2bd27d4d
Parse and analyze VALUES clause for selects
2020-04-16 22:41:21 +02:00
Simon Binder
c007e1f9ac
Sort token types and keywords
2020-04-16 21:14:51 +02:00
Simon Binder
9a78604d98
Fix issues with new inference, enable it by default
2020-04-16 19:07:30 +02:00
Simon Binder
af5333db3c
Support compound select statements in from
2020-04-07 15:37:35 +02:00
Simon Binder
dcb4c4b972
Resolve nested result sets in generator
2020-04-03 20:30:41 +02:00
Simon Binder
d5ad3c6d34
Parse nested star columns
2020-04-03 18:37:33 +02:00
Simon Binder
2b9a85714f
Improve nullability detection in new type inference
2020-03-24 19:33:57 +01:00
Simon Binder
1a2d3bdee7
Parse comma separated tables as proper join ( #453 )
2020-03-22 11:51:39 +01:00
Simon Binder
d533a0a254
Fix error recovery on early finished statements #453
2020-03-21 22:02:27 +01:00
Simon Binder
87d1f2941b
Test for string concatenation variable inference
2020-02-23 19:23:50 +01:00
Simon Binder
990755f170
Static analysis for moor_ffi functions
2020-02-19 12:25:40 +01:00
Simon Binder
10b12a5976
Remove two more tiny deprecated members
2020-02-17 21:22:43 +01:00
Simon Binder
57fa1d50c6
Release moor and moor_generator 2.4.0, sqlparser 0.7.0
2020-02-12 21:01:41 +01:00
Simon Binder
7fc1671bf8
Fix null pointer in SqlEngine constructor
2020-02-12 19:52:19 +01:00
Simon Binder
b295542a07
Prepare release for 2.4
2020-02-10 19:46:27 +01:00
Simon Binder
814e7bf61d
SqlEngine: Migrate default construtor to options
2020-02-10 18:48:03 +01:00
Simon Binder
b143ee5a4b
Refactor sql scoping, make aliased tables explicit
2020-02-05 22:52:45 +01:00
Simon Binder
aa52c4ba3d
Analysis for upsert clauses
2020-02-05 12:26:14 +01:00
Simon Binder
8839ec75a8
types2: Inference for upsert clauses
2020-02-03 21:54:49 +01:00
Simon Binder
0c171c3b81
sqlparser: Support upsert clauses ( #367 )
2020-02-03 21:43:18 +01:00
Simon Binder
fbe061c84d
Support current time literals in the sql parser
2020-02-01 13:18:53 +01:00
Simon Binder
27430cbb07
Add table-valued query to test moor file
2020-01-26 15:37:46 +01:00
Simon Binder
71ef9b8cd7
Support table-valued json1 functions
2020-01-26 14:42:52 +01:00
Simon Binder
5268d88344
Extract json1 support into an extension
2020-01-26 14:22:07 +01:00
Simon Binder
c82bff8c97
Analysis support for table-valued functions
2020-01-26 14:04:35 +01:00
Simon Binder
5622ed5c43
Analysis support for table-valued functions
2020-01-26 13:51:53 +01:00
Simon Binder
223f1615ab
Support parsing table valued functions
2020-01-26 13:13:44 +01:00
Simon Binder
ceb300e32e
Parse rowid as a valid expression in the sql parser
2020-01-26 12:23:47 +01:00
Simon Binder
de38761db9
Support type converters in moor files ( #103 )
2020-01-25 15:43:55 +01:00
Simon Binder
257cfaca2e
Finish changelog and pubspec for 2.3 release
2020-01-21 17:55:41 +01:00
Simon Binder
8c62365f26
Improve type inference for parentheses
2020-01-19 13:07:47 +01:00
Simon Binder
c8a155a44b
Autocomplete table names in sqlparser
2020-01-18 21:41:36 +01:00
Simon Binder
b04ebc9e8c
Utils to make testing autocomplete easier
2020-01-18 20:51:09 +01:00
Simon Binder
eb77d06cac
sqlparser: Recover from invalid column definitions
2020-01-18 15:09:42 +01:00
Simon Binder
4a2184110f
Run tests for types1 for types2 resolver
2020-01-16 22:07:02 +01:00
Simon Binder
8ae68707f8
Smarter many-to-one propagation in types2
2020-01-15 22:10:18 +01:00
Simon Binder
ddda6797e1
types: Analyze functions
2020-01-13 20:40:46 +01:00
Simon Binder
5d8040554f
CLI tool to export a moor schema to json
2020-01-12 10:38:03 +01:00
Simon Binder
9c38ed1ea5
Support CASE expressions in the new type resolver
2020-01-10 21:31:22 +01:00
Simon Binder
6434f7a7d5
Support virtual tables in the analyzer plugin
2020-01-09 22:45:25 +01:00
Simon Binder
643ef5640c
Faster sql tokenization with char codes
2020-01-09 22:09:17 +01:00
Simon Binder
5c82b2f2a7
Loose coupling between highlighter and analyzer plugin
2020-01-09 13:50:11 +01:00
Simon Binder
a3708b7230
Remove deprecated usages of SqlEngine constructor
2020-01-07 11:40:43 +01:00
Simon Binder
b6b5e7f7c2
Fix analysis errors from deprecated engine constructor
2020-01-05 21:41:56 +01:00
Simon Binder
70259c8f83
Build options to enable types2 inference
2020-01-04 22:29:21 +01:00
Simon Binder
523eabaa2a
Support LIKE expressions in the new type resolver
2020-01-04 21:36:06 +01:00
Simon Binder
a8ffd0a7f3
Support LIMIT clauses in the new type resolver
2020-01-04 21:26:47 +01:00