db

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrDuplicate  = "unique_violation"
	ErrInvalid    = "invalid_text_representation"
	ErrTruncation = "string_data_right_truncation"
)

Variables

View Source
var (
	ErrSaveDB    = errors.New("Failed to save to database")
	ErrUpdateDB  = errors.New("Failed to update database")
	ErrMarshal   = errors.New("Failed to marshal metadata")
	ErrUnmarshal = errors.New("Failed to unmarshal metadata")
	// ErrScanMetadata indicates problem with metadata in db.
	ErrScanMetadata = errors.New("failed to scan metadata")
)

Functions

This section is empty.

Types

type Metadata

type Metadata map[string]interface{}

Metadata type for handling metadata properly in database/sql

func (*Metadata) Scan

func (m *Metadata) Scan(value interface{}) error

Scan - Implement the database/sql scanner interface

func (Metadata) Value

func (m Metadata) Value() (driver.Value, error)

Value Implements valuer

type Tags

type Tags map[string]string

func (*Tags) Scan

func (m *Tags) Scan(value interface{}) error

func (Tags) Value

func (m Tags) Value() (driver.Value, error)

Value Implements valuer

Jump to

Keyboard shortcuts

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