Documentation ¶
Index ¶
- Constants
- type GeneralParams
- func (v GeneralParams) Catalog() string
- func (v GeneralParams) ConnectionString() string
- func (v GeneralParams) Database() string
- func (v GeneralParams) Driver() string
- func (v GeneralParams) Mode() Mode
- func (v GeneralParams) Path() string
- func (v GeneralParams) Port() int
- func (v GeneralParams) Server() string
- func (v GeneralParams) String() string
- func (v GeneralParams) User() string
- type Mode
- type Params
- type SQLite3ConnectionParams
- func (v SQLite3ConnectionParams) Catalog() string
- func (v SQLite3ConnectionParams) ConnectionString() string
- func (SQLite3ConnectionParams) Driver() string
- func (v SQLite3ConnectionParams) Mode() string
- func (v SQLite3ConnectionParams) Path() string
- func (SQLite3ConnectionParams) Port() int
- func (SQLite3ConnectionParams) Server() string
- func (v SQLite3ConnectionParams) String() string
- func (v SQLite3ConnectionParams) User() string
Constants ¶
View Source
const DriverSQLite3 = "sqlite3"
DriverSQLite3 defines SQLite driver name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeneralParams ¶
type GeneralParams struct {
// contains filtered or unexported fields
}
GeneralParams hold connection parameters
func NewConnectionString ¶
func NewConnectionString(driver, server, user, password, database string, options ...string) (connectionString GeneralParams, err error)
NewConnectionString creates new connection parameters
func (GeneralParams) ConnectionString ¶
func (v GeneralParams) ConnectionString() string
ConnectionString returns ConnectionString
func (GeneralParams) Path ¶
func (v GeneralParams) Path() string
Path returns path to file (for SQLite3)
func (GeneralParams) String ¶
func (v GeneralParams) String() string
String serializes connection parameters to a string
type Params ¶
type Params interface { Driver() string Mode() Mode Server() string Port() int Catalog() string User() string ConnectionString() string String() string }
Params holds params
type SQLite3ConnectionParams ¶
type SQLite3ConnectionParams struct {
// contains filtered or unexported fields
}
SQLite3ConnectionParams defines SQLite connection params
func NewSQLite3ConnectionParams ¶
func NewSQLite3ConnectionParams(path, catalog string, mode Mode) SQLite3ConnectionParams
NewSQLite3ConnectionParams creates new SQLite connection params
func (SQLite3ConnectionParams) Catalog ¶
func (v SQLite3ConnectionParams) Catalog() string
Catalog returns catalog
func (SQLite3ConnectionParams) ConnectionString ¶
func (v SQLite3ConnectionParams) ConnectionString() string
ConnectionString returns connection string
func (SQLite3ConnectionParams) Driver ¶
func (SQLite3ConnectionParams) Driver() string
Driver returns driver
func (SQLite3ConnectionParams) Mode ¶
func (v SQLite3ConnectionParams) Mode() string
Mode returns mode
func (SQLite3ConnectionParams) Path ¶
func (v SQLite3ConnectionParams) Path() string
Path returns path
func (SQLite3ConnectionParams) Server ¶
func (SQLite3ConnectionParams) Server() string
Server returns server
func (SQLite3ConnectionParams) String ¶
func (v SQLite3ConnectionParams) String() string
String serializes to string
func (SQLite3ConnectionParams) User ¶
func (v SQLite3ConnectionParams) User() string
User returns user
Click to show internal directories.
Click to hide internal directories.