Documentation ¶
Index ¶
Constants ¶
View Source
const (
SchemaParam = "db_schema"
)
Variables ¶
View Source
var (
ErrNotConnected = errors.New("db: not connected")
)
Functions ¶
func NewDbConnection ¶
func NewDbConnection(config structure.DBConfiguration) (*pg.DB, error)
func ResolveMigrationsDirectory ¶ added in v1.9.0
func ResolveMigrationsDirectory() string
func RunInTransactionV2 ¶
Types ¶
type ErrorEvent ¶
type ErrorEvent struct {
// contains filtered or unexported fields
}
func (ErrorEvent) Error ¶
func (er ErrorEvent) Error() string
type Option ¶
type Option func(rdc *RxDbClient)
func WithInitializingErrorHandler ¶
func WithInitializingErrorHandler(eh errorHandler) Option
func WithInitializingHandler ¶
func WithInitializingHandler(handler initHandler) Option
func WithMigrationsEnsuring ¶
func WithMigrationsEnsuring() Option
func WithQueryHooks ¶ added in v1.3.0
func WithSchemaAutoInjecting ¶
func WithSchemaAutoInjecting() Option
func WithSchemaEnsuring ¶
func WithSchemaEnsuring() Option
type RxDbClient ¶
type RxDbClient struct {
// contains filtered or unexported fields
}
func NewRxDbClient ¶
func NewRxDbClient(opts ...Option) *RxDbClient
func (*RxDbClient) Close ¶
func (rc *RxDbClient) Close() error
func (*RxDbClient) ReceiveConfiguration ¶
func (rc *RxDbClient) ReceiveConfiguration(config structure.DBConfiguration)
func (*RxDbClient) RunInTransaction ¶
func (rc *RxDbClient) RunInTransaction(f interface{}) error
func (*RxDbClient) Unsafe ¶ added in v1.3.0
func (rc *RxDbClient) Unsafe() *pg.DB
func (*RxDbClient) Visit ¶
func (rc *RxDbClient) Visit(v visitor) error
Click to show internal directories.
Click to hide internal directories.