examples: rename "Chield" to "Child" in examples/database/orm.v (#10414)
parent
6576d876fc
commit
534b59e721
|
@ -19,12 +19,12 @@ struct User {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Parent {
|
struct Parent {
|
||||||
id int [primary; sql: serial]
|
id int [primary; sql: serial]
|
||||||
name string
|
name string
|
||||||
children []Chield [fkey: 'parent_id']
|
children []Child [fkey: 'parent_id']
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Chield {
|
struct Child {
|
||||||
id int [primary; sql: serial]
|
id int [primary; sql: serial]
|
||||||
parent_id int
|
parent_id int
|
||||||
name string
|
name string
|
||||||
|
@ -49,10 +49,10 @@ fn sqlite3_array() {
|
||||||
par := Parent{
|
par := Parent{
|
||||||
name: 'test'
|
name: 'test'
|
||||||
children: [
|
children: [
|
||||||
Chield{
|
Child{
|
||||||
name: 'abc'
|
name: 'abc'
|
||||||
},
|
},
|
||||||
Chield{
|
Child{
|
||||||
name: 'def'
|
name: 'def'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -67,7 +67,7 @@ fn sqlite3_array() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sql db {
|
sql db {
|
||||||
drop table Chield
|
drop table Child
|
||||||
drop table Parent
|
drop table Parent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,10 +91,10 @@ fn mysql_array() {
|
||||||
par := Parent{
|
par := Parent{
|
||||||
name: 'test'
|
name: 'test'
|
||||||
children: [
|
children: [
|
||||||
Chield{
|
Child{
|
||||||
name: 'abc'
|
name: 'abc'
|
||||||
},
|
},
|
||||||
Chield{
|
Child{
|
||||||
name: 'def'
|
name: 'def'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -111,7 +111,7 @@ fn mysql_array() {
|
||||||
eprintln(parent)
|
eprintln(parent)
|
||||||
|
|
||||||
sql db {
|
sql db {
|
||||||
drop table Chield
|
drop table Child
|
||||||
drop table Parent
|
drop table Parent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,10 +130,10 @@ fn psql_array() {
|
||||||
par := Parent{
|
par := Parent{
|
||||||
name: 'test'
|
name: 'test'
|
||||||
children: [
|
children: [
|
||||||
Chield{
|
Child{
|
||||||
name: 'abc'
|
name: 'abc'
|
||||||
},
|
},
|
||||||
Chield{
|
Child{
|
||||||
name: 'def'
|
name: 'def'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -150,7 +150,7 @@ fn psql_array() {
|
||||||
eprintln(parent)
|
eprintln(parent)
|
||||||
|
|
||||||
sql db {
|
sql db {
|
||||||
drop table Chield
|
drop table Child
|
||||||
drop table Parent
|
drop table Parent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue