diff --git a/docs/content/en/docs/Advanced Features/expressions.md b/docs/content/en/docs/Advanced Features/expressions.md index 2305fd76..73764185 100644 --- a/docs/content/en/docs/Advanced Features/expressions.md +++ b/docs/content/en/docs/Advanced Features/expressions.md @@ -35,11 +35,15 @@ Future> findAnimalsByLegs(int legCount) { ``` ## Boolean algebra -You can nest boolean expressions by using the `&`, `!` operators and the `not` method +You can nest boolean expressions by using the `&`, `|` operators and the `not` method exposed by moor: + ```dart // find all animals that aren't mammals and have 4 legs -select(animals)..where((a) => a.isMammal.not() & a.amountOfLegs.equals(4)) +select(animals)..where((a) => a.isMammal.not() & a.amountOfLegs.equals(4)); + +// find all animals that are mammals or have 2 legs +select(animals)..where((a) => a.isMammal | a.amountOfLegs.equals(2)); ``` ## Arithmetic diff --git a/docs/content/en/docs/Examples/relationships.md b/docs/content/en/docs/Examples/relationships.md index f44ac518..02203380 100644 --- a/docs/content/en/docs/Examples/relationships.md +++ b/docs/content/en/docs/Examples/relationships.md @@ -61,7 +61,7 @@ Future writeShoppingCart(CartWithItems entry) { final cart = entry.cart; // first, we write the shopping cart - await into(shoppingCarts).insert(cart, orReplace: true); + await into(shoppingCarts).insert(cart, mode: InsertMode.replace); // we replace the entries of the cart, so first delete the old ones await (delete(shoppingCartEntries) diff --git a/docs/content/en/docs/Other engines/web.md b/docs/content/en/docs/Other engines/web.md index 0c1583d4..0371a313 100644 --- a/docs/content/en/docs/Other engines/web.md +++ b/docs/content/en/docs/Other engines/web.md @@ -20,7 +20,7 @@ class MyDatabase extends _$MyDatabase { MyDatabase() : super(WebDatabase('app')); ``` -Moor web is built on top of the [sql.js](https://github.com/kripken/sql.js/) library, which you need to include: +Moor web is built on top of the [sql.js](https://github.com/sql-js/sql.js/) library, which you need to include: ```html @@ -32,7 +32,7 @@ Moor web is built on top of the [sql.js](https://github.com/kripken/sql.js/) lib ``` -You can grab the latest version of `sql-wasm.js` and `sql-wasm.wasm` [here](https://github.com/kripken/sql.js/tree/master/dist) +You can grab the latest version of `sql-wasm.js` and `sql-wasm.wasm` [here](https://github.com/sql-js/sql.js/releases) and copy them into your `web` folder. A full example that works on the web (and all other platforms) is available @@ -74,7 +74,7 @@ SharedDatabase constructDb() { You can see all queries sent from moor to the underlying database engine by enabling the `logStatements` parameter on the `WebDatabase` - they will appear in the console. When you have assertions enabled (e.g. in debug mode), moor will expose the underlying -[database](http://kripken.github.io/sql.js/documentation/#http://kripken.github.io/sql.js/documentation/class/Database.html) +[database](http://sql-js.github.io/sql.js/documentation/#http://sql-js.github.io/sql.js/documentation/class/Database.html) object via `window.db`. If you need to quickly run a query to check the state of the database, you can use `db.exec(sql)`. If you need to delete your databases, there stored using local storage. You can clear all your data with `localStorage.clear()`. diff --git a/docs/content/en/docs/Using SQL/moor_files.md b/docs/content/en/docs/Using SQL/moor_files.md index 7f8247a4..87f9b2d0 100644 --- a/docs/content/en/docs/Using SQL/moor_files.md +++ b/docs/content/en/docs/Using SQL/moor_files.md @@ -21,7 +21,7 @@ part 'database.g.dart'; include: {'tables.moor'}, ) class MoorDb extends _$MoorDb { - MoorDb() : super(FlutterQueryExecutor.inDatabaseFolder('app.db')); + MoorDb() : super(FlutterQueryExecutor.inDatabaseFolder(path: 'app.db')); @override int get schemaVersion => 1; diff --git a/docs/content/en/docs/_index.md b/docs/content/en/docs/_index.md index 2c48ce0f..4db7575e 100755 --- a/docs/content/en/docs/_index.md +++ b/docs/content/en/docs/_index.md @@ -10,7 +10,7 @@ description: Welcome to the moor documentation. This site shows you what moor ca ## So what's moor? Moor is a reactive persistence library for Dart and Flutter applications. It's built on top -of database libraries like [sqflite](https://pub.dev/packages/sqflite) or [sql.js](https://github.com/kripken/sql.js/) +of database libraries like [sqflite](https://pub.dev/packages/sqflite) or [sql.js](https://github.com/sql-js/sql.js/) and provides additional features, like: - __Type safety__: Instead of writing sql queries manually and parsing the `List>` that they diff --git a/moor/lib/moor_web.dart b/moor/lib/moor_web.dart index 5a3d4b59..b5bffdb3 100644 --- a/moor/lib/moor_web.dart +++ b/moor/lib/moor_web.dart @@ -1,4 +1,4 @@ -/// A version of moor that runs on the web by using [sql.js](https://github.com/kripken/sql.js) +/// A version of moor that runs on the web by using [sql.js](https://github.com/sql-js/sql.js) /// You manually need to include that library into your website to use the /// web version of moor. See [the documentation](https://moor.simonbinder.eu/web) /// for a more detailed instruction. diff --git a/moor/lib/src/web/binary_string_conversion.dart b/moor/lib/src/web/binary_string_conversion.dart index 54ea780c..e687c3dd 100644 --- a/moor/lib/src/web/binary_string_conversion.dart +++ b/moor/lib/src/web/binary_string_conversion.dart @@ -35,7 +35,7 @@ class _Bin2String extends Converter { const _Bin2String(); // There is a browser limit on the amount of chars one can give to - // String.fromCharCodes https://github.com/kripken/sql.js/wiki/Persisting-a-Modified-Database#save-a-database-to-a-string + // String.fromCharCodes https://github.com/sql-js/sql.js/wiki/Persisting-a-Modified-Database#save-a-database-to-a-string static const int _chunkSize = 0xffff; @override diff --git a/moor_generator/test/analyzer/dart/enum_columns_test.dart b/moor_generator/test/analyzer/dart/enum_columns_test.dart index c1ef425a..308a7d20 100644 --- a/moor_generator/test/analyzer/dart/enum_columns_test.dart +++ b/moor_generator/test/analyzer/dart/enum_columns_test.dart @@ -1,3 +1,4 @@ +@Tags(['analyzer']) import 'package:moor_generator/moor_generator.dart'; import 'package:moor_generator/src/analyzer/errors.dart'; import 'package:moor_generator/src/analyzer/runner/results.dart';