Update packages used in documentation

This commit is contained in:
Simon Binder 2023-09-10 22:19:41 +02:00
parent c3d2065d96
commit da0392c7ce
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
11 changed files with 97 additions and 104 deletions

View File

@ -87,7 +87,7 @@ Future<WasmDatabaseResult> connect() async {
final result = await WasmDatabase.open(
databaseName: 'todo_example',
sqlite3Uri: Uri.parse('sqlite3.wasm'),
driftWorkerUri: Uri.parse('drift_worker.dart.js'),
driftWorkerUri: Uri.parse('/drift_worker.dart.js'),
);
if (!result.chosenImplementation.fullySupported) {

View File

@ -34,7 +34,7 @@ the object in `select`, `update` and `insert` statements. This feature
also works with [compiled custom queries]({{ "/queries/custom" | absUrl }}).
{% block "blocks/alert" title="Caution with equality" color="warning" %}
> If your converter returns an object that is not comparable by value, the generated dataclass will not
If your converter returns an object that is not comparable by value, the generated dataclass will not
be comparable by value.
{% endblock %}
@ -59,7 +59,7 @@ class Tasks extends Table {
```
{% block "blocks/alert" title="Caution with enums" color="warning" %}
> It can be easy to accidentally invalidate your database by introducing another enum value.
It can be easy to accidentally invalidate your database by introducing another enum value.
For instance, let's say we inserted a `Task` into the database in the above example and set its
`Status` to `running` (index = 1).
Now we modify `Status` enum to include another entry:
@ -95,7 +95,7 @@ class Tasks extends Table {
```
{% block "blocks/alert" title="Caution with enums" color="warning" %}
> It can be easy to accidentally invalidate your database by renaming your enum values.
It can be easy to accidentally invalidate your database by renaming your enum values.
For instance, let's say we inserted a `Task` into the database in the above example and set its
`Status` to `running`.
Now we modify `Status` enum to rename `running` into `processing`:

View File

@ -77,7 +77,7 @@ The ["Writing queries"]({{ "writing_queries.md" | pageUrl }}) article contains e
to know to write selects, updates and inserts in drift!
{% block "blocks/alert" title="Using the database" %}
> The database class from this guide is ready to be used with your app.
The database class from this guide is ready to be used with your app.
For Flutter apps, a Drift database class is typically instantiated at the top of your widget tree
and then passed down with `provider` or `riverpod`.
See [using the database]({{ '../faq.md#using-the-database' | pageUrl }}) for ideas on how to integrate

View File

@ -94,7 +94,7 @@ further guides to help you learn more:
on `drift` files, which explains `import` statements and the Dart-SQL interop.
{% block "blocks/alert" title="Using the database" %}
> The database class from this guide is ready to be used with your app.
The database class from this guide is ready to be used with your app.
For Flutter apps, a Drift database class is typically instantiated at the top of your widget tree
and then passed down with `provider` or `riverpod`.
See [using the database]({{ '../faq.md#using-the-database' | pageUrl }}) for ideas on how to integrate

View File

@ -274,7 +274,7 @@ Future<void> trackWord(String word) {
```
{% block "blocks/alert" title="Unique constraints and conflict targets" %}
> Both `insertOnConflictUpdate` and `onConflict: DoUpdate` use an `DO UPDATE`
Both `insertOnConflictUpdate` and `onConflict: DoUpdate` use an `DO UPDATE`
upsert in sql. This requires us to provide a so-called "conflict target", a
set of columns to check for uniqueness violations. By default, drift will use
the table's primary key as conflict target. That works in most cases, but if

View File

@ -56,7 +56,7 @@ It only applies to your full Flutter app though, it can't override the sqlite3 v
with `flutter test`.
{% block "blocks/alert" title="A note on ffi and Android" %}
> `package:drift/native.dart` is the recommended drift implementation for new Android apps.
`package:drift/native.dart` is the recommended drift implementation for new Android apps.
However, there are some smaller issues on some devices that you should be aware of:
- Using `sqlite3_flutter_libs` will include prebuilt binaries for 32-bit `x86` devices which you

View File

@ -11,12 +11,12 @@ dependencies:
json_annotation: ^4.8.1
docsy:
hosted: https://simonbinder.eu
version: ^0.2.2
version: ^0.2.3
code_snippets:
hosted: https://simonbinder.eu
version: ^0.0.12
version: ^0.0.13
# used in snippets
http: ^0.13.5
http: ^1.1.0
sqlite3: ^2.0.0
# Fake path_provider for snippets
path_provider:
@ -38,16 +38,14 @@ dev_dependencies:
build_web_compilers: ^4.0.0
built_site:
hosted: https://simonbinder.eu
version: ^0.2.15
linkcheck: ^3.0.0
version: ^0.2.16
json_serializable: ^6.1.6
shelf: ^1.2.0
shelf_static: ^1.1.0
source_span: ^1.9.1
test: ^1.18.0
sqlparser:
zap_dev: ^0.2.2
zap_dev: ^0.2.3+1
dependency_overrides:
# todo: Remove after https://github.com/dart-lang/mime/pull/43
@ -55,10 +53,3 @@ dependency_overrides:
git:
url: https://github.com/simolus3/mime.git
ref: woff2
# The bootstrap_sass on pub.dev doesn't support null safety, so I'm hosting
# https://github.com/dart-league/bootstrap_sass/pull/13.
# Hopefully this can change soon once docsy migrates to bootstrap 5
bootstrap_sass:
hosted:
url: https://simonbinder.eu
version: "4.6.0"

View File

@ -1,29 +1,29 @@
{% assign links = site.links %}
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<footer class="td-footer row d-print-none">
<div class="container-fluid">
<div class="row mx-md-2">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
{% if links.user %}
{% assign links = links.user %}
{% include "partials/footer-links-block.html" %}
{% endif %}
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
<div class="col-6 col-sm-4 text-end text-xs-center order-sm-3">
{% if links.developer %}
{% assign links = links.developer %}
{% include "partials/footer-links-block.html" %}
{% endif %}
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<div class="td-footer__copyright-etc col-12 col-sm-4 text-center py-2 order-sm-2">
{% if site.copyright %}
<small class="text-white"><div>&copy; {{ site.copyright }}</div>
<span><div>&copy; {{ site.copyright }}</div>
Except where otherwise noted, content on this site is licensed under a <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer">CC BY 4.0</a> license.
Code snippets are marked with <a href="http://creativecommons.org/publicdomain/zero/1.0" target="_blank" rel="license noopener noreferrer">CC0 1.0</a>,
drift itself is <a href="https://github.com/simolus3/drift/blob/develop/LICENSE" rel="license" target="_blank">MIT-licensed</a>.
</small>
</span>
{% endif %}
{% if site.privacy_policy %}
<small class="ml-1"><a href="{{ site.privacy_policy }}" target="_blank">{{ "footer_privacy_policy" | i18n }}</a></small>
<span class="ml-1"><a href="{{ site.privacy_policy }}" target="_blank">{{ "footer_privacy_policy" | i18n }}</a></span>
{% endif %}
</div>
</div>

View File

@ -16,9 +16,9 @@ site:
- name: "Contact me via e-mail"
url: "mailto:oss@simonbinder.eu"
icon: "fa fa-envelope"
- name: "Room in gitter"
url: "https://gitter.im/moor-dart/community"
icon: "fab fa-gitter"
# - name: "Room in gitter"
# url: "https://gitter.im/moor-dart/community"
# icon: "fab fa-gitter"
- name: "Project on GitHub"
url: "https://github.com/simolus3/drift"
icon: "fab fa-github"
@ -29,8 +29,10 @@ site:
url: "/docs/"
- name: "Pub"
url: "https://pub.dev/packages/drift"
external: true
- name: "GitHub"
url: "https://github.com/simolus3/drift/"
external: true
- name: "API docs"
url: "/api/"

View File

@ -35,7 +35,7 @@ dependencies:
sqlparser: '^0.31.0'
# Dart analysis
analyzer: ^5.12.0
analyzer: '>=5.12.0 <7.0.0'
analyzer_plugin: ^0.11.0
source_span: ^1.5.5
package_config: ^2.0.0