Initial custom jet generator
I'll need it for Postgis data types
This commit is contained in:
parent
e5a84e09a8
commit
9ef4dad27c
1 changed files with 27 additions and 0 deletions
27
db/jet/main.go
Normal file
27
db/jet/main.go
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
//"database/sql"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"github.com/go-jet/jet/generator/postgres"
|
||||||
|
_ "github.com/lib/pq"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
err := postgres.Generate("../gen",
|
||||||
|
postgres.DBConnection{
|
||||||
|
Host: "/var/run/postgresql",
|
||||||
|
Port: 5432,
|
||||||
|
User: "eliribble",
|
||||||
|
Password: "none",
|
||||||
|
DBName: "nidus-sync",
|
||||||
|
SchemaName: "stadia",
|
||||||
|
SslMode: "disable",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Failed: %v", err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue