Document using existing row classes for views

This commit is contained in:
Simon Binder 2022-09-24 21:59:45 +02:00
parent 226aead4c0
commit ccea98e4a2
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
1 changed files with 7 additions and 0 deletions

View File

@ -83,6 +83,13 @@ CREATE TABLE users(
) 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
In most cases, generated companion classes are the right tool for updates and inserts.