sqltypes

package module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 6 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

type Array[T any] []T

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 Struct added in v0.2.0

type Struct[T any] struct {
	// contains filtered or unexported fields
}

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