Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoResultFound = errors.New("no result has been found")
)
Error messages.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage interface {
Connection() database.Connection
Context(...string) Storage
Tx(...sql.IsolationLevel) (Storage, error)
Commit() error
Rollback() error
Done()
}
Storage abstract a client.
func NewEnv ¶
NewEnv create a new Storage based on given env variable. Note: it create a new connection.
func NewOnceEnv ¶
NewOnceEnv create a new Storage (with an unique connection) based on given variable. Note: it create a new connection if there is none available.
func NewWith ¶
func NewWith(db database.Connection) Storage
NewWith create a new Storage with the given connection.
Click to show internal directories.
Click to hide internal directories.