A sort of alpha release
This commit is contained in:
parent
f22781edf3
commit
63a2d0f9a9
|
@ -10,7 +10,13 @@ structures, for automatic generation of things like
|
||||||
This is not production ready code as yet. Nevertheless if you want a
|
This is not production ready code as yet. Nevertheless if you want a
|
||||||
sensible entry point, look at the two example functions in `squirrel-parse.core`.
|
sensible entry point, look at the two example functions in `squirrel-parse.core`.
|
||||||
|
|
||||||
|
If you want to do something actually a bit useful, try the function
|
||||||
|
|
||||||
|
`squirrel-parse.to-hugsql-queries/migrations-to-queries-sql`
|
||||||
|
|
||||||
|
This, given a [Migratus](https://github.com/yogthos/migratus) migrations directory will generate a
|
||||||
|
[HugSQL](https://www.hugsql.org/) `queries.sql` file which, while it's not
|
||||||
|
perfect, gets you a very long way.
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
(ns squirrel-parse.core
|
(ns squirrel-parse.core
|
||||||
(:require [squirrel-parse.parser :refer [parse]]
|
(:require [squirrel-parse.parser :refer [parse]]
|
||||||
[squirrel-parse.simplify :refer [simplify]]
|
[squirrel-parse.simplify :refer [simplify]]
|
||||||
[squirrel-parse.to-adl :refer [table-definitions-to-entities]]))
|
[squirrel-parse.to-adl :refer [table-definitions-to-entities]]
|
||||||
|
[squirrel-parse.to-hugsql-queries :refer [migrations-to-queries-sql]]))
|
||||||
|
|
||||||
;;; This is get-you-started code.
|
;;; This is get-you-started code.
|
||||||
|
|
||||||
|
@ -14,3 +15,5 @@
|
||||||
"Parses the file of SQL commands indicated by `filename`, and returns a more useful map of maps."
|
"Parses the file of SQL commands indicated by `filename`, and returns a more useful map of maps."
|
||||||
[filename]
|
[filename]
|
||||||
(table-definitions-to-entities (parsed-statements-from-file filename)))
|
(table-definitions-to-entities (parsed-statements-from-file filename)))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue