Skip to content

Commit

Permalink
Remove unnecessary warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cachapa committed Nov 26, 2023
1 parent 6753817 commit 3f2b79f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 25 deletions.
40 changes: 20 additions & 20 deletions .idea/libraries/Dart_Packages.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.5

- Remove unnecessary warnings

## 2.1.4

- Fix failed inserts and updates with null argument lists
Expand Down
5 changes: 2 additions & 3 deletions lib/src/base_crdt.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ class BaseCrdt {

// Warn if the query can't be parsed
if (result.rootNode is InvalidStatement) {
print('Warning: unable to parse SQL statement.');
if (sql.contains(';')) {
print('The parser can only interpret single statements.');
print('Warning: The parser can only interpret single statements.');
}
print(sql);
}

// Bail on "manual" transaction statements
if (result.rootNode is BeginTransactionStatement ||
result.rootNode is CommitStatement) {
throw 'Unsupported statement: $sql.\nUse SqliteCrdt.transaction() instead.';
throw 'Unsupported statement: $sql.\nUse transaction() instead.';
}

if (result.rootNode is CreateTableStatement) {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sql_crdt
description: Base package for Conflict-free Replicated Data Types (CRDTs) using SQL databases
version: 2.1.4
version: 2.1.5
homepage: https://github.com/cachapa/sql_crdt
repository: https://github.com/cachapa/sql_crdt
issue_tracker: https://github.com/cachapa/sql_crdt/issues
Expand All @@ -12,7 +12,7 @@ dependencies:
crdt: ^5.1.2
# path: ../crdt
source_span: ^1.10.0
sqlparser: ^0.32.0
sqlparser: ^0.32.1

dev_dependencies:
lints: any
Expand Down

0 comments on commit 3f2b79f

Please sign in to comment.