storage

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func (NullString) Value

func (s NullString) Value() (driver.Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL