Documentation
¶
Index ¶
- func Arr2Pg(arr []bool) pgtype.BoolArray
- func Arr2Pg16(arr []int16) pgtype.Int2Array
- func Arr2Pg32(arr []int32) pgtype.Int4Array
- func Arr2Pg64(arr []int64) pgtype.Int8Array
- func NewBool(b bool) *bool
- func NewInt[T constraints.Integer](i T) *int
- func NewInt16[T constraints.Integer](i T) *int16
- func NewInt32[T constraints.Integer](i T) *int32
- func NewInt64[T constraints.Integer](i T) *int64
- func NewInt8[T constraints.Integer](i T) *int8
- func NewString(i string) *string
- func Pg2Arr(v pgtype.BoolArray) []bool
- func Pg2Arr16(v pgtype.Int2Array) []int16
- func Pg2Arr32(v pgtype.Int4Array) []int32
- func Pg2Arr64(v pgtype.Int8Array) []int64
- func V4() uuid.UUID
- func V4p() *uuid.UUID
- type Array
- type AutoDateTime
- type Date
- func (t Date) Add(d *DurationOption) Date
- func (d Date) AddTime(t Time) DateTime
- func (t Date) After(d Date) bool
- func (t Date) Before(d Date) bool
- func (t Date) MarshalJSON() ([]byte, error)
- func (t *Date) Scan(v any) error
- func (t Date) ToDateTime() DateTime
- func (t Date) ToDateTimeP() *DateTime
- func (t Date) ToGoTime() time.Time
- func (t Date) ToString() string
- func (t *Date) UnmarshalJSON(data []byte) error
- func (t Date) Value() (driver.Value, error)
- type DateList
- type DateTime
- func (t DateTime) Add(d *DurationOption) DateTime
- func (t DateTime) MarshalJSON() ([]byte, error)
- func (t *DateTime) Scan(v any) error
- func (t DateTime) ToDate() Date
- func (t DateTime) ToDateP() *Date
- func (t DateTime) ToGoTime() time.Time
- func (t DateTime) ToString() string
- func (t *DateTime) UnmarshalJSON(data []byte) error
- func (t DateTime) Value() (driver.Value, error)
- type DateTimeList
- type DecimalList
- type DurationOption
- func (d *DurationOption) Day(day int) *DurationOption
- func (d *DurationOption) Hour(hour int) *DurationOption
- func (d *DurationOption) Min(min int) *DurationOption
- func (d *DurationOption) Month(month int) *DurationOption
- func (d *DurationOption) Nsec(nsec int) *DurationOption
- func (d *DurationOption) Sec(sec int) *DurationOption
- func (d *DurationOption) Year(year int) *DurationOption
- type Fields
- type IntList
- type StringList
- type Time
- func (t Time) Add(d *DurationOption) Time
- func (t Time) AddData(d Date) DateTime
- func (t Time) MarshalJSON() ([]byte, error)
- func (t *Time) Scan(v any) error
- func (t Time) ToDateTime() DateTime
- func (t Time) ToDateTimeP() *DateTime
- func (t Time) ToGoTime() time.Time
- func (t Time) ToString() string
- func (t *Time) UnmarshalJSON(data []byte) error
- func (t Time) Value() (driver.Value, error)
- type TimeList
- type UUID
- type UUIDList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInt ¶
func NewInt[T constraints.Integer](i T) *int
func NewInt16 ¶
func NewInt16[T constraints.Integer](i T) *int16
func NewInt32 ¶
func NewInt32[T constraints.Integer](i T) *int32
func NewInt64 ¶
func NewInt64[T constraints.Integer](i T) *int64
func NewInt8 ¶
func NewInt8[T constraints.Integer](i T) *int8
Types ¶
type AutoDateTime ¶
datetime
func (AutoDateTime) MarshalJSON ¶
func (t AutoDateTime) MarshalJSON() ([]byte, error)
func (*AutoDateTime) UnmarshalJSON ¶
func (t *AutoDateTime) UnmarshalJSON(data []byte) error
type Date ¶
date
func DatePOfYmd ¶
func (Date) Add ¶
func (t Date) Add(d *DurationOption) Date
func (Date) MarshalJSON ¶
func (Date) ToDateTime ¶
func (Date) ToDateTimeP ¶
func (*Date) UnmarshalJSON ¶
type DateTime ¶
datetime
func NowDateTime ¶
func NowDateTime() DateTime
func NowDateTimeP ¶
func NowDateTimeP() *DateTime
func (DateTime) Add ¶
func (t DateTime) Add(d *DurationOption) DateTime
func (DateTime) MarshalJSON ¶
func (*DateTime) UnmarshalJSON ¶
type DateTimeList ¶
type DateTimeList []DateTime
type DecimalList ¶
type DurationOption ¶
type DurationOption struct {
// contains filtered or unexported fields
}
func Duration ¶
func Duration() *DurationOption
func (*DurationOption) Day ¶
func (d *DurationOption) Day(day int) *DurationOption
func (*DurationOption) Hour ¶
func (d *DurationOption) Hour(hour int) *DurationOption
func (*DurationOption) Min ¶
func (d *DurationOption) Min(min int) *DurationOption
func (*DurationOption) Month ¶
func (d *DurationOption) Month(month int) *DurationOption
func (*DurationOption) Nsec ¶
func (d *DurationOption) Nsec(nsec int) *DurationOption
func (*DurationOption) Sec ¶
func (d *DurationOption) Sec(sec int) *DurationOption
func (*DurationOption) Year ¶
func (d *DurationOption) Year(year int) *DurationOption
type Time ¶
func TimePOfHms ¶
func (Time) Add ¶
func (t Time) Add(d *DurationOption) Time
func (Time) MarshalJSON ¶
func (Time) ToDateTime ¶
func (Time) ToDateTimeP ¶
func (*Time) UnmarshalJSON ¶
type UUID ¶
func Str2UUIDMust ¶
func Str2UUIDMustP ¶
func (UUID) MarshalJSON ¶
func (*UUID) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.