summaryrefslogtreecommitdiff
path: root/examples/18-database/src/data.hob
blob: 917789020cd4f775be535f9dcb0f27c28b409b7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
struct Author {
    field id: Int32;
    field name: String;
}

databaseSchema Data {
    table authors {
        row Author;
        primaryKey id;
    }
}

//query allAuthors() on Data {
//    select Data.authors as authors
//}

//query authorsByName(name: String) on Data {
//    select Data.authors as authors
//    where authors.name = name
//}