Cursor
From Lianjapedia
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
Properties
Property | Access (R/RW) | Value | Description |
---|---|---|---|
Bof | R | Boolean | Whether record pointer is at beginning of cursor |
ChangedValues | R | Object | Return an object reference for an object which has a name and value for each column in the underlying data for the active record that has been changed since the record was last read or updated in the UI or programmatically. |
Database | R | Character | The name of the database associated with the cursor |
Eof | R | Boolean | Whether record pointer is at end of cursor |
Found | R | Boolean | Whether last search was successful |
Filter | RW | Character | Filter condition for the cursor. Call refresh() after changing to refresh the active record. |
SearchFilter | RW | Character | SearchFilter condition for the cursor. Call refresh() after changing to refresh the active record. |
Table | R | Character | The name of the table associated with the cursor |
Values | R | Object | Return an object reference for an object which has a name and value for each column in the underlying data for the active record. |
Methods
Method | Args | Description |
---|---|---|
_delete | onsuccess as Function, onerror as Function [, args ] |
Deletes a record from the database table on the server based on the current recno. Note |
Add | None | Clears the internal record buffer in preparation for insert() being called after setData(). |
clearNamedParameter | None | Clear all named parameters previously set using setNamedParameter(name,value). From v4.1. |
getData | column as Character | Get the value of the specified column from the active record. |
Insert | onsuccess as Function, onerror as Function [, args ] |
Creates a new record in the database table on the server containing the column data values that were changed by setData(). Used in conjunction with add() and setData(). Note |
MoveBookmark | record as Numeric | Positions on the specified record in the cursor then refreshes the active record of the cursor from the server. Note |
MoveFirst | onsuccess as Function, onerror as Function | Positions on the first record in the cursor then refreshes the active record of the cursor from the server. Note |
MoveLast | onsuccess as Function, onerror as Function | Positions on the last record in the cursor then refreshes the active record of the cursor from the server. Note |
MoveNext | onsuccess as Function, onerror as Function | Positions on the next record in the cursor then refreshes the active record of the cursor from the server. Note |
MovePrevious | onsuccess as Function, onerror as Function | Positions on the previous record in the cursor then refreshes the active record of the cursor from the server. Note |
read | onsuccess as Function, onerror as Function [, args ] |
Reads a record from the database table on the server based on the current recno. If the recno is greater than the reccount then the last record will be read. Note |
reccount | None | Returns the total row count in the cursor. |
recno | None | Returns the current rowid in the cursor. |
refresh | onsuccess as Function, onerror as Function | Refreshes the active record of the cursor from the server based on the current filter and searchfilter conditions or the current recno if neither are specified. Note |
setData | column as Character, value as Expression | Set the value of the specified column in the active record. |
setNamedParameter | name as Character, value as Character | Set the specified named parameter to the specified value. This can be used to set {parameter} or ?parameter macros in virtual table definitions. From v4.1. |
Update | onsuccess as Function, onerror as Function [, args ] |
Updates the current record in the database table on the server containing the column data values that were changed by SetData(). Note |
Notes
The function arguments are optional JavaScript closures called when the operation completes and apply to the Lianja HTML5 Client.