NullTime

package module
Version: v0.0.0-...-55e9630 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2017 License: MIT Imports: 1 Imported by: 0

README

NullTime library wercker status Go Report Card GoDoc coverage codebeat badge

NullTime provides a time.Time that may be null.


Copyright (c) 2011-2013, 'pq' Contributors

Portions Copyright (C) 2011 Blake Mizerany

Modified by Kirill Danshin k@guava.by (c) 2016

Documentation

Overview

Package NullTime provides a time.Time that may be null. Copyright (c) 2011-2013, 'pq' Contributors Portions Copyright (C) 2011 Blake Mizerany Modified by Kirill Danshin <k@guava.by> (c) 2016

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NullTime

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

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 (*NullTime) Scan

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

Scan implements the Scanner interface.

func (NullTime) Value

func (nt NullTime) Value() (time.Time, bool, error)

Value returns time value, isValid and error object

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL