Documentation ¶
Index ¶
- Variables
- func JSONScan(dbValue interface{}, value interface{}) error
- func JSONValue(value interface{}) (driver.Value, error)
- type Bool
- type Datetime
- func (Datetime) DataType(e string) string
- func (dt Datetime) Format(layout string) string
- func (dt Datetime) In(loc *time.Location) Datetime
- func (dt Datetime) IsZero() bool
- func (dt Datetime) MarshalText() ([]byte, error)
- func (dt *Datetime) Scan(value interface{}) error
- func (dt Datetime) String() string
- func (dt Datetime) Unix() int64
- func (dt *Datetime) UnmarshalText(data []byte) (err error)
- func (dt Datetime) Value() (driver.Value, error)
- type MySQLDatetime
- type MySQLTimestamp
- type PgTimestampTz
- func (p *PgTimestampTz) DataType(driverName string) string
- func (p *PgTimestampTz) Format(layout string) string
- func (p *PgTimestampTz) IsZero() bool
- func (p *PgTimestampTz) MarshalText() (text []byte, err error)
- func (p *PgTimestampTz) Scan(value any) error
- func (p *PgTimestampTz) String() string
- func (p *PgTimestampTz) Unix() int64
- func (p *PgTimestampTz) UnmarshalText(text []byte) (err error)
- func (p *PgTimestampTz) Value() (driver.Value, error)
- type Timestamp
- func (Timestamp) DataType(engine string) string
- func (dt Timestamp) Format(layout string) string
- func (dt Timestamp) In(loc *time.Location) Timestamp
- func (dt Timestamp) IsZero() bool
- func (dt Timestamp) MarshalText() ([]byte, error)
- func (dt *Timestamp) Scan(value interface{}) error
- func (dt Timestamp) String() string
- func (dt Timestamp) Unix() int64
- func (dt *Timestamp) UnmarshalText(data []byte) (err error)
- func (dt Timestamp) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TimestampTzZero = PgTimestampTz(time.Time{}) TimestampTzUnixZero = PgTimestampTz(time.Unix(0, 0)) )
View Source
var ( UTC = time.UTC CST = time.FixedZone("CST", 8*60*60) TimestampZero = Timestamp(time.Time{}) TimestampUnixZero = Timestamp(time.Unix(0, 0)) )
View Source
var (
DatetimeZero = Datetime(time.Time{})
)
Functions ¶
Types ¶
type Bool ¶
type Bool int
openapi:type boolean
func (Bool) MarshalJSON ¶
func (Bool) MarshalText ¶
func (Bool) OpenAPISchemaType ¶
func (*Bool) UnmarshalJSON ¶
func (*Bool) UnmarshalText ¶
type Datetime ¶
openapi:strfmt date-time
func ParseDatetimeFromString ¶
func (Datetime) MarshalText ¶
func (*Datetime) UnmarshalText ¶
type MySQLDatetime ¶
type MySQLDatetime = Datetime
type MySQLTimestamp ¶
type MySQLTimestamp = Timestamp
type PgTimestampTz ¶ added in v1.0.2
func ParseTimestampTzFromString ¶ added in v1.0.2
func ParseTimestampTzFromString(s string) (dt PgTimestampTz, err error)
func (*PgTimestampTz) DataType ¶ added in v1.0.2
func (p *PgTimestampTz) DataType(driverName string) string
func (*PgTimestampTz) Format ¶ added in v1.0.2
func (p *PgTimestampTz) Format(layout string) string
func (*PgTimestampTz) IsZero ¶ added in v1.0.2
func (p *PgTimestampTz) IsZero() bool
func (*PgTimestampTz) MarshalText ¶ added in v1.0.2
func (p *PgTimestampTz) MarshalText() (text []byte, err error)
func (*PgTimestampTz) Scan ¶ added in v1.0.2
func (p *PgTimestampTz) Scan(value any) error
func (*PgTimestampTz) String ¶ added in v1.0.2
func (p *PgTimestampTz) String() string
func (*PgTimestampTz) Unix ¶ added in v1.0.2
func (p *PgTimestampTz) Unix() int64
func (*PgTimestampTz) UnmarshalText ¶ added in v1.0.2
func (p *PgTimestampTz) UnmarshalText(text []byte) (err error)
type Timestamp ¶
openapi:strfmt date-time
func (Timestamp) MarshalText ¶
func (*Timestamp) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.