Documentation ¶
Index ¶
- type DataSource
- type ExternalDb
- func (self *ExternalDb) Connect() safego.Option[error]
- func (self *ExternalDb) Disconnect() safego.Option[error]
- func (self *ExternalDb) Exec(query string, args ...any) safego.Option[error]
- func (self *ExternalDb) Ping() safego.Option[error]
- func (self *ExternalDb) Query(query string, args ...any) (*sql.Rows, safego.Option[error])
- type SqliteDb
- func (self *SqliteDb) Connect() safego.Option[error]
- func (self *SqliteDb) Disconnect() safego.Option[error]
- func (self *SqliteDb) Exec(query string, args ...any) safego.Option[error]
- func (self *SqliteDb) Ping() safego.Option[error]
- func (self *SqliteDb) Query(query string, args ...any) (*sql.Rows, safego.Option[error])
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSource ¶
type ExternalDb ¶
type ExternalDb struct {
// contains filtered or unexported fields
}
ExternalDb is a wrapper for the sql.DB type.
func NewExternalDb ¶
func NewExternalDb(connectionStr string) *ExternalDb
NewExternalDb returns a new ExternalDb instance.
func (*ExternalDb) Connect ¶
func (self *ExternalDb) Connect() safego.Option[error]
Connect connects to the database.
func (*ExternalDb) Disconnect ¶
func (self *ExternalDb) Disconnect() safego.Option[error]
Disconnect disconnects from the database.
type SqliteDb ¶
type SqliteDb struct {
// contains filtered or unexported fields
}
SqliteDb is a wrapper for the sql.DB type.
func NewSqliteDb ¶
NewSqliteDb returns a new SqliteDb instance.
func (*SqliteDb) Disconnect ¶
Disconnect disconnects from the database.
Click to show internal directories.
Click to hide internal directories.