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:
Felipe Pena 2024-03-31 03:14:33 -03:00 committed by GitHub
parent dbc4896aa1
commit 24af002249
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 139 additions and 30 deletions

View file

@ -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

View file

@ -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'

View file

@ -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