Documentation ¶
Index ¶
- func CloseAll(connections map[string]*sqlx.DB) error
- func Fields(values interface{}) []string
- func InitConnections(databases map[string]*ConnectionSettings) (map[string]*sqlx.DB, func() error)
- func Insert(db *sqlx.DB, table string, model interface{}, excludedFields []string) (*sqlx.Rows, error)
- func Update(db *sqlx.DB, table string, model interface{}, where string, ...) (sql.Result, error)
- type ConnectionSettings
- func (settings *ConnectionSettings) Connect() (*sqlx.DB, error)
- func (settings *ConnectionSettings) Copy() *ConnectionSettings
- func (settings *ConnectionSettings) Init() *sqlx.DB
- func (settings *ConnectionSettings) Open() (*sqlx.DB, error)
- func (settings *ConnectionSettings) Ping() error
- func (settings *ConnectionSettings) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConnections ¶
Initialize databases given ConnectionStrings
Types ¶
type ConnectionSettings ¶
type ConnectionSettings struct { Host string Port string User string Password string Database string DisableSSL bool MaxOpenConns int }
func (*ConnectionSettings) Connect ¶
func (settings *ConnectionSettings) Connect() (*sqlx.DB, error)
func (*ConnectionSettings) Copy ¶
func (settings *ConnectionSettings) Copy() *ConnectionSettings
func (*ConnectionSettings) Init ¶
func (settings *ConnectionSettings) Init() *sqlx.DB
func (*ConnectionSettings) Ping ¶
func (settings *ConnectionSettings) Ping() error
func (*ConnectionSettings) String ¶
func (settings *ConnectionSettings) String() string
Click to show internal directories.
Click to hide internal directories.