We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 758c18a commit 15242d8Copy full SHA for 15242d8
doc/docs.md
@@ -4009,8 +4009,9 @@ V's ORM provides a number of benefits:
4009
```v
4010
import sqlite
4011
4012
+// sets a custom table name. Default is struct name (case-sensitive)
4013
+[table: 'customers']
4014
struct Customer {
- // struct name has to be the same as the table name (for now)
4015
id int [primary; sql: serial] // a field named `id` of integer type must be the first field
4016
name string [nonull]
4017
nr_orders int
@@ -4030,7 +4031,7 @@ sql db {
4030
4031
create table Customer
4032
}
4033
-// select count(*) from Customer
4034
+// select count(*) from customers
4035
nr_customers := sql db {
4036
select count from Customer
4037
0 commit comments