package
0.16.0
Repository: https://github.com/chaisql/chai.git
Documentation: pkg.go.dev

# Functions

ArrayContains iterates over a and returns whether v is equal to one of its values.
ArrayLength returns the length of an array.
CastAs casts v as the selected type when possible.
CastAsArray casts according to the following rules: Text: decodes a JSON array, otherwise fails.
CastAsBlob casts according to the following rules: Text: decodes a base64 string, otherwise fails.
CastAsBool casts according to the following rules: Integer: true if truthy, otherwise false.
CastAsDouble casts according to the following rules: Integer: returns a double version of the integer.
CastAsInteger casts according to the following rules: Bool: returns 1 if true, 0 if false.
CastAsObject casts according to the following rules: Text: decodes a JSON object, otherwise fails.
CastAsText returns a JSON representation of v.
CastAsTimestamp casts according to the following rules: Text: uses carbon.Parse to determine the timestamp value it fails if the text doesn't contain a valid timestamp.
No description provided by the author
Diff returns the operations needed to transform the first object into the second.
Length returns the length of an object.
MapScan decodes the object into a map.
MarshalJSON encodes an object to json.
MarshalJSONArray encodes an array to json.
MaskFields returns a new object that masks the given fields.
No description provided by the author
No description provided by the author
NewFieldBuffer creates a FieldBuffer.
NewFromCSV takes a list of headers and columns and returns an object.
NewFromJSON creates an object from raw JSON data.
NewFromMap creates an object from a map.
NewFromStruct creates an object from a struct using reflection.
NewPath creates a path from a list of strings representing either a field name or an array index in string form.
No description provided by the author
NewValue creates a value whose type is infered from x.
NewValueBuffer creates a buffer of values.
OnlyFields returns a new object that only contains the given fields.
Scan each field of the object into the given variables.
ScanField scans a single field into dest.
ScanIterator scans a row iterator into a slice or fixed size array.
ScanPath scans a single path into dest.
ScanRow scans a row into dest which must be either a struct pointer, a map or a map pointer.
ScanValue scans v into t.
SliceScan scans an array into a slice or fixed size array.
StructScan scans d into t.
No description provided by the author

# Structs

ErrUnsupportedType is used to skip struct or array fields that are not supported.
FieldBuffer stores a group of fields in memory.
Op represents a single operation on an object.
PathFragment is a fragment of a path representing either a field name or the index of an array.
ValueBuffer is an array that holds values in memory.

# Interfaces

An Iterator can iterate over object keys.
A Scanner can iterate over an object and scan all the fields.

# Type aliases

A Path represents the path to a particular value within an object.
No description provided by the author