Documentation ¶
Index ¶
- func Columns(names ...string) func(*gorm.DB) *gorm.DB
- func Context(ctx context.Context, db *gorm.DB) context.Context
- func Debug(ctx context.Context) context.Context
- func FromContext(ctx context.Context) *gorm.DB
- func QuoteID(parts ...string) string
- func Transaction(ctx context.Context, fn func(context.Context, *gorm.DB) error) error
- type BoolArray
- type Error
- type IntArray
- type Listener
- type NullTime
- type NullUUID
- type NullUUIDArray
- type StringArray
- type UUIDArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶ added in v0.30.0
FromContext will return the DB object from the given context.
Types ¶
type Error ¶
type Error struct { Code string Message string Detail string Hint string TableName string ConstraintName string Where string ColumnName string Position int // contains filtered or unexported fields }
Error represents a driver-agnostic SQL error.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener will listen for NOTIFY commands on a set of channels.
func NewListener ¶
func NewListener(ctx context.Context, logger *log.Logger, db *sql.DB, channels ...string) (*Listener, error)
NewListener will create and initialize a Listener which will automatically reconnect and listen to the provided channels.
func (*Listener) Notifications ¶
func (l *Listener) Notifications() <-chan *pgconn.Notification
Notifications returns the notification channel for this listener. Nil values will not be returned until the listener is closed.
type NullUUIDArray ¶ added in v0.28.0
func (*NullUUIDArray) Scan ¶ added in v0.28.0
func (s *NullUUIDArray) Scan(src interface{}) error
type StringArray ¶
type StringArray []string
func (*StringArray) Scan ¶
func (s *StringArray) Scan(src interface{}) error
Click to show internal directories.
Click to hide internal directories.