mirror of https://github.com/AMT-Cheif/drift.git
Document using existing row classes for views
This commit is contained in:
parent
226aead4c0
commit
ccea98e4a2
|
@ -83,6 +83,13 @@ CREATE TABLE users(
|
||||||
) WITH User;
|
) WITH User;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
This feature is also supported for views. Simply add the `WITH ClassName` syntax
|
||||||
|
after the name of the view in the `CREATE VIEW` statement:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE VIEW my_view WITH ExistingClass AS SELECT ...
|
||||||
|
```
|
||||||
|
|
||||||
## Inserts and updates with custom classes
|
## Inserts and updates with custom classes
|
||||||
|
|
||||||
In most cases, generated companion classes are the right tool for updates and inserts.
|
In most cases, generated companion classes are the right tool for updates and inserts.
|
||||||
|
|
Loading…
Reference in New Issue