From 99bb9e0fe0b4b1d606dde343d93a9e3a3cbedb28 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Mon, 27 Nov 2023 23:45:57 +0100 Subject: [PATCH] Mention JSON support in expressions page --- docs/pages/docs/Dart API/expressions.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/pages/docs/Dart API/expressions.md b/docs/pages/docs/Dart API/expressions.md index f6784374..6c7e5f1e 100644 --- a/docs/pages/docs/Dart API/expressions.md +++ b/docs/pages/docs/Dart API/expressions.md @@ -80,7 +80,7 @@ bitwise operations: {% include "blocks/snippet" snippets = snippets name = 'bitwise' %} -## Nullability +## Null checks {#nullability} To check whether an expression evaluates to `NULL` in SQL, you can use the `isNull` extension: ```dart @@ -131,6 +131,12 @@ select(animals)..where((a) => a.amountOfLegs.isIn([3, 7, 4, 2]); Again, the `isNotIn` function works the other way around. +## JSON + +Support for common JSON operators is provided through `package:drift/extensions/json1.dart`. +This provides things like `jsonExtract` to extract fields from JSON or `jsonEach` to query +nested JSON structures. For more details, see the [JSON support]({{ 'select.md#json-support' | pageUrl }}) section on the page about selects or [this more complex example]({{ '../Examples/relationships.md#with-json-functions' | pageUrl }}). + ## Aggregate functions (like count and sum) {#aggregate} [Aggregate functions](https://www.sqlite.org/lang_aggfunc.html) are available