Attributes of block variables
Block variable attributes provide more information about block variables.
The following is a list of block variable attributes.
Block variable attribute | Description |
---|---|
._cols |
Returns a list of column names. |
._column.[COLUMN] |
Returns a package of metadata for the specified column. |
._data |
The entire result of the query as a table value. |
._defined |
Is the variable or component defined?
@foo._defined . |
._is_empty |
True if @variable is empty or undefined. |
._length |
Returns the length of a
list. In the
example above, the block variable @foo._length
returns the length of the list @foo . |
._members |
When applied to a package, yields a list of the package's member names. |
._or_empty |
Returns "" if the variable is undefined, otherwise returns the variable value. |
._pretty |
A string representing a human-readable form of @variable (where possible). |
._rows |
Returns the number of rows. |
._tag |
Returns the name of an XML tag.
@myvar = <foo bar="5"><baz/></foo>In the example above, the block variable @myvar._tag returns the string
foo . |
._tohtml |
HTML-escaped version of the string form of @variable. |
._tojson |
JSON-encoded version of @variable (where possible). |
._tostring |
The string form of @variable. |
._type |
The variable type. Currently can be list, pkg, xml, value or
undefined. @foo._type |
._ugly |
A string representing a 1010data input form of @variable (where possible). |
._xml |
Returns the code corresponding to the MDB ops as an XML value. |