Documentation ¶
Overview ¶
Package types provides basic operations with SQL types
Package types provides basic operations with SQL types ¶
Package types provides basic operations with SQL types
Index ¶
- func Int16ToSQL(i int16) sql.NullInt16
- func Int32ToSQL(i int32) sql.NullInt32
- func Int64ToSQL(i int64) sql.NullInt64
- func RefEmptyStringToSQL(str *string) sql.NullString
- func RefInt16ToSQL(i *int16) sql.NullInt16
- func RefInt32ToSQL(i *int32) sql.NullInt32
- func RefInt64ToSQL(i *int64) sql.NullInt64
- func RefStringToSQL(str *string) sql.NullString
- func SQLToRefInt16(i sql.NullInt16) *int16
- func SQLToRefInt32(i sql.NullInt32) *int32
- func SQLToRefInt64(i sql.NullInt64) *int64
- func SQLToRefString(str sql.NullString) *string
- func SQLToString(str sql.NullString) string
- func StrToDateTime(input string) (time.Time, error)
- func StrToDateTimeRef(input string) (*time.Time, error)
- func StrToTime(input string) (time.Time, error)
- func StringToSQL(str string) sql.NullString
- func TimeToStr(time time.Time) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int16ToSQL ¶
Int16ToSQL converts int16 to sql.NullInt16.
func Int32ToSQL ¶
Int32ToSQL converts int32 to sql.NullInt32.
func Int64ToSQL ¶
Int64ToSQL converts int16 to sql.NullInt64.
func RefEmptyStringToSQL ¶
func RefEmptyStringToSQL(str *string) sql.NullString
RefEmptyStringToSQL converts reference on string to sql.NullString with check on empty.
func RefInt16ToSQL ¶
RefInt16ToSQL converts reference on int16 to sql.NullInt16.
func RefInt32ToSQL ¶
RefInt32ToSQL converts reference on int32 to sql.NullInt32.
func RefInt64ToSQL ¶
RefInt64ToSQL converts reference on int64 to sql.NullInt64.
func RefStringToSQL ¶
func RefStringToSQL(str *string) sql.NullString
RefStringToSQL converts reference on string to sql.NullString.
func SQLToRefInt16 ¶
SQLToRefInt16 converts sql.NullInt16 to reference on int16.
func SQLToRefInt32 ¶
SQLToRefInt32 converts sql.NullInt32 to reference on int32.
func SQLToRefInt64 ¶
SQLToRefInt64 converts sql.NullInt64 to reference on int64.
func SQLToRefString ¶
func SQLToRefString(str sql.NullString) *string
SQLToRefString converts sql.NullString to reference on string.
func SQLToString ¶
func SQLToString(str sql.NullString) string
SQLToString converts sql.NullString to string.
func StrToDateTime ¶
StrToDateTime converts string to datetime.
func StrToDateTimeRef ¶
StrToDateTimeRef converts string to reference on datetime.
func StringToSQL ¶
func StringToSQL(str string) sql.NullString
StringToSQL converts string to sql.NullString.
Types ¶
This section is empty.