Update README.

This commit is contained in:
go-jet 2019-08-19 10:40:34 +02:00
parent bc2e8aca42
commit a893dfba44
3 changed files with 9 additions and 11 deletions

View file

@ -161,7 +161,7 @@ stmt := SELECT(
Film.FilmID.ASC(),
)
```
Package(dot) import is used so that statement resemble as much as possible as native SQL. Note that every column has a type. String column `Language.Name` and `Category.Name` can be compared only with
Package(dot) import is used so that statement would resemble as much as possible as native SQL. Note that every column has a type. String column `Language.Name` and `Category.Name` can be compared only with
string columns and expressions. `Actor.ActorID`, `FilmActor.ActorID`, `Film.Length` are integer columns
and can be compared only with integer columns and expressions.
@ -219,7 +219,7 @@ __How to get debug SQL from statement?__
```go
debugSql := stmt.DebugSql()
```
debugSql - query string that can be copy pasted to sql editor and executed. It's not intended to be used in production.
debugSql - query string that can be copy pasted to sql editor and executed. __It's not intended to be used in production!!!__
<details>
<summary>Click to see debug sql</summary>

View file

@ -29,7 +29,7 @@ var (
)
func init() {
flag.StringVar(&source, "source", "", "Database system name (PostgreSQL or MySQL)")
flag.StringVar(&source, "source", "", "Database system name (PostgreSQL, MySQL or MariaDB)")
flag.StringVar(&host, "host", "", "Database host path (Example: localhost)")
flag.IntVar(&port, "port", 0, "Database port")
@ -37,8 +37,8 @@ func init() {
flag.StringVar(&password, "password", "", "The users password")
flag.StringVar(&params, "params", "", "Additional connection string parameters(optional)")
flag.StringVar(&dbName, "dbname", "", "Database name")
flag.StringVar(&schemaName, "schema", "public", `Database schema name. (default "public") (ignored for MySQL)`)
flag.StringVar(&sslmode, "sslmode", "disable", `Whether or not to use SSL(optional)(default "disable") (ignored for MySQL)`)
flag.StringVar(&schemaName, "schema", "public", `Database schema name. (default "public") (ignored for MySQL and MariaDB)`)
flag.StringVar(&sslmode, "sslmode", "disable", `Whether or not to use SSL(optional)(default "disable") (ignored for MySQL and MariaDB)`)
flag.StringVar(&destDir, "path", "", "Destination dir for files generated.")
}
@ -51,7 +51,7 @@ Jet generator 2.0.0
Usage:
-source string
Database system name (PostgreSQL or MySQL)
Database system name (PostgreSQL, MySQL or MariaDB)
-host string
Database host path (Example: localhost)
-port int
@ -65,9 +65,9 @@ Usage:
-params string
Additional connection string parameters(optional)
-schema string
Database schema name. (default "public") (ignored for MySQL)
Database schema name. (default "public") (ignored for MySQL and MariaDB)
-sslmode string
Whether or not to use SSL(optional) (default "disable") (ignored for MySQL)
Whether or not to use SSL(optional) (default "disable") (ignored for MySQL and MariaDB)
-path string
Destination dir for files generated.
`)

View file

@ -67,8 +67,6 @@ func initMySQLDB() {
Port: dbconfig.MySQLPort,
User: dbconfig.MySQLUser,
Password: dbconfig.MySQLPassword,
//SslMode:
//Params
DBName: dbName,
})