From a3267eb6c1cbf33fb59094d07e3ad445f0e4f53e Mon Sep 17 00:00:00 2001 From: ryym Date: Sun, 20 Aug 2023 10:22:18 +0900 Subject: [PATCH] Fix typo in README gen/ -> .gen/ --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 23b1386..e6b1891 100644 --- a/README.md +++ b/README.md @@ -105,23 +105,23 @@ Done ``` Procedure is similar for MySQL, CockroachDB, MariaDB and SQLite. For example: ```sh -jet -source=mysql -dsn="user:pass@tcp(localhost:3306)/dbname" -path=./gen +jet -source=mysql -dsn="user:pass@tcp(localhost:3306)/dbname" -path=./.gen jet -dsn=postgres://user:pass@localhost:26257/jetdb?sslmode=disable -schema=dvds -path=./.gen #cockroachdb -jet -dsn="mariadb://user:pass@tcp(localhost:3306)/dvds" -path=./gen # source flag can be omitted if data source appears in dsn -jet -source=sqlite -dsn="/path/to/sqlite/database/file" -schema=dvds -path=./gen -jet -dsn="file:///path/to/sqlite/database/file" -schema=dvds -path=./gen # sqlite database assumed for 'file' data sources +jet -dsn="mariadb://user:pass@tcp(localhost:3306)/dvds" -path=./.gen # source flag can be omitted if data source appears in dsn +jet -source=sqlite -dsn="/path/to/sqlite/database/file" -schema=dvds -path=./.gen +jet -dsn="file:///path/to/sqlite/database/file" -schema=dvds -path=./.gen # sqlite database assumed for 'file' data sources ``` _*User has to have a permission to read information schema tables._ As command output suggest, Jet will: - connect to postgres database and retrieve information about the _tables_, _views_ and _enums_ of `dvds` schema -- delete everything in schema destination folder - `./gen/jetdb/dvds`, +- delete everything in schema destination folder - `./.gen/jetdb/dvds`, - and finally generate SQL Builder and Model types for each schema table, view and enum. Generated files folder structure will look like this: ```sh -|-- gen # -path +|-- .gen # -path | `-- jetdb # database name | `-- dvds # schema name | |-- enum # sql builder package for enums @@ -156,7 +156,7 @@ import ( . "github.com/go-jet/jet/v2/examples/quick-start/.gen/jetdb/dvds/table" . "github.com/go-jet/jet/v2/postgres" - "github.com/go-jet/jet/v2/examples/quick-start/gen/jetdb/dvds/model" + "github.com/go-jet/jet/v2/examples/quick-start/.gen/jetdb/dvds/model" ) ``` Let's say we want to retrieve the list of all _actors_ that acted in _films_ longer than 180 minutes, _film language_ is 'English'