@@ -26,7 +26,7 @@ ALTER TABLE article
26
26
REFERENCES test_user (id);
27
27
```
28
28
29
- scala-db-codegen will then generate [ "type all the things!"] ( http://jto.github.io/articles/type-all-the-things/ )
29
+ ` scala-db-codegen ` will then generate [ "type all the things!"] ( http://jto.github.io/articles/type-all-the-things/ )
30
30
code like this
31
31
32
32
``` scala
@@ -68,24 +68,24 @@ It could in theory also generate the code differently.
68
68
## CLI
69
69
70
70
Download 13kb bootstrap script
71
- [ ` db-codegen ` ] ( https://github.com/olafurpg/scala-db-codegen/blob/master/db-codegen )
71
+ [ ` scala- db-codegen` ] ( https://github.com/olafurpg/scala-db-codegen/blob/master/scala- db-codegen )
72
72
and execute it.
73
73
The script will download all dependencies on first execution.
74
74
75
75
``` scala
76
76
// print to stdout, works with running postgres instance on
77
77
// localhost:5432 with user "postgres", password "postgres" and database "postgres"
78
- $ db- codegen
78
+ $ scala - db- codegen
79
79
// Override any default settings with flags.
80
- $ db- codegen -- user myuser -- password mypassword -- url jdbc: postgresql:// myhost: 8888 / postgres -- file Tables .scala -- type - map " bool,Boolean;int4,Int;int8,Long"
80
+ $ scala - db- codegen -- user myuser -- password mypassword -- url jdbc: postgresql:// myhost: 8888 / postgres -- file Tables .scala -- type - map " bool,Boolean;int4,Int;int8,Long"
81
81
...
82
82
```
83
83
84
84
For more details:
85
85
``` shell
86
- $ db-codegen --help
87
- db-codegen 0.1 .0
88
- Usage: db-codegen [options]
86
+ $ scala- db-codegen --help
87
+ scala- db-codegen 0.2 .0
88
+ Usage: scala- db-codegen [options]
89
89
--usage
90
90
Print usage and exit
91
91
--help | -h
@@ -152,6 +152,18 @@ Instead of learning more about slick models and which methods to override
152
152
on the slick code generator, I decided to roll my own code generator and
153
153
hopefully learn more about jdbc along the way :)
154
154
155
+ # # Changelog
156
+
157
+ ** 0.2.0**
158
+
159
+ * Map nullable columns to ` Option` types.
160
+ * Rename maven artifact name to ` scala-db-codegen` for consistency.
161
+
162
+ ** 0.1.0**
163
+
164
+ * Basic code generation
165
+ * Command line interface
166
+
155
167
[travisImg]: https://travis-ci.org/olafurpg/scala-db-codegen.svg? branch=master
156
168
[travisLink]: https://travis-ci.org/olafurpg/scala-db-codegen
157
169
0 commit comments