You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Comparison|`= != < > <= >=`| If either parameter is null, this evaluates to null. |
23
-
| Null|`IS NULL`, `IS NOT NULL`||
24
-
| Mathematical|`+ - * /`||
25
-
| Logical|`AND`, `OR`, `NOT`||
26
-
| Cast|`CAST(x AS type)`<br/>`x :: type`| Cast to text, numeric, integer, real or blob. |
27
-
| JSON|`json -> 'path'`<br/>`json ->> 'path'`|`->` Returns the value as a JSON string.<br/> `->>` Returns the extracted value. |
28
-
| Text concatenation|`\|\|`| Joins two text values together. |
29
-
| Arrays|`<left> IN <right>`| Returns true if the `left` value is present in the `right` JSON array.In data queries, only the `left` value may be a bucket parameter. In parameter queries, the `left` or `right` value may be a bucket parameter.Differs from the SQLite operator in that it can be used directly on a JSON array. |
| Comparison:<br/> `= != < > <= >=`| If either parameter is null, this evaluates to null. |
23
+
| Null:<br/> `IS NULL`, `IS NOT NULL`||
24
+
| Mathematical:<br/> `+ - * /`||
25
+
| Logical:<br/> `AND`, `OR`, `NOT`||
26
+
| Cast:<br/> `CAST(x AS type)`<br/>`x :: type`| Cast to text, numeric, integer, real or blob. |
27
+
| JSON:<br/> `json -> 'path'`<br/>`json ->> 'path'`|`->` Returns the value as a JSON string.<br/> `->>` Returns the extracted value. |
28
+
| Text concatenation:<br/> `\|\|`| Joins two text values together. |
29
+
| Arrays:<br/> `<left> IN <right>`| Returns true if the `left` value is present in the `right` JSON array.<br/>In data queries, only the `left` value may be a bucket parameter. In parameter queries, the `left` or `right` value may be a bucket parameter.<br/>Differs from the SQLite operator in that it can be used directly on a JSON array. |
|[upper(text)](https://www.sqlite.org/lang_corefunc.html#upper)| Convert text to upper case. |
36
36
|[lower(text)](https://www.sqlite.org/lang_corefunc.html#lower)| Convert text to lower case. |
37
-
|[substring(text, start, length)](https://sqlite.org/lang_corefunc.html#substr)| Extracts a portion of a string based on specified start index and length. Start index is 1-based. |
37
+
|[substring(text, start, length)](https://sqlite.org/lang_corefunc.html#substr)| Extracts a portion of a string based on specified start index and length. Start index is 1-based. Example: `substring(created_at, 1, 10)` returns the date portion of the timestamp. |
38
38
|[hex(data)](https://www.sqlite.org/lang_corefunc.html#hex)| Convert blob or text data to hexadecimal text. |
39
39
| base64(data) | Convert blob or text data to base64 text. |
40
40
|[length(data)](https://www.sqlite.org/lang_corefunc.html#length)| For text, return the number of characters. For blob, return the number of bytes. For null, return null. For integer and real, convert to text and return the number of characters. |
41
41
|[typeof(data)](https://www.sqlite.org/lang_corefunc.html#typeof)| text, integer, real, blob or null |
42
+
|[json\_each(data)](https://www.sqlite.org/json1.html#jeach)| Expands a JSON array or object from a request or token parameter into a set of parameter rows. Example: `SELECT value as project_id FROM json_each(request.jwt() -> 'project_ids'`|
42
43
|[json\_extract(data, path)](https://www.sqlite.org/json1.html#jex)| Same as `->>` operator, but the path must start with `$.`|
43
44
|[json\_array\_length(data)](https://www.sqlite.org/json1.html#jarraylen)| Given a JSON array (as text), returns the length of the array. If data is null, returns null. If the value is not a JSON array, returns 0. |
44
45
|[json\_valid(data)](https://www.sqlite.org/json1.html#jvalid)| Returns 1 if the data can be parsed as JSON, 0 otherwise. |
45
-
| json\_keys(data) | Returns the set of keys of a JSON object as a JSON array. |
46
+
| json\_keys(data) | Returns the set of keys of a JSON object as a JSON array. Example: `select * from items where bucket.user_id in json_keys(permissions_json)`|
46
47
|[ifnull(x,y)](https://www.sqlite.org/lang_corefunc.html#ifnull)| Returns x if non-null, otherwise returns y. |
47
48
|[unixepoch(datetime, \[modifier\])](https://www.sqlite.org/lang_datefunc.html)| Returns a datetime as Unix timestamp. If modifier is "subsec", the result is a floating point number, with milliseconds including in the fraction. The datetime argument is required - this function cannot be used to get the current time. |
48
49
|[datetime(datetime, \[modifier\])](https://www.sqlite.org/lang_datefunc.html)| Returns a datetime as a datetime string, in the format YYYY-MM-DD HH:MM:SS. If the specifier is "subsec", milliseconds are also included. If the modifier is "unixepoch", the argument is interpreted as a unix timestamp. Both modifiers can be included: datetime(timestamp, 'unixepoch', 'subsec'). The datetime argument is required - this function cannot be used to get the current time. |
0 commit comments