Documentation
¶
Index ¶
- Constants
- type Database
- type Service
- func (s *Service) BeginTxContext(ctx context.Context) (*sql.Tx, context.CancelFunc, error)
- func (s *Service) Close() error
- func (s *Service) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (s *Service) Initialize() error
- func (s *Service) Migrate() error
- func (s *Service) Open() error
- func (s *Service) Ping() error
- func (s *Service) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
Constants ¶
View Source
const ( ServiceName = types.DatabaseServiceName PostgresDriver = "postgres" SqliteDriver = "sqlite" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
ConfigService *config.Service `inject:"configservice"`
// contains filtered or unexported fields
}
func (*Service) BeginTxContext ¶
BeginTxContext starts a new transaction.
func (*Service) ExecContext ¶
func (*Service) Initialize ¶
Initialize initializes the database service. No constructor is provided as this service is to be initialized within an IOC/DI container.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.