slices

package
v4.9.4-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2018 License: MIT Imports: 7 Imported by: 0

README

github.com/gobuffalo/pop/slices

This package provides support for datatypes like JSONB in postgres

Installation

$ go get github.com/gobuffalo/pop/slices

Supported Datatypes

  • slices.Map
  • slices.Int
  • slices.Float
  • slices.String
  • slices.UUID

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Float

type Float []float64

Float is a slice of float64.

func (Float) Interface

func (f Float) Interface() interface{}

Interface implements the nulls.nullable interface.

func (*Float) Scan

func (f *Float) Scan(src interface{}) error

Scan implements the sql.Scanner interface. It allows to read the float slice from the database value.

func (*Float) UnmarshalText

func (f *Float) UnmarshalText(text []byte) error

UnmarshalText will unmarshall text value into the float slice representation of this value.

func (Float) Value

func (f Float) Value() (driver.Value, error)

Value implements the driver.Valuer interface. It allows to convert the float slice to a driver.value.

type Int

type Int []int

Int is a slice of int.

func (Int) Interface

func (i Int) Interface() interface{}

Interface implements the nulls.nullable interface.

func (*Int) Scan

func (i *Int) Scan(src interface{}) error

Scan implements the sql.Scanner interface. It allows to read the int slice from the database value.

func (*Int) UnmarshalText

func (i *Int) UnmarshalText(text []byte) error

UnmarshalText will unmarshall text value into the int slice representation of this value.

func (Int) Value

func (i Int) Value() (driver.Value, error)

Value implements the driver.Valuer interface. It allows to convert the int slice to a driver.value.

type Map

type Map map[string]interface{}

Map is a map[string]interface.

func (Map) Interface

func (m Map) Interface() interface{}

Interface implements the nulls.nullable interface.

func (*Map) Scan

func (m *Map) Scan(src interface{}) error

Scan implements the sql.Scanner interface. It allows to read the map from the database value.

func (Map) UnmarshalJSON

func (m Map) UnmarshalJSON(b []byte) error

UnmarshalJSON will unmarshall JSON value into the map representation of this value.

func (Map) UnmarshalText

func (m Map) UnmarshalText(text []byte) error

UnmarshalText will unmarshall text value into the map representation of this value.

func (Map) Value

func (m Map) Value() (driver.Value, error)

Value implements the driver.Valuer interface. It allows to convert the map to a driver.value.

type String

type String []string

String is a slice of strings.

func (String) Format

func (s String) Format(sep string) string

Format presents the slice as a string, using a given separator.

func (String) Interface

func (s String) Interface() interface{}

Interface implements the nulls.nullable interface.

func (*String) Scan

func (s *String) Scan(src interface{}) error

Scan implements the sql.Scanner interface. It allows to read the string slice from the database value.

func (String) TagValue

func (s String) TagValue() string

TagValue implements the tagValuer interface, to work with https://github.com/gobuffalo/tags.

func (*String) UnmarshalJSON

func (s *String) UnmarshalJSON(data []byte) error

UnmarshalJSON will unmarshall JSON value into the string slice representation of this value.

func (*String) UnmarshalText

func (s *String) UnmarshalText(text []byte) error

UnmarshalText will unmarshall text value into the string slice representation of this value.

func (String) Value

func (s String) Value() (driver.Value, error)

Value implements the driver.Valuer interface. It allows to convert the string slice to a driver.value.

type UUID

type UUID []uuid.UUID

UUID is a slice of UUIDs.

func (UUID) Format

func (s UUID) Format(sep string) string

Format presents the slice as a string, using a given separator.

func (UUID) Interface

func (s UUID) Interface() interface{}

Interface implements the nulls.nullable interface.

func (*UUID) Scan

func (s *UUID) Scan(src interface{}) error

Scan implements the sql.Scanner interface. It allows to read the UUID slice from the database value.

func (UUID) TagValue

func (s UUID) TagValue() string

TagValue implements the tagValuer interface, to work with https://github.com/gobuffalo/tags.

func (*UUID) UnmarshalJSON

func (s *UUID) UnmarshalJSON(data []byte) error

UnmarshalJSON will unmarshall JSON value into the UUID slice representation of this value.

func (*UUID) UnmarshalText

func (s *UUID) UnmarshalText(text []byte) error

UnmarshalText will unmarshall text value into the UUID slice representation of this value.

func (UUID) Value

func (s UUID) Value() (driver.Value, error)

Value implements the driver.Valuer interface. It allows to convert the UUID slice to a driver.value.

Jump to

Keyboard shortcuts

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