type

Row

@Js
abstract const class Row : Obj, Dict

Row of a Grid. Row also implements the Dict mixin to expose all of the columns as name/value pairs.

methods

dis

Get display string for dict or the given tag.

each

Iterate through all the columns.

eachWhile

Iterate through all the columns until function returns null, then break iteration and return the result.

get

Get the column val by name.

grid

Parent grid

has

Return true if the given name is mapped to a non-null column val.

isEmpty

Always returns false.

missing

Return true if the given name is not mapped to a non-null column val.

trap

Get the column val by name.

val

Scalar value for the cell

Slot Details

dis

virtual override Str? dis(Str? name := null, Str? def := "")

Get display string for dict or the given tag. The Row implementation follows all the same rules as Dict.dis with following enhancements:

If the column meta defines a "format" pattern, then it is used to format the value via the appropiate toLocale method.

each

virtual override Void each(|Obj,Str| f)

Iterate through all the columns.

eachWhile

virtual override Obj? eachWhile(|Obj,Str->Obj?| f)

Iterate through all the columns until function returns null, then break iteration and return the result.

get

@Operator
virtual override Obj? get(Str name, Obj? def := null)

Get the column val by name. If column name doesn't exist or if the column value is null, then return def.

grid

abstract Grid grid()

Parent grid

has

virtual override Bool has(Str name)

Return true if the given name is mapped to a non-null column val.

isEmpty

virtual override Bool isEmpty()

Always returns false.

missing

virtual override Bool missing(Str name)

Return true if the given name is not mapped to a non-null column val.

trap

virtual override Obj? trap(Str name, Obj?[]? args := null)

Get the column val by name. If column name doesn't exist or if the column value is null, then throw UnknownNameErr.

val

abstract Obj? val(Col col)

Scalar value for the cell