sqltypes

package module
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: MIT Imports: 8 Imported by: 0

README

sqltypes

Go Reference

SQL advanced types.

Install

go get github.com/altipla-consulting/sqltypes

Contributing

You can make pull requests or create issues in GitHub. Any code you send should be formatted using make gofmt.

License

MIT License

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotExist = errors.New("sqltypes: not exist")

Functions

This section is empty.

Types

type Array deprecated

type Array[T any] []T

Deprecated: use JSONArray instead.

func (*Array[T]) Scan

func (arr *Array[T]) Scan(value interface{}) error

func (Array[T]) Unwrap

func (arr Array[T]) Unwrap() []T

func (Array[T]) Value

func (arr Array[T]) Value() (driver.Value, error)

type Date added in v0.3.0

type Date struct {
	// contains filtered or unexported fields
}

func NewDate added in v0.3.1

func NewDate(val civil.Date) Date

func (Date) Date added in v0.3.0

func (d Date) Date() civil.Date

func (*Date) Scan added in v0.3.0

func (d *Date) Scan(value interface{}) error

func (Date) String added in v0.3.0

func (d Date) String() string

func (Date) Value added in v0.3.0

func (d Date) Value() (driver.Value, error)

type JSON added in v0.3.4

type JSON[T any] struct {
	V *T
}

func NewJSON added in v0.3.4

func NewJSON[T any](val *T) JSON[T]

func (*JSON[T]) Scan added in v0.3.4

func (s *JSON[T]) Scan(value interface{}) error

func (JSON[T]) Value added in v0.3.4

func (s JSON[T]) Value() (driver.Value, error)

type JSONArray added in v0.3.4

type JSONArray[T any] []T

func (*JSONArray[T]) Scan added in v0.3.4

func (arr *JSONArray[T]) Scan(value interface{}) error

func (JSONArray[T]) Unwrap added in v0.4.1

func (arr JSONArray[T]) Unwrap() []T

func (JSONArray[T]) Value added in v0.3.4

func (arr JSONArray[T]) Value() (driver.Value, error)

type Proto added in v0.6.0

type Proto[M proto.Message] struct {
	V M
}

func NewProto added in v0.6.0

func NewProto[M proto.Message](val M) Proto[M]

func (*Proto[M]) Scan added in v0.6.0

func (s *Proto[M]) Scan(value interface{}) error

func (Proto[M]) Value added in v0.6.0

func (s Proto[M]) Value() (driver.Value, error)

type Struct deprecated added in v0.2.0

type Struct[T any] struct {
	V *T
}

Deprecated: use JSON instead.

func NewStruct added in v0.2.0

func NewStruct[T any](val *T) Struct[T]

func (*Struct[T]) Get added in v0.2.0

func (s *Struct[T]) Get() *T

func (*Struct[T]) Scan added in v0.2.0

func (s *Struct[T]) Scan(value interface{}) error

func (*Struct[T]) Set added in v0.2.0

func (s *Struct[T]) Set(val *T)

func (Struct[T]) Value added in v0.2.0

func (s Struct[T]) Value() (driver.Value, error)

type Timestamp

type Timestamp time.Time

func (*Timestamp) Scan

func (t *Timestamp) Scan(value interface{}) error

func (Timestamp) Time

func (t Timestamp) Time() time.Time

func (Timestamp) Value

func (t Timestamp) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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