mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
v,breaking: add ability to read enum, fn, interface and sumtype attributes in compile-time, change builtin StructAttribute
to VAttribute
(#21149)
This commit is contained in:
parent
dbc4896aa1
commit
24af002249
13 changed files with 139 additions and 30 deletions
|
@ -51,10 +51,10 @@ fn test_mysql_orm() {
|
|||
name: 'id'
|
||||
typ: typeof[int]().idx
|
||||
attrs: [
|
||||
StructAttribute{
|
||||
VAttribute{
|
||||
name: 'primary'
|
||||
},
|
||||
StructAttribute{
|
||||
VAttribute{
|
||||
name: 'sql'
|
||||
has_arg: true
|
||||
kind: .plain
|
||||
|
|
|
@ -55,13 +55,13 @@ fn test_pg_orm() {
|
|||
default_val: ''
|
||||
is_arr: false
|
||||
attrs: [
|
||||
StructAttribute{
|
||||
VAttribute{
|
||||
name: 'primary'
|
||||
has_arg: false
|
||||
arg: ''
|
||||
kind: .plain
|
||||
},
|
||||
StructAttribute{
|
||||
VAttribute{
|
||||
name: 'sql'
|
||||
has_arg: true
|
||||
arg: 'serial'
|
||||
|
|
|
@ -36,10 +36,10 @@ fn test_sqlite_orm() {
|
|||
name: 'id'
|
||||
typ: typeof[int]().idx
|
||||
attrs: [
|
||||
StructAttribute{
|
||||
VAttribute{
|
||||
name: 'primary'
|
||||
},
|
||||
StructAttribute{
|
||||
VAttribute{
|
||||
name: 'sql'
|
||||
has_arg: true
|
||||
kind: .plain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue