values

package
v0.0.0-...-32af369 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package values provides typical implementations of eskuel.Value marshaller interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool struct{}

Time is an implementation of Column.StringValue for bool.

func (Bool) MarshalString

func (Bool) MarshalString(v eskuel.Value) (string, error)

func (Bool) UnmarshalString

func (Bool) UnmarshalString(s string) (eskuel.Value, error)

func (Bool) Value

func (Bool) Value(b bool) eskuel.Value

type Float64

type Float64 struct{}

Float64 is an implementation of Column.StringValue for float64 floating point number. Floats are stored in the Value.Int field.

func (Float64) MarshalString

func (Float64) MarshalString(v eskuel.Value) (string, error)

func (Float64) UnmarshalString

func (Float64) UnmarshalString(s string) (eskuel.Value, error)

type Int64

type Int64 struct{}

Int64 is an implementation of Column.StringValue for int64 integers. Integers are stored in the Value.Int field.

func (Int64) MarshalString

func (Int64) MarshalString(v eskuel.Value) (string, error)

func (Int64) UnmarshalString

func (Int64) UnmarshalString(s string) (eskuel.Value, error)

type String

type String struct{}

String is an implementation of Column.StringValue for strings. Strings are stored in the Value.String field. They are quoted.

func (String) MarshalString

func (String) MarshalString(v eskuel.Value) (string, error)

func (String) UnmarshalString

func (String) UnmarshalString(s string) (eskuel.Value, error)

type Time

type Time struct{}

Time is an implementation of Column.StringValue for time.Time. The Unix time is stored in the Value.Int field and the timezone location in Value.String (optional).

func (Time) MarshalString

func (Time) MarshalString(v eskuel.Value) (string, error)

func (Time) UnmarshalString

func (Time) UnmarshalString(s string) (eskuel.Value, error)

func (Time) Value

func (Time) Value(t time.Time) eskuel.Value

Jump to

Keyboard shortcuts

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