Difference between revisions of "CursorAdapter"

From Lianjapedia
Jump to: navigation, search
Line 11: Line 11:
 
!width="50%"|Description
 
!width="50%"|Description
 
|-
 
|-
|valign="top"|DataSourceType
+
|Alias
|valign="top"|RW
+
|valign="top"|Character
+
|valign="top"|Type of the DataSource: "" (native) or "ODBC"
+
|-
+
|DataSource
+
 
|RW
 
|RW
 
|Character
 
|Character
|Source of data
+
|Alias name
 
|-
 
|-
|valign="top"|DataSourceUsername
+
|valign="top"|AllowDelete
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Character
+
|valign="top"|Boolean
|valign="top"|Username for DataSource
+
|valign="top"|Whether delete operations are allowed
 
|-
 
|-
|valign="top"|DataSourcePassword
+
|valign="top"|AllowInsert
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Character
+
|valign="top"|Boolean
|valign="top"|Password for DataSource
+
|valign="top"|Whether insert operations are allowed
 
|-
 
|-
|valign="top"|DataSourceOptions
+
|valign="top"|AllowSimultaneousFetch
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Character
+
|valign="top"|Boolean
|valign="top"|Options string for DataSource
+
|valign="top"|Whether simultaneous fetch operations are allowed
 
|-
 
|-
|valign="top"|DataSourceHost
+
|valign="top"|AllowUpdate
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Character
+
|valign="top"|Boolean
|valign="top"|Hostname or IP for DataSource
+
|valign="top"|Whether update operations are allowed
 
|-
 
|-
|valign="top"|DataSourcePort
+
|valign="top"|BatchUpdateCount
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Numeric
 
|valign="top"|Numeric
|valign="top"|Port number for DataSource
+
|valign="top"|Number of update statements sent
 
|-
 
|-
|Alias
+
|valign="top"|BreakOnError
|RW
+
|valign="top"|RW
|Character
+
|valign="top"|Boolean
|Alias name
+
|valign="top"|Whether errors break program execution
 
|-
 
|-
|SelectCmd
+
|valign="top"|CompareMemo
|RW
+
|valign="top"|RW
|Character
+
|valign="top"|Boolean
|Select command string
+
|valign="top"|Whether memos are included in where update clauses
 
|-
 
|-
|DeleteCmd
+
|valign="top"|ConversionFunc
|RW
+
|valign="top"|RW
|Character
+
|valign="top"|Character
|Delete command string
+
|valign="top"|Comma-separated list of field and function name pairs
 
|-
 
|-
|UpdateCmd
+
|valign="top"|CursorSchema
|RW
+
|valign="top"|RW
|Character
+
|valign="top"|Character
|Update command string
+
|valign="top"|Structure of the cursor
|-
+
|InsertCmd
+
|RW
+
|Character
+
|Insert command string
+
 
|-
 
|-
 
|Database
 
|Database
Line 76: Line 66:
 
|Database name
 
|Database name
 
|-
 
|-
|Table
+
|DataSource
 
|RW
 
|RW
 
|Character
 
|Character
|Table name
+
|Source of data
 
|-
 
|-
|valign="top"|Tables
+
|valign="top"|DataSourceHost
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Character
 
|valign="top"|Character
|valign="top"|Comma-separated list of table names
+
|valign="top"|Hostname or IP for DataSource
 
|-
 
|-
|valign="top"|KeyFieldList
+
|valign="top"|DataSourceOptions
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Character
 
|valign="top"|Character
|valign="top"|Comma-separated list of primary fields
+
|valign="top"|Options string for DataSource
 
|-
 
|-
|valign="top"|UpdatableFieldList
+
|valign="top"|DataSourcePassword
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Character
 
|valign="top"|Character
|valign="top"|Comma-separated list of fields
+
|valign="top"|Password for DataSource
 
|-
 
|-
|valign="top"|UpdateNameList
+
|valign="top"|DataSourcePort
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Character
+
|valign="top"|Numeric
|valign="top"|Comma-separated list of pairs of local and remote field names
+
|valign="top"|Port number for DataSource
 
|-
 
|-
|valign="top"|AllowInsert
+
|valign="top"|DataSourceType
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Boolean
+
|valign="top"|Character
|valign="top"|Whether insert operations are allowed
+
|valign="top"|Type of the DataSource: "" (native) or "ODBC"
 
|-
 
|-
|valign="top"|AllowDelete
+
|valign="top"|DataSourceUsername
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Boolean
+
|valign="top"|Character
|valign="top"|Whether delete operations are allowed
+
|valign="top"|Username for DataSource
 
|-
 
|-
|valign="top"|AllowUpdate
+
|DeleteCmd
|valign="top"|RW
+
|RW
|valign="top"|Boolean
+
|Character
|valign="top"|Whether update operations are allowed
+
|Delete command string
|-
+
|valign="top"|AllowSimultaneousFetch
+
|valign="top"|RW
+
|valign="top"|Boolean
+
|valign="top"|Whether simultaneous fetch operations are allowed
+
|-
+
|valign="top"|BatchUpdateCount
+
|valign="top"|RW
+
|valign="top"|Numeric
+
|valign="top"|Number of update statements sent
+
|-
+
|valign="top"|BreakOnError
+
|valign="top"|RW
+
|valign="top"|Boolean
+
|valign="top"|Whether errors break program execution
+
 
|-
 
|-
 
|valign="top"|FetchAsNeeded
 
|valign="top"|FetchAsNeeded
Line 140: Line 115:
 
|valign="top"|Numeric
 
|valign="top"|Numeric
 
|valign="top"|Number of rows fetched
 
|valign="top"|Number of rows fetched
|-
 
|valign="top"|MaxRecords
 
|valign="top"|RW
 
|valign="top"|Numeric
 
|valign="top"|Maximum number of rows returned
 
 
|-
 
|-
 
|valign="top"|Flags
 
|valign="top"|Flags
Line 151: Line 121:
 
|valign="top"|Flag settings
 
|valign="top"|Flag settings
 
|-
 
|-
|valign="top"|WhereType
+
|InsertCmd
|valign="top"|RW
+
|RW
|valign="top"|Numeric
+
|Character
|valign="top"|Type of fields used for where clauses: 1 = KeyFieldList, 2 = KeyFieldList and updatable fields, 3 = KeyFieldList and modified fields, 4 = KeyFieldList and comparison of time stamps
+
|Insert command string
 
|-
 
|-
|valign="top"|UpdateType
+
|valign="top"|KeyFieldList
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Numeric
+
|valign="top"|Character
|valign="top"|Type of update: 1 = update old data with new data, 2 = delete old data and insert new data
+
|valign="top"|Comma-separated list of primary fields
 
|-
 
|-
|valign="top"|UseMemoSize
+
|valign="top"|MaxRecords
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Numeric
 
|valign="top"|Numeric
|valign="top"|Minimum size in bytes for returning a value as a memo field
+
|valign="top"|Maximum number of rows returned
 
|-
 
|-
|valign="top"|CompareMemo
+
|valign="top"|Prepared
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Boolean
 
|valign="top"|Boolean
|valign="top"|Whether memos are included in where update clauses
+
|valign="top"|Whether to prepare SQL statements for subsequent requery
 +
|-
 +
|SelectCmd
 +
|RW
 +
|Character
 +
|Select command string
 
|-
 
|-
 
|valign="top"|SendUpdates
 
|valign="top"|SendUpdates
Line 176: Line 151:
 
|valign="top"|Whether to send an update query
 
|valign="top"|Whether to send an update query
 
|-
 
|-
|valign="top"|Prepared
+
|Table
 +
|RW
 +
|Character
 +
|Table name
 +
|-
 +
|valign="top"|Tables
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Boolean
+
|valign="top"|Character
|valign="top"|Whether to prepare SQL statements for subsequent requery
+
|valign="top"|Comma-separated list of table names
 
|-
 
|-
|valign="top"|ConversionFunc
+
|valign="top"|UpdatableFieldList
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Character
 
|valign="top"|Character
|valign="top"|Comma-separated list of field and function name pairs
+
|valign="top"|Comma-separated list of fields
 
|-
 
|-
|valign="top"|CursorSchema
+
|UpdateCmd
 +
|RW
 +
|Character
 +
|Update command string
 +
|-
 +
|valign="top"|UpdateNameList
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Character
 
|valign="top"|Character
|valign="top"|Structure of the cursor
+
|valign="top"|Comma-separated list of pairs of local and remote field names
 +
|-
 +
|valign="top"|UpdateType
 +
|valign="top"|RW
 +
|valign="top"|Numeric
 +
|valign="top"|Type of update: 1 = update old data with new data, 2 = delete old data and insert new data
 +
|-
 +
|valign="top"|UseMemoSize
 +
|valign="top"|RW
 +
|valign="top"|Numeric
 +
|valign="top"|Minimum size in bytes for returning a value as a memo field
 +
|-
 +
|valign="top"|WhereType
 +
|valign="top"|RW
 +
|valign="top"|Numeric
 +
|valign="top"|Type of fields used for where clauses: 1 = KeyFieldList, 2 = KeyFieldList and updatable fields, 3 = KeyFieldList and modified fields, 4 = KeyFieldList and comparison of time stamps
 
|-
 
|-
 
|}
 
|}
Line 201: Line 201:
 
!Args
 
!Args
 
!width="50%"|Description
 
!width="50%"|Description
 +
|-
 +
|Cancel
 +
|None
 +
|Cancel transaction
 +
|-
 +
|Close
 +
|None
 +
|Close the DataSource
 +
|-
 +
|Commit
 +
|None
 +
|Commit transaction data changes
 
|-
 
|-
 
|valign="top"|CursorFill
 
|valign="top"|CursorFill
Line 209: Line 221:
 
|valign="top"|None
 
|valign="top"|None
 
|valign="top"|Refresh the cursor based on Select Cmd
 
|valign="top"|Refresh the cursor based on Select Cmd
|-
 
|Open
 
|None
 
|Open the DataSource
 
|-
 
|Close
 
|None
 
|Close the DataSource
 
 
|-
 
|-
 
|valign="top2|Exec
 
|valign="top2|Exec
Line 222: Line 226:
 
|valign="top"|Execute the specified command
 
|valign="top"|Execute the specified command
 
|-
 
|-
|Transaction
+
|Open
 
|None
 
|None
|Begin transaction
+
|Open the DataSource
|-
+
|Commit
+
|None
+
|Commit transaction data changes
+
 
|-
 
|-
 
|Rollback
 
|Rollback
Line 234: Line 234:
 
|Rollback transaction data changes
 
|Rollback transaction data changes
 
|-
 
|-
|Cancel
+
|Transaction
 
|None
 
|None
|Cancel transaction
+
|Begin transaction
 
|-
 
|-
 
|}
 
|}

Revision as of 10:06, 10 April 2013

Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.

Properties

This class supports the Common Properties plus the following:

Property Access (R/RW) Value Description
Alias RW Character Alias name
AllowDelete RW Boolean Whether delete operations are allowed
AllowInsert RW Boolean Whether insert operations are allowed
AllowSimultaneousFetch RW Boolean Whether simultaneous fetch operations are allowed
AllowUpdate RW Boolean Whether update operations are allowed
BatchUpdateCount RW Numeric Number of update statements sent
BreakOnError RW Boolean Whether errors break program execution
CompareMemo RW Boolean Whether memos are included in where update clauses
ConversionFunc RW Character Comma-separated list of field and function name pairs
CursorSchema RW Character Structure of the cursor
Database RW Character Database name
DataSource RW Character Source of data
DataSourceHost RW Character Hostname or IP for DataSource
DataSourceOptions RW Character Options string for DataSource
DataSourcePassword RW Character Password for DataSource
DataSourcePort RW Numeric Port number for DataSource
DataSourceType RW Character Type of the DataSource: "" (native) or "ODBC"
DataSourceUsername RW Character Username for DataSource
DeleteCmd RW Character Delete command string
FetchAsNeeded RW Boolean Whether records are fetched as needed
FetchSize RW Numeric Number of rows fetched
Flags RW Numeric Flag settings
InsertCmd RW Character Insert command string
KeyFieldList RW Character Comma-separated list of primary fields
MaxRecords RW Numeric Maximum number of rows returned
Prepared RW Boolean Whether to prepare SQL statements for subsequent requery
SelectCmd RW Character Select command string
SendUpdates RW Boolean Whether to send an update query
Table RW Character Table name
Tables RW Character Comma-separated list of table names
UpdatableFieldList RW Character Comma-separated list of fields
UpdateCmd RW Character Update command string
UpdateNameList RW Character Comma-separated list of pairs of local and remote field names
UpdateType RW Numeric Type of update: 1 = update old data with new data, 2 = delete old data and insert new data
UseMemoSize RW Numeric Minimum size in bytes for returning a value as a memo field
WhereType RW Numeric Type of fields used for where clauses: 1 = KeyFieldList, 2 = KeyFieldList and updatable fields, 3 = KeyFieldList and modified fields, 4 = KeyFieldList and comparison of time stamps

Methods

This class supports the Common Methods plus the following:

Method Args Description
Cancel None Cancel transaction
Close None Close the DataSource
Commit None Commit transaction data changes
CursorFill None Fill the cursor based on Select Cmd
CursorRefresh None Refresh the cursor based on Select Cmd
Exec command as Character Execute the specified command
Open None Open the DataSource
Rollback None Rollback transaction data changes
Transaction None Begin transaction

Events

This class supports the Common Events plus the following:

Event Args Description
afterCursorAttach alias as Character Occurs after cursoradapter is open
afterCursorClose alias as Character Occurs after cursoradapter is closed and after afterCursorDetach
afterCursorDetach alias as Character Occurs after cursoradapter is closed
afterCursorFill cursorSchema as Character Occurs after cursor is filled
afterCursorOpen alias as Character Occurs after cursoradapter is open and afterCursorAttach
afterCursorRefresh alias as Character, refreshed as Boolean Occurs after cursor is refreshed
afterCursorUpdate rows as Numeric, result as Boolean, error as Character Occurs after cursor is updated
afterDelete fieldstate as Character, force as Boolean, deleteCmd as Character, deleted as Boolean Occurs after delete operation is performed
afterInsert fieldstate as Character, force as Boolean, insertCmd as Character, inserted as Boolean Occurs after insert operation is performed
afterUpdate fieldstate as Character, force as Boolean, insertCmd as Character, inserted as Boolean Occurs after update operation is performed
beforeCursorAttach alias as Character Occurs before cursor is open and after beforeCursorOpen
beforeCursorClose alias as Character Occurs when close method is called
beforeCursorDetach alias as Character Occurs before cursoradapter is closed and after beforeCursorClose
beforeCursorFill cursorSchema as Character, noDataOnLoad as Boolean, selectCmd as Character Occurs before when cursorFill method is called
beforeCursorOpen alias as Character Occurs when open method is called
beforeCursorRefresh alias as Character Occurs when cursorRefresh method is called
beforeCursorUpdate rows as Numeric, force as Boolean Occurs before cursor is updated
beforeDelete fieldstate as Character, force as Boolean, deleteCmd as Character Occurs before delete operation is performed
beforeInsert fieldstate as Character, force as Boolean, deleteCmd as Character Occurs before insert operation is performed
beforeUpdate fieldstate as Character, force as Boolean, deleteCmd as Character Occurs before update operation is performed