Documentation ¶
Index ¶
- func GenerateQuery(queryString string, argsMap map[string]interface{}) (string, []interface{}, error)
- func MySQLGenerateQuery(queryString string, argsMap map[string]interface{}) (string, []interface{}, error)
- func Open(configPath string) (*sql.DB, error)
- func OpenOptions(options Options) (*sql.DB, error)
- func PostgresGenerateQuery(queryString string, argsMap map[string]interface{}) (string, []interface{}, error)
- type Goma
- type Options
- func (o Options) ConfigPath() string
- func (o Options) DaoImportPath() string
- func (o Options) DaoPkgName() string
- func (o Options) EntityImportPath() string
- func (o Options) EntityPkgName() string
- func (o Options) SQLRootDirPath() string
- func (o Options) Source() string
- func (o Options) Tuples() []map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateQuery ¶
func MySQLGenerateQuery ¶
func MySQLGenerateQuery(queryString string, argsMap map[string]interface{}) (string, []interface{}, error)
MySQLGenerateQuery generate bind args query
func OpenOptions ¶
OpenOptions is create goma client. - database open
Types ¶
type Options ¶
type Options struct { // driver and dataSource Driver string `json:"driver"` // DriverName UserName string `json:"user"` // access user name `admin` PassWord string `json:"password"` // access user password `password` Host string `json:"host"` // localhost Port int `json:"port"` // 3306 DBName string `json:"db"` // DataBaseName Location string `json:"location"` // Location name // postgres SSLMode string `json:"ssl"` // disable, verify-full // goma IsConfig bool `json:"isConfig"` // goma config generate Debug bool `json:"debug"` // goma debug mode (default false) SQLRootDir string `json:"sqlRootDir"` // goma sql root dir path (default './sql') DaoRootDir string `json:"daoRootDir"` // goma dao root dir path (default './dao') EntityRootDir string `json:"entityRootDir"` // goma entity root dir path (default './entity') CurrentDir string `json:"currentDir"` // goma currentDir path }
Options is open sql.DB options.
func NewOptions ¶
NewOptions create read file Options.
func (Options) DaoImportPath ¶
DaoImportPath result dao package import.
func (Options) DaoPkgName ¶
DaoPkgName result dao package name.
func (Options) EntityImportPath ¶
EntityImportPath result entity package import.
func (Options) EntityPkgName ¶
EntityPkgName result entity package name.
func (Options) SQLRootDirPath ¶
SQLRootDirPath result sql dir path.
Click to show internal directories.
Click to hide internal directories.