diff --git a/docs/pages/docs/Using SQL/drift_files.md b/docs/pages/docs/Using SQL/drift_files.md index 52b1d458..1a8affb3 100644 --- a/docs/pages/docs/Using SQL/drift_files.md +++ b/docs/pages/docs/Using SQL/drift_files.md @@ -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 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 To help support drift's Dart API, `CREATE TABLE` statements in drift files can diff --git a/docs/pages/docs/Using SQL/sql_ide.md b/docs/pages/docs/Using SQL/sql_ide.md index 94a8c255..5283a01a 100644 --- a/docs/pages/docs/Using SQL/sql_ide.md +++ b/docs/pages/docs/Using SQL/sql_ide.md @@ -11,7 +11,7 @@ hints, folding and outline. ## Features -At the moment, the IDE supports +At the moment, the IDE supports - auto-complete to suggest matching keywords as you type - warnings and errors for your queries