ttypes

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 6 Imported by: 5

Documentation

Overview

Package ttypes,A quickly mysql access component.

Copyright 2023 The daog Authors. All rights reserved.

Package ttypes,A quickly mysql access component.

Copyright 2023 The daog Authors. All rights reserved.

Package ttypes,A quickly mysql access component.

Copyright 2023 The daog Authors. All rights reserved.

Package ttypes,A quickly mysql access component.

Copyright 2023 The daog Authors. All rights reserved.

Index

Constants

This section is empty.

Variables

View Source
var (
	DateFormat = "2006-01-02"
)
View Source
var (
	DatetimeFormat = "2006-01-02 15:04:05"
)

Functions

This section is empty.

Types

type NilableDate

type NilableDate struct {
	sql.NullTime
}

func FromDate

func FromDate(d time.Time) *NilableDate

func (NilableDate) MarshalJSON

func (d NilableDate) MarshalJSON() ([]byte, error)

func (NilableDate) String

func (ndt NilableDate) String() string

func (*NilableDate) UnmarshalJSON

func (d *NilableDate) UnmarshalJSON(b []byte) error

type NilableDatetime

type NilableDatetime struct {
	sql.NullTime
}

func FromDatetime

func FromDatetime(d time.Time) *NilableDatetime

func (NilableDatetime) MarshalJSON

func (s NilableDatetime) MarshalJSON() ([]byte, error)

func (NilableDatetime) String

func (ndt NilableDatetime) String() string

func (*NilableDatetime) UnmarshalJSON

func (s *NilableDatetime) UnmarshalJSON(b []byte) error

type NilableString

type NilableString struct {
	sql.NullString
}

func FromString

func FromString(s string) *NilableString

func (NilableString) MarshalJSON

func (s NilableString) MarshalJSON() ([]byte, error)

func (*NilableString) StringNilAsDefault

func (s *NilableString) StringNilAsDefault(def string) string

func (*NilableString) StringNilAsEmpty

func (s *NilableString) StringNilAsEmpty() string

func (*NilableString) UnmarshalJSON

func (s *NilableString) UnmarshalJSON(b []byte) error

type NormalDate

type NormalDate time.Time

func (NormalDate) MarshalJSON

func (ndt NormalDate) MarshalJSON() ([]byte, error)

func (NormalDate) String

func (ndt NormalDate) String() string

func (*NormalDate) UnmarshalJSON

func (ndt *NormalDate) UnmarshalJSON(b []byte) error

func (NormalDate) Value

func (ndt NormalDate) Value() (driver.Value, error)

type NormalDatetime

type NormalDatetime time.Time

func (NormalDatetime) MarshalJSON

func (ndt NormalDatetime) MarshalJSON() ([]byte, error)

func (NormalDatetime) String

func (ndt NormalDatetime) String() string

func (*NormalDatetime) UnmarshalJSON

func (ndt *NormalDatetime) UnmarshalJSON(b []byte) error

func (NormalDatetime) Value

func (ndt NormalDatetime) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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