serie

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Lt = -1
	Eq = 0
	Gt = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interfacer

type Interfacer interface {
	Interface() interface{}
}

Interfacer to convert a value of serie to interface{} Used with serie.Get(at) serie.All()

type NullBool

type NullBool struct {
	Bool  bool
	Valid bool
}

func (NullBool) Interface

func (b NullBool) Interface() interface{}

type NullFloat32

type NullFloat32 struct {
	Float32 float32
	Valid   bool
}

func (NullFloat32) Interface

func (f NullFloat32) Interface() interface{}

type NullFloat64

type NullFloat64 struct {
	Float64 float64
	Valid   bool
}

func (NullFloat64) Interface

func (f NullFloat64) Interface() interface{}

type NullInt

type NullInt struct {
	Int   int
	Valid bool
}

func (NullInt) Interface

func (i NullInt) Interface() interface{}

type NullInt32

type NullInt32 struct {
	Int32 int32
	Valid bool
}

func (NullInt32) Interface

func (i NullInt32) Interface() interface{}

type NullInt64

type NullInt64 struct {
	Int64 int64
	Valid bool
}

func (NullInt64) Interface

func (i NullInt64) Interface() interface{}

type NullString

type NullString struct {
	String string
	Valid  bool
}

func (NullString) Interface

func (s NullString) Interface() interface{}

type NullTime

type NullTime struct {
	Time  time.Time
	Valid bool
}

func (NullTime) Interface

func (t NullTime) Interface() interface{}

type RawValue

type RawValue struct {
	Value interface{}
	Valid bool
}

func (RawValue) Interface

func (r RawValue) Interface() interface{}

func (RawValue) String

func (r RawValue) String() string

type Serie

type Serie interface {
	Type() reflect.Type
	All() []interface{}
	Get(at int) interface{}
	Slice() interface{}

	// Mutate
	Append(v ...interface{})
	Prepend(v ...interface{}) error
	Insert(at int, v ...interface{}) error
	Set(at int, v interface{}) error
	Delete(at int) error
	Grow(size int) error
	Shrink(size int) error
	Concat(serie ...Serie) error
	Clear()

	// Select
	Head(size int) Serie
	Tail(size int) Serie
	Subset(at, size int) Serie
	Filter(where interface{}) (Serie, error)
	Distinct() Serie

	// Copy
	EmptyCopy() Serie
	Copy() Serie

	// Sort
	sort.Interface
	Compare(i, j int) int
	SortAsc()
	SortDesc()
}

func Bool

func Bool(v ...interface{}) Serie

func BoolN

func BoolN(v ...interface{}) Serie

func Float32

func Float32(v ...interface{}) Serie

func Float32N

func Float32N(v ...interface{}) Serie

func Float64

func Float64(v ...interface{}) Serie

func Float64N

func Float64N(v ...interface{}) Serie

func Int

func Int(v ...interface{}) Serie

func Int32

func Int32(v ...interface{}) Serie

func Int32N

func Int32N(v ...interface{}) Serie

func Int64

func Int64(v ...interface{}) Serie

func Int64N

func Int64N(v ...interface{}) Serie

func IntN

func IntN(v ...interface{}) Serie

func New

func New(typ interface{}, converter interface{}, comparer interface{}) (Serie, error)

func Raw

func Raw(v ...interface{}) Serie

func String

func String(v ...interface{}) Serie

String to create a new string serie

func StringN

func StringN(v ...interface{}) Serie

StringN to create a new serie with null value handling

func Time

func Time(v ...interface{}) Serie

func TimeN

func TimeN(v ...interface{}) Serie

Jump to

Keyboard shortcuts

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