|
@@ -35,3 +35,23 @@ Plan (`plans`):
|
|
|
User AS `user` ON `user`.`id` WITH `user_id`
|
|
|
UserProperty AS `userProperty` ON `userProperty`.`id` WITH `user_property_id`
|
|
|
```
|
|
|
+
|
|
|
+If you dare to try it out, simply
|
|
|
+
|
|
|
+```
|
|
|
+go get -u git.giaever.org/bnb.hosting/orm
|
|
|
+```
|
|
|
+
|
|
|
+and import it to a file and create a table-struct, e.g
|
|
|
+```go
|
|
|
+import "git.giaever.org/bnb.hosting/orm"
|
|
|
+
|
|
|
+type MyTable struct {
|
|
|
+ orm.Mappable // And implement missing function for interface `MappableInterface`
|
|
|
+ field string `db:"field:col_name"`
|
|
|
+}
|
|
|
+
|
|
|
+func init() {
|
|
|
+ orm.Map(&MyTable{})
|
|
|
+}
|
|
|
+```
|