list

package
v0.24.8 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: BSD-3-Clause Imports: 18 Imported by: 1

Documentation

Overview

List queries, transformations, etc. Lists are a series of zero or more values, all of the same fundamental type. There can be lists of numbers, text, or records. Lists of boolean values are not supported. The first value of a list is at index 1 (one).

Index

Constants

This section is empty.

Variables

View Source
var Z_Types = typeinfo.TypeSet{
	Name: "list",
	Comment: []string{
		"List queries, transformations, etc.",
		"Lists are a series of zero or more values, all of the same fundamental type.",
		"There can be lists of numbers, text, or records.",
		"Lists of boolean values are not supported.",
		"The first value of a list is at index 1 (one).",
	},

	Flow:       z_flow_list,
	Signatures: z_signatures,
}

package listing of type data

View Source
var Zt_ListEmpty typeinfo.Flow

list_empty, a type of flow.

View Source
var Zt_ListErase typeinfo.Flow

list_erase, a type of flow.

View Source
var Zt_ListErasing typeinfo.Flow

list_erasing, a type of flow.

View Source
var Zt_ListFind typeinfo.Flow

list_find, a type of flow.

View Source
var Zt_ListLength typeinfo.Flow

list_length, a type of flow.

View Source
var Zt_ListMap typeinfo.Flow

list_map, a type of flow.

View Source
var Zt_ListNumAt typeinfo.Flow

list_num_at, a type of flow.

View Source
var Zt_ListPopNum typeinfo.Flow

list_pop_num, a type of flow.

View Source
var Zt_ListPopRecord typeinfo.Flow

list_pop_record, a type of flow.

View Source
var Zt_ListPopText typeinfo.Flow

list_pop_text, a type of flow.

View Source
var Zt_ListPopping typeinfo.Flow

list_popping, a type of flow.

View Source
var Zt_ListPush typeinfo.Flow

list_push, a type of flow.

View Source
var Zt_ListReduce typeinfo.Flow

list_reduce, a type of flow.

View Source
var Zt_ListRepeat typeinfo.Flow

list_repeat, a type of flow.

View Source
var Zt_ListReverse typeinfo.Flow

list_reverse, a type of flow.

View Source
var Zt_ListSlice typeinfo.Flow

list_slice, a type of flow.

View Source
var Zt_ListSort typeinfo.Flow

list_sort, a type of flow.

View Source
var Zt_ListSplice typeinfo.Flow

list_splice, a type of flow.

View Source
var Zt_ListTextAt typeinfo.Flow

list_text_at, a type of flow.

View Source
var Zt_MakeNumList typeinfo.Flow

make_num_list, a type of flow.

View Source
var Zt_MakeRecordList typeinfo.Flow

make_record_list, a type of flow.

View Source
var Zt_MakeTextList typeinfo.Flow

make_text_list, a type of flow.

View Source
var Zt_Range typeinfo.Flow

range, a type of flow.

Functions

func FilterByPattern added in v0.24.8

func FilterByPattern(run rt.Runtime, vs rt.Value, name string) (err error)

reduce the passed list in place. removes any elements which don't return true for the passed pattern. doesn't validate that vs is a list

func IsAppendable

func IsAppendable(v, els rt.Value) (okay bool)

can v be appended to els? this is similar to IsInsertable, except that v can itself be a list.

func IsInsertable

func IsInsertable(v, els rt.Value) (okay bool)

can v be inserted into els?

func Register added in v0.24.7

func Register(reg func(any))

gob like registration

Types

type ListEmpty added in v0.24.6

type ListEmpty struct {
	List   rtti.Assignment
	Markup map[string]any `json:",omitempty"`
}

Determine if the length of the list is zero.

func (*ListEmpty) GetBool added in v0.24.6

func (op *ListEmpty) GetBool(run rt.Runtime) (ret rt.Value, err error)

func (*ListEmpty) GetMarkup added in v0.24.6

func (op *ListEmpty) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListEmpty) TypeInfo added in v0.24.6

func (*ListEmpty) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListEmpty_Slice added in v0.24.6

type ListEmpty_Slice []ListEmpty

Holds a slice of type ListEmpty.

func (*ListEmpty_Slice) Repeats added in v0.24.6

func (op *ListEmpty_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListEmpty.

func (*ListEmpty_Slice) TypeInfo added in v0.24.6

func (*ListEmpty_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListEmpty.

type ListErase added in v0.24.6

type ListErase struct {
	Target rtti.Address
	Start  rtti.NumEval
	Count  rtti.NumEval
	Markup map[string]any `json:",omitempty"`
}

Remove one or more values from a list.

func (*ListErase) Execute added in v0.24.6

func (op *ListErase) Execute(run rt.Runtime) (err error)

func (*ListErase) GetMarkup added in v0.24.6

func (op *ListErase) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListErase) TypeInfo added in v0.24.6

func (*ListErase) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListErase_Slice added in v0.24.6

type ListErase_Slice []ListErase

Holds a slice of type ListErase.

func (*ListErase_Slice) Repeats added in v0.24.6

func (op *ListErase_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListErase.

func (*ListErase_Slice) TypeInfo added in v0.24.6

func (*ListErase_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListErase.

type ListErasing added in v0.24.6

type ListErasing struct {
	Target rtti.Address
	Start  rtti.NumEval
	Count  rtti.NumEval
	As     string
	Exe    []rtti.Execute
	Else   logic.Brancher
	Markup map[string]any `json:",omitempty"`
}

Remove a number of values from a list starting at a specified index. Run a series of statements, giving them a new local variable containing a list of removed values.

func (*ListErasing) Execute added in v0.24.6

func (op *ListErasing) Execute(run rt.Runtime) (err error)

func (*ListErasing) GetMarkup added in v0.24.6

func (op *ListErasing) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListErasing) TypeInfo added in v0.24.6

func (*ListErasing) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListErasing_Slice added in v0.24.6

type ListErasing_Slice []ListErasing

Holds a slice of type ListErasing.

func (*ListErasing_Slice) Repeats added in v0.24.6

func (op *ListErasing_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListErasing.

func (*ListErasing_Slice) TypeInfo added in v0.24.6

func (*ListErasing_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListErasing.

type ListFind

type ListFind struct {
	List   rtti.Assignment
	Value  rtti.Assignment
	Markup map[string]any `json:",omitempty"`
}

Search a list for a specific value.

The rt.NumEval version returns the index of the value in the list.

func (*ListFind) GetBool

func (op *ListFind) GetBool(run rt.Runtime) (ret rt.Value, err error)

return true if the value exists in the list

func (*ListFind) GetMarkup

func (op *ListFind) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListFind) GetNum added in v0.24.6

func (op *ListFind) GetNum(run rt.Runtime) (ret rt.Value, err error)

returns 1 based index of the value in the list

func (*ListFind) TypeInfo

func (*ListFind) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListFind_Slice

type ListFind_Slice []ListFind

Holds a slice of type ListFind.

func (*ListFind_Slice) Repeats

func (op *ListFind_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListFind.

func (*ListFind_Slice) TypeInfo

func (*ListFind_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListFind.

type ListLength added in v0.24.6

type ListLength struct {
	List   rtti.Assignment
	Markup map[string]any `json:",omitempty"`
}

Determine the number of values in a list.

func (*ListLength) GetMarkup added in v0.24.6

func (op *ListLength) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListLength) GetNum added in v0.24.6

func (op *ListLength) GetNum(run rt.Runtime) (ret rt.Value, err error)

func (*ListLength) TypeInfo added in v0.24.6

func (*ListLength) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListLength_Slice added in v0.24.6

type ListLength_Slice []ListLength

Holds a slice of type ListLength.

func (*ListLength_Slice) Repeats added in v0.24.6

func (op *ListLength_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListLength.

func (*ListLength_Slice) TypeInfo added in v0.24.6

func (*ListLength_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListLength.

type ListMap

type ListMap struct {
	Target      rtti.Address
	PatternName string
	List        rtti.Assignment
	Markup      map[string]any `json:",omitempty"`
}

Transform the values from one list and append the results to another. The designated pattern is called with each value, one value at a time.

func (*ListMap) Execute

func (op *ListMap) Execute(run rt.Runtime) (err error)

func (*ListMap) GetMarkup

func (op *ListMap) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListMap) TypeInfo

func (*ListMap) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListMap_Slice

type ListMap_Slice []ListMap

Holds a slice of type ListMap.

func (*ListMap_Slice) Repeats

func (op *ListMap_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListMap.

func (*ListMap_Slice) TypeInfo

func (*ListMap_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListMap.

type ListNumAt added in v0.24.8

type ListNumAt struct {
	List   rtti.NumListEval
	Index  rtti.NumEval
	Markup map[string]any `json:",omitempty"`
}

Read a number from a list of numbers.

func (*ListNumAt) GetMarkup added in v0.24.8

func (op *ListNumAt) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListNumAt) GetNum added in v0.24.8

func (op *ListNumAt) GetNum(run rt.Runtime) (ret rt.Value, err error)

func (*ListNumAt) TypeInfo added in v0.24.8

func (*ListNumAt) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListNumAt_Slice added in v0.24.8

type ListNumAt_Slice []ListNumAt

Holds a slice of type ListNumAt.

func (*ListNumAt_Slice) Repeats added in v0.24.8

func (op *ListNumAt_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListNumAt.

func (*ListNumAt_Slice) TypeInfo added in v0.24.8

func (*ListNumAt_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListNumAt.

type ListPopNum added in v0.24.8

type ListPopNum struct {
	Target rtti.Address
	Edge   rtti.BoolEval
	Markup map[string]any `json:",omitempty"`
}

Remove a num value from the end ( or the start ) of a list.

func (*ListPopNum) Execute added in v0.24.8

func (op *ListPopNum) Execute(run rt.Runtime) error

func (*ListPopNum) GetMarkup added in v0.24.8

func (op *ListPopNum) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListPopNum) GetNum added in v0.24.8

func (op *ListPopNum) GetNum(run rt.Runtime) (rt.Value, error)

func (*ListPopNum) TypeInfo added in v0.24.8

func (*ListPopNum) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListPopNum_Slice added in v0.24.8

type ListPopNum_Slice []ListPopNum

Holds a slice of type ListPopNum.

func (*ListPopNum_Slice) Repeats added in v0.24.8

func (op *ListPopNum_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListPopNum.

func (*ListPopNum_Slice) TypeInfo added in v0.24.8

func (*ListPopNum_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListPopNum.

type ListPopRecord added in v0.24.8

type ListPopRecord struct {
	Target rtti.Address
	Edge   rtti.BoolEval
	Markup map[string]any `json:",omitempty"`
}

Remove a record value from the end ( or the start ) of a list.

func (*ListPopRecord) Execute added in v0.24.8

func (op *ListPopRecord) Execute(run rt.Runtime) error

func (*ListPopRecord) GetMarkup added in v0.24.8

func (op *ListPopRecord) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListPopRecord) GetRecord added in v0.24.8

func (op *ListPopRecord) GetRecord(run rt.Runtime) (rt.Value, error)

func (*ListPopRecord) TypeInfo added in v0.24.8

func (*ListPopRecord) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListPopRecord_Slice added in v0.24.8

type ListPopRecord_Slice []ListPopRecord

Holds a slice of type ListPopRecord.

func (*ListPopRecord_Slice) Repeats added in v0.24.8

func (op *ListPopRecord_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListPopRecord.

func (*ListPopRecord_Slice) TypeInfo added in v0.24.8

func (*ListPopRecord_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListPopRecord.

type ListPopText added in v0.24.8

type ListPopText struct {
	Target rtti.Address
	Edge   rtti.BoolEval
	Markup map[string]any `json:",omitempty"`
}

Remove a text value from the end ( or the start ) of a list.

func (*ListPopText) Execute added in v0.24.8

func (op *ListPopText) Execute(run rt.Runtime) error

func (*ListPopText) GetMarkup added in v0.24.8

func (op *ListPopText) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListPopText) GetText added in v0.24.8

func (op *ListPopText) GetText(run rt.Runtime) (rt.Value, error)

func (*ListPopText) TypeInfo added in v0.24.8

func (*ListPopText) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListPopText_Slice added in v0.24.8

type ListPopText_Slice []ListPopText

Holds a slice of type ListPopText.

func (*ListPopText_Slice) Repeats added in v0.24.8

func (op *ListPopText_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListPopText.

func (*ListPopText_Slice) TypeInfo added in v0.24.8

func (*ListPopText_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListPopText.

type ListPopping added in v0.24.6

type ListPopping struct {
	Target rtti.Address
	Edge   rtti.BoolEval
	As     string
	Exe    []rtti.Execute
	Else   logic.Brancher
	Markup map[string]any `json:",omitempty"`
}

Remove a value from the end ( or the start ) of a list. Run a series of statements, giving them a new local variable containing the removed value.

func (*ListPopping) Execute added in v0.24.6

func (op *ListPopping) Execute(run rt.Runtime) (err error)

func (*ListPopping) GetMarkup added in v0.24.6

func (op *ListPopping) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListPopping) TypeInfo added in v0.24.6

func (*ListPopping) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListPopping_Slice added in v0.24.6

type ListPopping_Slice []ListPopping

Holds a slice of type ListPopping.

func (*ListPopping_Slice) Repeats added in v0.24.6

func (op *ListPopping_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListPopping.

func (*ListPopping_Slice) TypeInfo added in v0.24.6

func (*ListPopping_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListPopping.

type ListPush

type ListPush struct {
	Target rtti.Address
	Value  rtti.Assignment
	Edge   rtti.BoolEval
	Markup map[string]any `json:",omitempty"`
}

Add a value to the end ( or the beginning ) of a list.

func (*ListPush) Execute

func (op *ListPush) Execute(run rt.Runtime) (err error)

func (*ListPush) GetMarkup

func (op *ListPush) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListPush) TypeInfo

func (*ListPush) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListPush_Slice

type ListPush_Slice []ListPush

Holds a slice of type ListPush.

func (*ListPush_Slice) Repeats

func (op *ListPush_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListPush.

func (*ListPush_Slice) TypeInfo

func (*ListPush_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListPush.

type ListReduce

type ListReduce struct {
	Target      rtti.Address
	PatternName string
	List        rtti.Assignment
	Markup      map[string]any `json:",omitempty"`
}

Pack the values of a list down into a single value. The designated pattern is called with a pair of parameters for each value in the list:

  1. the current value from the list;
  2. the value being packed.

The pattern is expected to combine the two parameters and return the newly updated value.

func (*ListReduce) Execute

func (op *ListReduce) Execute(run rt.Runtime) (err error)

func (*ListReduce) GetMarkup

func (op *ListReduce) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListReduce) TypeInfo

func (*ListReduce) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListReduce_Slice

type ListReduce_Slice []ListReduce

Holds a slice of type ListReduce.

func (*ListReduce_Slice) Repeats

func (op *ListReduce_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListReduce.

func (*ListReduce_Slice) TypeInfo

func (*ListReduce_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListReduce.

type ListRepeat added in v0.24.6

type ListRepeat struct {
	List   rtti.Assignment
	As     string
	Exe    []rtti.Execute
	Else   logic.Brancher
	Markup map[string]any `json:",omitempty"`
}

Run a series of statements for each value in a list. Several local variables are available to those statements:

  1. the value in the list, named as specified.
  2. "index", the one-based index of the current value in the list.
  3. "first", a boolean indicating if this is the first value
  4. "last", a boolean indicating if this is the last value.

If the list was empty, this runs the else branch instead.

func (*ListRepeat) Execute added in v0.24.6

func (op *ListRepeat) Execute(run rt.Runtime) (err error)

func (*ListRepeat) GetMarkup added in v0.24.6

func (op *ListRepeat) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListRepeat) TypeInfo added in v0.24.6

func (*ListRepeat) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListRepeat_Slice added in v0.24.6

type ListRepeat_Slice []ListRepeat

Holds a slice of type ListRepeat.

func (*ListRepeat_Slice) Repeats added in v0.24.6

func (op *ListRepeat_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListRepeat.

func (*ListRepeat_Slice) TypeInfo added in v0.24.6

func (*ListRepeat_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListRepeat.

type ListReverse

type ListReverse struct {
	Target rtti.Address
	Markup map[string]any `json:",omitempty"`
}

Reverse the order of the values in a list. The first becomes last, the weak become strong, the list gets reversed, all that.

func (*ListReverse) Execute

func (op *ListReverse) Execute(run rt.Runtime) (err error)

A normal reduce would return a value, instead we accumulate into a variable

func (*ListReverse) GetMarkup

func (op *ListReverse) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListReverse) TypeInfo

func (*ListReverse) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListReverse_Slice

type ListReverse_Slice []ListReverse

Holds a slice of type ListReverse.

func (*ListReverse_Slice) Repeats

func (op *ListReverse_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListReverse.

func (*ListReverse_Slice) TypeInfo

func (*ListReverse_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListReverse.

type ListSlice

type ListSlice struct {
	List   rtti.Assignment
	Start  rtti.NumEval
	End    rtti.NumEval
	Markup map[string]any `json:",omitempty"`
}

Create a new list from part of another list. Start is optional, if omitted slice starts at the beginning. If start is greater the length, an empty array is returned. Slice doesn't include the ending index. Negatives indices indicates an offset from the end. When end is omitted, or if its greater than the the length of the list, the slice will include everything from start up to and including the last value.

func (*ListSlice) GetMarkup

func (op *ListSlice) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListSlice) GetNumList

func (op *ListSlice) GetNumList(run rt.Runtime) (ret rt.Value, err error)

func (*ListSlice) GetRecordList

func (op *ListSlice) GetRecordList(run rt.Runtime) (ret rt.Value, err error)

func (*ListSlice) GetTextList

func (op *ListSlice) GetTextList(run rt.Runtime) (ret rt.Value, err error)

func (*ListSlice) TypeInfo

func (*ListSlice) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListSlice_Slice

type ListSlice_Slice []ListSlice

Holds a slice of type ListSlice.

func (*ListSlice_Slice) Repeats

func (op *ListSlice_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListSlice.

func (*ListSlice_Slice) TypeInfo

func (*ListSlice_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListSlice.

type ListSort added in v0.24.6

type ListSort struct {
	Target     rtti.Address
	KindName   rtti.TextEval
	FieldName  rtti.TextEval
	Descending rtti.BoolEval
	Case       rtti.BoolEval
	Markup     map[string]any `json:",omitempty"`
}

Rearrange the values in a list. This can sort lists of numbers and text, as well as lists of records and object names given a sorting field.

func (*ListSort) Execute added in v0.24.6

func (op *ListSort) Execute(run rt.Runtime) (err error)

func (*ListSort) GetMarkup added in v0.24.6

func (op *ListSort) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListSort) TypeInfo added in v0.24.6

func (*ListSort) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListSort_Slice added in v0.24.6

type ListSort_Slice []ListSort

Holds a slice of type ListSort.

func (*ListSort_Slice) Repeats added in v0.24.6

func (op *ListSort_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListSort.

func (*ListSort_Slice) TypeInfo added in v0.24.6

func (*ListSort_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListSort.

type ListSplice

type ListSplice struct {
	Target rtti.Address
	Start  rtti.NumEval
	Count  rtti.NumEval
	Insert rtti.Assignment
	Markup map[string]any `json:",omitempty"`
}

Modify a list by adding and removing values. If the starting index is negative, this begins that many values from the end of the list ( clipped to the first element if that distance is more than the total list length. ) If the remove count is missing, this removes all values from the start to the end of the list. if the remove count is zero or negative, no values are removed. The type of the values being added must match the type of the list. ( ex. Text can only be added to a list of text. )

func (*ListSplice) Execute

func (op *ListSplice) Execute(run rt.Runtime) (err error)

func (*ListSplice) GetMarkup

func (op *ListSplice) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListSplice) GetNumList

func (op *ListSplice) GetNumList(run rt.Runtime) (ret rt.Value, err error)

func (*ListSplice) GetRecordList

func (op *ListSplice) GetRecordList(run rt.Runtime) (ret rt.Value, err error)

func (*ListSplice) GetTextList

func (op *ListSplice) GetTextList(run rt.Runtime) (ret rt.Value, err error)

func (*ListSplice) TypeInfo

func (*ListSplice) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListSplice_Slice

type ListSplice_Slice []ListSplice

Holds a slice of type ListSplice.

func (*ListSplice_Slice) Repeats

func (op *ListSplice_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListSplice.

func (*ListSplice_Slice) TypeInfo

func (*ListSplice_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListSplice.

type ListTextAt added in v0.24.8

type ListTextAt struct {
	List   rtti.TextListEval
	Index  rtti.NumEval
	Markup map[string]any `json:",omitempty"`
}

Read a text value from a list of text values.

func (*ListTextAt) GetMarkup added in v0.24.8

func (op *ListTextAt) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ListTextAt) GetText added in v0.24.8

func (op *ListTextAt) GetText(run rt.Runtime) (ret rt.Value, err error)

func (*ListTextAt) TypeInfo added in v0.24.8

func (*ListTextAt) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ListTextAt_Slice added in v0.24.8

type ListTextAt_Slice []ListTextAt

Holds a slice of type ListTextAt.

func (*ListTextAt_Slice) Repeats added in v0.24.8

func (op *ListTextAt_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ListTextAt.

func (*ListTextAt_Slice) TypeInfo added in v0.24.8

func (*ListTextAt_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ListTextAt.

type MakeNumList

type MakeNumList struct {
	Values []rtti.NumEval
	Markup map[string]any `json:",omitempty"`
}

Collect one or more numbers into a list.

func (*MakeNumList) GetMarkup

func (op *MakeNumList) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*MakeNumList) GetNumList

func (op *MakeNumList) GetNumList(run rt.Runtime) (ret rt.Value, err error)

func (*MakeNumList) TypeInfo

func (*MakeNumList) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type MakeNumList_Slice

type MakeNumList_Slice []MakeNumList

Holds a slice of type MakeNumList.

func (*MakeNumList_Slice) Repeats

func (op *MakeNumList_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of MakeNumList.

func (*MakeNumList_Slice) TypeInfo

func (*MakeNumList_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of MakeNumList.

type MakeRecordList

type MakeRecordList struct {
	List   []rtti.RecordEval
	Markup map[string]any `json:",omitempty"`
}

Collect one or more records into a list. All of the records must be of the same type.

func (*MakeRecordList) GetMarkup

func (op *MakeRecordList) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*MakeRecordList) GetRecordList

func (op *MakeRecordList) GetRecordList(run rt.Runtime) (ret rt.Value, err error)

func (*MakeRecordList) TypeInfo

func (*MakeRecordList) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type MakeRecordList_Slice

type MakeRecordList_Slice []MakeRecordList

Holds a slice of type MakeRecordList.

func (*MakeRecordList_Slice) Repeats

func (op *MakeRecordList_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of MakeRecordList.

func (*MakeRecordList_Slice) TypeInfo

func (*MakeRecordList_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of MakeRecordList.

type MakeTextList

type MakeTextList struct {
	Values []rtti.TextEval
	Markup map[string]any `json:",omitempty"`
}

Collect one or more text values into a list.

func (*MakeTextList) GetMarkup

func (op *MakeTextList) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*MakeTextList) GetTextList

func (op *MakeTextList) GetTextList(run rt.Runtime) (ret rt.Value, err error)

func (*MakeTextList) TypeInfo

func (*MakeTextList) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type MakeTextList_Slice

type MakeTextList_Slice []MakeTextList

Holds a slice of type MakeTextList.

func (*MakeTextList_Slice) Repeats

func (op *MakeTextList_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of MakeTextList.

func (*MakeTextList_Slice) TypeInfo

func (*MakeTextList_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of MakeTextList.

type Range

type Range struct {
	To     rtti.NumEval
	Start  rtti.NumEval
	Step   rtti.NumEval
	Markup map[string]any `json:",omitempty"`
}

Generate a list of numbers r[i] = (start + step*i) where i>=0. Inputs are truncated to produce whole numbers. A positive step ends the series when the returned value would exceed stop. A negative step ends before generating a value less than stop.

func (*Range) GetMarkup

func (op *Range) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*Range) GetNumList

func (op *Range) GetNumList(run rt.Runtime) (ret rt.Value, err error)

func (*Range) TypeInfo

func (*Range) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type Range_Slice

type Range_Slice []Range

Holds a slice of type Range.

func (*Range_Slice) Repeats

func (op *Range_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of Range.

func (*Range_Slice) TypeInfo

func (*Range_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of Range.

type Sorter added in v0.24.8

type Sorter struct {
	Kind          string
	Field         string
	CaseSensitive bool // preserves case while sorting strings
	Descending    bool
}

func (Sorter) SortFloats added in v0.24.8

func (opt Sorter) SortFloats(vs []float64)

func (Sorter) SortRecords added in v0.24.8

func (opt Sorter) SortRecords(ks rt.Kinds, src []*rt.Record) (err error)

func (Sorter) SortStrings added in v0.24.8

func (opt Sorter) SortStrings(str []string)

Jump to

Keyboard shortcuts

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