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: ? 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

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