mirror of https://github.com/AMT-Cheif/drift.git
Mention that casts work for drift types
This commit is contained in:
parent
a6bede2aaa
commit
d9072d7fac
|
@ -142,6 +142,16 @@ by their name. For this, use `ENUMNAME(...)` instead of `ENUM(...)`.
|
||||||
For details on all supported types, and information on how to switch between the
|
For details on all supported types, and information on how to switch between the
|
||||||
datetime modes, see [this section]({{ '../Getting started/advanced_dart_tables.md#supported-column-types' | pageUrl }}).
|
datetime modes, see [this section]({{ '../Getting started/advanced_dart_tables.md#supported-column-types' | pageUrl }}).
|
||||||
|
|
||||||
|
The additional drift-specific types (`BOOLEAN`, `DATETIME`, `ENUM` and `ENUMNAME`) are also supported in `CAST`
|
||||||
|
expressions, which is helpful for views:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE VIEW with_next_status AS
|
||||||
|
SELECT id, CAST(status + 1 AS ENUM(Status)) AS status
|
||||||
|
FROM tasks
|
||||||
|
WHERE status < 3;
|
||||||
|
```
|
||||||
|
|
||||||
### Drift-specific features
|
### Drift-specific features
|
||||||
|
|
||||||
To help support drift's Dart API, `CREATE TABLE` statements in drift files can
|
To help support drift's Dart API, `CREATE TABLE` statements in drift files can
|
||||||
|
|
|
@ -11,7 +11,7 @@ hints, folding and outline.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
At the moment, the IDE supports
|
At the moment, the IDE supports
|
||||||
|
|
||||||
- auto-complete to suggest matching keywords as you type
|
- auto-complete to suggest matching keywords as you type
|
||||||
- warnings and errors for your queries
|
- warnings and errors for your queries
|
||||||
|
|
Loading…
Reference in New Issue