typex

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Copyright (c) 2018-present Anbillon Team (anbillonteam@gmail.com). This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Package typex implements the Scanner interface and the driver Valuer interface so we can use them in database operation.

Copyright (c) 2018-present Anbillon Team (anbillonteam@gmail.com). This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Package typex implements the Scanner interface and the driver Valuer interface so we can use them in database operation.

Copyright (c) 2018-present Anbillon Team (anbillonteam@gmail.com). This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Package typex implements the Scanner interface and the driver Valuer interface so we can use them in database operation.

Copyright (c) 2018-present Anbillon Team (anbillonteam@gmail.com). This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Package typex implements the Scanner interface and the driver Valuer interface so we can use them in database operation.

Copyright (c) 2018-present Anbillon Team (anbillonteam@gmail.com). This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Package typex implements the Scanner interface and the driver Valuer interface so we can use them in database operation.

Copyright (c) 2018-present Anbillon Team (anbillonteam@gmail.com). This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Package typex implements the Scanner interface and the driver Valuer interface so we can use them in database operation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NullBool

type NullBool struct {
	sql.NullBool
}

NullString wraps sql.NullBool.

func NewNullBool

func NewNullBool(b bool) NullBool

NewNullBool will create a new NullBool.

type NullBytes

type NullBytes struct {
	Bytes []byte
	Valid bool
}

NullTime represents a []byte that may be null. NullBytes implements the sql.Scanner interface so it can be used as a scan destination, similar to sql.NullString.

func NewNullBytes

func NewNullBytes(b []byte) NullBytes

NewNullBytes create a new NullBytes. It will check if the given bytes is valid.

func (*NullBytes) Scan

func (nb *NullBytes) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullBytes) Value

func (nb NullBytes) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullFloat

type NullFloat struct {
	sql.NullFloat64
}

NullFloat wraps sql.NullFloat64.

func NewNullFloat

func NewNullFloat(f float64) NullFloat

NewNullFloat will create a new NullFloat.

type NullInt

type NullInt struct {
	sql.NullInt64
}

NullInt wraps sql.NullInt.

func NewNullInt

func NewNullInt(i int64) NullInt

NewNullInt will create a new NullInt.

type NullString

type NullString struct {
	sql.NullString
}

NullString wraps sql.NullString.

func NewNullString

func NewNullString(s string) NullString

NewNullString will create a new NullString.

type NullTime

type NullTime struct {
	Time  time.Time
	Valid bool // Valid is true if Time is not NULL
}

NullTime represents a time.Time that may be null. NullTime implements the sql.Scanner interface so it can be used as a scan destination, similar to sql.NullString.

func NewNullTime

func NewNullTime(t time.Time) NullTime

NewNullTime create a new NullTime. It will check if the given time is valid.

func (*NullTime) Scan

func (nt *NullTime) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTime) Value

func (nt NullTime) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

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