Module: baja/coll/TableCursor

Defines TableCursor (not exposed on baja namespace).


new (require("baja/coll/TableCursor"))()

Cursor for a Table.

Extends:
See:

Methods


after(func)

When the cursor is iterated, the before function will be called
just after iteration has finished.

When the function is called, this refers to the Cursor. The Cursor is also
passed in as a argument to this function.

Parameters:
Name Type Description
func function

the after function.

Inherited From:

before(func)

When the cursor is iterated, the before function will be called
just before iteration starts.

When the function is called, this refers to the Cursor. The Cursor is also
passed in as a argument to this function.

Parameters:
Name Type Description
func function

the before function.

Inherited From:

each(func)

Iterate through the Cursor and call a function for every item.

When the function is called, this refers to the Cursor.

Parameters:
Name Type Description
func function

function called on every iteration with
the current row used as the first argument and row
index as the second argument.

Inherited From:

get( [column])

Return the current row or row item.

If column information is passed into this method then the value for a particular
column and row will be returned.

Parameters:
Name Type Argument Description
column String | module:baja/coll/Table.TableColumn <optional>

the column
name or column. If undefined, the entire row is returned.

Overrides:
Returns:

the cursor value (null if none available).


getDisplay( [column])

Return the current item display string.

If column information is passed into this method then the display String for a particular
column and row will be returned.

Parameters:
Name Type Argument Description
column String | module:baja/coll/Table.TableColumn <optional>

the column
name or column. If undefined, the entire row is returned.

Returns:

the cursor display string (null if none available).

Type
String

getSource()

Return the underlying Cursor's data source.

Inherited From:
Returns:
Type
baja.coll.QueryResult