Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitWithError ¶
type CommitWithError struct {
Err error
}
func NewCommitWithError ¶
func NewCommitWithError(err error) *CommitWithError
NewCommitWithError creates an error that can be returned in a pop transaction without rolling back the transaction. This should only be used in cases where you want the transaction to commit but return an error message to the user.
func (*CommitWithError) Cause ¶
func (e *CommitWithError) Cause() error
func (*CommitWithError) Error ¶
func (e *CommitWithError) Error() string
type Connection ¶
type Connection struct {
*pop.Connection
}
Connection is the interface a storage provider must implement.
func Dial ¶
func Dial(config *conf.GlobalConfiguration) (*Connection, error)
Dial will connect to that storage engine
func (*Connection) Transaction ¶
func (c *Connection) Transaction(fn func(*Connection) error) error
func (*Connection) UpdateOnly ¶
func (conn *Connection) UpdateOnly(model interface{}, includeColumns ...string) error
func (*Connection) WithContext ¶
func (c *Connection) WithContext(ctx context.Context) *Connection
WithContext returns a new connection with an updated context. This is typically used for tracing as the context contains trace span information.
type NullString ¶
type NullString string
func (*NullString) Scan ¶
func (s *NullString) Scan(value interface{}) error
func (NullString) String ¶
func (s NullString) String() string
Click to show internal directories.
Click to hide internal directories.