Skip to content

Commit

Permalink
Update null convention in ORM example
Browse files Browse the repository at this point in the history
The @[nonull] attribute is no longer used and is replaced by using an option type.
vlang#19379
  • Loading branch information
juan-db authored Dec 28, 2023
1 parent b944927 commit 07fc866
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4978,9 +4978,9 @@ import db.sqlite
@[table: 'customers']
struct Customer {
id int @[primary; sql: serial] // a field named `id` of integer type must be the first field
name string @[nonull]
nr_orders int
country string @[nonull]
name string
nr_orders ?int
country string
}
db := sqlite.connect('customers.db')!
Expand Down Expand Up @@ -7153,4 +7153,4 @@ Assignment Operators
+= -= *= /= %=
&= |= ^=
>>= <<= >>>=
```
```

0 comments on commit 07fc866

Please sign in to comment.