sql

package
v0.0.0-...-fe78ce7 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidBase64BytesValue = errors.New("Invalid value for Base64Bytes")
)

Functions

func IntArrayScan

func IntArrayScan(src interface{}, dst IntArrayScanner) error

func IntArrayValue

func IntArrayValue(s IntArrayValuer) (driver.Value, error)

func NullTimeEqual

func NullTimeEqual(left, right sql.NullTime) bool

func NullTimeFromUnixJSON

func NullTimeFromUnixJSON(jt *nsjson.UnixTime) sql.NullTime

func NullTimeProto

func NullTimeProto(t sql.NullTime) (*pbts.Timestamp, error)

NullTimeProto converts a NullTime into a protobuf Timestamp.

Returns nil with nil error if the given NullTime is invalid.

func NullTimeUnix

func NullTimeUnix(sec int64) sql.NullTime

Types

type AbilityIDs

type AbilityIDs []nspb.AbilityID

func NewAbilityIDs

func NewAbilityIDs(ids []uint32) AbilityIDs

func (*AbilityIDs) Scan

func (s *AbilityIDs) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (*AbilityIDs) SetInt64s

func (s *AbilityIDs) SetInt64s(arr []int64)

func (AbilityIDs) ToInt64s

func (s AbilityIDs) ToInt64s() []int64

func (AbilityIDs) Value

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

Value implements the driver.Valuer interface.

type AccountIDs

type AccountIDs []nspb.AccountID

func NewAccountIDs

func NewAccountIDs(ids []uint32) AccountIDs

func (*AccountIDs) Scan

func (s *AccountIDs) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (*AccountIDs) SetInt64s

func (s *AccountIDs) SetInt64s(arr []int64)

func (AccountIDs) ToInt64s

func (s AccountIDs) ToInt64s() []int64

func (AccountIDs) Value

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

Value implements the driver.Valuer interface.

type Base64Bytes

type Base64Bytes []byte

func (*Base64Bytes) Scan

func (b *Base64Bytes) Scan(v interface{}) error

func (Base64Bytes) Value

func (b Base64Bytes) Value() (driver.Value, error)

type HeroRoles

type HeroRoles []nspb.HeroRole

func (*HeroRoles) Scan

func (s *HeroRoles) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (*HeroRoles) SetInt64s

func (s *HeroRoles) SetInt64s(arr []int64)

func (HeroRoles) ToInt64s

func (s HeroRoles) ToInt64s() []int64

func (*HeroRoles) Value

func (s *HeroRoles) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type IntArrayScanner

type IntArrayScanner interface {
	SetInt64s([]int64)
}

type IntArrayValuer

type IntArrayValuer interface {
	ToInt64s() []int64
}

type ItemIDs

type ItemIDs []nspb.ItemID

func NewItemIDsFromUint32s

func NewItemIDsFromUint32s(ids []uint32) ItemIDs

func (*ItemIDs) Scan

func (s *ItemIDs) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (*ItemIDs) SetInt64s

func (s *ItemIDs) SetInt64s(arr []int64)

func (ItemIDs) ToInt64s

func (s ItemIDs) ToInt64s() []int64

func (ItemIDs) ToUint64s

func (s ItemIDs) ToUint64s() []uint64

func (ItemIDs) Value

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

Value implements the driver.Valuer interface.

Jump to

Keyboard shortcuts

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