DumontEXE 0.0.1
Public Types | Public Slots | Public Member Functions | Private Attributes
cmcRowSet Class Reference

Rowset Base Class. More...

#include <cmcRowSet.h>

Inheritance diagram for cmcRowSet:

List of all members.

Public Types

enum  ROWSET_TYPES { RowSetQuery = 1, RowSetAdd = 2, RowSetDelete = 3, RowSetEdit = 4 }
 Rowset Types
. More...

Public Slots

virtual cmcCategoryDefcategoryDef ()
 extended: Category Definition

virtual QString categoryName ()
 extended alias: Category Name

virtual long colCount ()
 alias: Rowset Column Count

virtual bool colInRange (long col)
 extended: Quick Column Range Test

virtual long columnCount ()
 Rowset Column Count
.
virtual long commit (long flags=0)
 Commit the changes to the database
.
virtual long currentSelection ()
 Current Row Selection
.
virtual void currentSelection (long value)
 Set the current Row
.
virtual cmcCursorcursor ()
 extended: Originating Cursor

virtual long deleteRow ()
 Delete a Row
.
virtual long deleteRow (long row, long flags=0)
 Mark a row for deletion
.
virtual long firstCol ()
 Return the first row index
.
virtual long firstColumn ()
 Return the first row index
.
virtual long firstRow ()
 Return the first row index
.
virtual long getColumnIndex (const QString &col, long flags=0)
 Get Column Index
.
virtual QString getColumnLabel (long col, long flags=0)
 Get Column Label
.
virtual bool getRowBool (long col)
 Get Default Row Boolean
.
virtual bool getRowBool (long row, long col)
 extended: Get a Row Boolean by column number

virtual bool getRowBool (const QString &col)
 Get a Row Boolean
.
virtual bool getRowBool (long row, const QString &col)
 extended: Get a Row Boolean by column name

QString getRowGUID ()
 Get the Row GUID
.
virtual QString getRowGUID (long row)
 extended: Read a GUID from a row

virtual QString getRowID ()
 Get a Row ID
.
virtual QString getRowID (long row, long flags=0)
 Get a Row ID
.
virtual long getRowLong (long row, long col)
 extended: Get a Row Long by column number

virtual long getRowLong (long col)
 Get a Row Long
.
virtual long getRowLong (const QString &col)
 Get a Row Long
.
virtual long getRowLong (long row, const QString &col)
 extended: Get a Row Long by column name

virtual QString getRowString (long col)
 Get a Row String
.
virtual QString getRowString (long row, long col)
 extended: Get a Row String by column number

virtual QString getRowString (const QString &col)
 Get the Row String by column number
.
virtual QString getRowString (long row, const QString &col)
 extended: Get a Row String by column name

virtual QString getRowTHID ()
 Get the Row THID
.
virtual QString getRowTHID (long row)
 Get Row ID Alias
.
virtual QString getRowValue (long row, const QString &col)
 extended: Get a Row Value (String) by column name

virtual QString getRowValue (long row, long col, long flags=0)
 Get a Row Value (String) by column number
.
virtual QString getRowVar (long col, const QString &field)
 Get a Row Var
.
virtual QString getRowVar (long row, long col, const QString &field)
 Get Row Var
.
virtual QString getRowVar (const QString &col, const QString &field)
 Get a Row Var
.
virtual QString getRowVar (long row, const QString &col, const QString &field)
 Get a Row Var
.
virtual bool getShared (long row)
 Get the Shared status of a Row
.
virtual bool isDirty ()
 True when the rowset is dirty (needs a commit)
.
virtual long lastCol ()
 Return the last column index
.
virtual long lastColumn ()
 Return the last column index
.
virtual long lastRow ()
 Return the last row index
.
virtual long modifyRow (long row, long col, const QString &value, long flags=0)
 Modify a Row String by column number
.
virtual long modifyRow (long row, const QString &col, const QString &value, long flags=0)
 extended: Modify a Row String by column name

virtual long rowCount ()
 Rowset Row Count
.
virtual bool rowInRange (long row)
 extended: Quick Row Range Test

virtual QString setRowGUID (long row)
 This sets a GUID on a Row
.
virtual bool setShared (long row)
 Make a row Shared
.
virtual bool setTimeStamp (long row)
 Set Time Stamp
.
virtual long type ()
 extended: RowSet Type ID

QString typeName ()
 extended: RowSet Type Name

static QString typeName (long type)
 extended: RowSet Type Name

virtual QString varValue (long row, const QString &col, const QString &field)
 Get a Var Value
.
virtual QString varValue (const QString &col, const QString &field)
 Get a Var Value
.
virtual QString varValue (long col, const QString &field)
 Get a Var Value
.
virtual QString varValue (long row, long col, const QString &field)
 Get a Var Value
.

Public Member Functions

 cmcRowSet (long rowCount, long flags, const QString &name, long type, cmcCursor *cursor, IDispatch *dispatch, QObject *parent=NULL)
 Standard Constructor
.

Private Attributes

QString m_categoryName
 Category Name Cache
.
long m_colCount
 Column Count Cache
.
QHash< QString, long > m_columns
 Column Name Map Cache
.
long m_currentSelection
 Current Row Selection
.
QPointer< cmcCursorm_cursor
 Originating Cursor Pointer
.
bool m_dirty
 RowSet Dirty Indicator
.
long m_flags
 RowSet Flags
.
long m_rowCount
 RowCount Cache
.
long m_type
 Rowset Type
.

Detailed Description

Rowset Base Class.

Definition at line 45 of file cmcRowSet.h.


Member Enumeration Documentation

Rowset Types
.

A row set object is designated as being of a particular single type.

You can query for these row types by requesting type() on the rowset or if you prefer a string version of the rowset type, you can call typeName() with the type value requested.

There are four rowset Types:

Enumerator:
RowSetQuery 

1 == Read-Only

RowSetAdd 

2 == Add-Only

RowSetDelete 

3 == Read-Only plus Delete

RowSetEdit 

4 == Read and Write existing

Definition at line 70 of file cmcRowSet.h.


Constructor & Destructor Documentation

cmcRowSet ( long  rowCount,
long  flags,
const QString &  name,
long  type,
cmcCursor cursor,
IDispatch *  dispatch,
QObject *  parent = NULL 
)

Standard Constructor
.

Parameters:
rowCountThis is a cached copy of the rowCount. It is cached here because the rowCount doesn't change after the rowset has been instantiated and there's no point in making unnecessary calls to the Commence API.

flagsThis is a copy of the flags passed along by the initial request.

nameThis is an optional name. Normally it's the same name as the cursor that created it, but it can be overridden by the application, allowing rowsets to be named.

typeThis provides the rowset type from the constructor subclass.

cursorThis is a reference to the originating cursor. The cursor object can die (be destroyed) before the rowset is destroyed, but this should be avoided since the rowset object makes reference back to the cursor for various bits of information during its lifetime.

dispatchThis is the dispatch pointer provided by the Commence application server.

parentThis is the parent. Normally it's NULL and vbScript takes ownership of the object.

Definition at line 41 of file cmcRowSet.cpp.


Member Function Documentation

cmcCategoryDef * categoryDef ( void  ) [virtual, slot]

extended: Category Definition

Returns:
Category Defintion object

Definition at line 99 of file cmcRowSet.cpp.

QString categoryName ( void  ) [virtual, slot]

extended alias: Category Name

This is a convenience function. I can never remember if the function I should be calling to get the category name should be name() or category() or categoryName(). This clarifies it for me. Anytime I'm referring to the name of a category, I can use categoryName()

Returns:
String value of Category Name

Definition at line 94 of file cmcRowSet.cpp.

long colCount ( ) [virtual, slot]

alias: Rowset Column Count

This is just an alias for columnCount() because I like it when my source files all line up properly, and

 dim rowCount: rowCount = rs.rowCount()
 dim colCount: colCount = rs.colCount()

Looks better than

 dim rowCount: rowCount = rs.rowCount()
 dim columnCount: columnCount = rs.columnCount()

but, that's just me!

See also:
columnCount, rowCount
Returns:
Integer value of RowSet column count

Definition at line 131 of file cmcRowSet.cpp.

bool colInRange ( long  col) [virtual, slot]

extended: Quick Column Range Test

This is a handy function for determining quickly if an index variable is within the column range of the rowset.

See also:
rowInRange, rowCount, columnCount, colCount
Returns:
bool True if index value is within range
Parameters:
colindex value to be checked

Definition at line 147 of file cmcRowSet.cpp.

long columnCount ( ) [virtual, slot]

Rowset Column Count
.

The Column Count value returns the number of columns assigned to the cursor for this rowset. If no columns have been specifically assigned, then this value represents all the designed fields and connections.

See also:
colCount, rowCount
Returns:
Integer value of RowSet column count

Definition at line 123 of file cmcRowSet.cpp.

long commit ( long  flags = 0) [virtual, slot]

Commit the changes to the database
.

Note:
Calling this function from a Query row set will generate an error.
Returns:
Integer ~ 0 on success, -1 on error
Parameters:
flagsunused ~ defaults to zero

Definition at line 998 of file cmcRowSet.cpp.

long currentSelection ( ) [virtual, slot]

Current Row Selection
.

Definition at line 1091 of file cmcRowSet.cpp.

void currentSelection ( long  value) [virtual, slot]

Set the current Row
.

Definition at line 1096 of file cmcRowSet.cpp.

cmcCursor * cursor ( ) [virtual, slot]

extended: Originating Cursor

This returns a pointer to the cursor object that created this RowSet object.

Note:
It is possible for the cursor object to be destroyed before this RowSet object gets destroyed, in which case this reference will return a NULL pointer. You should test for a NULL pointer or at least make sure your code doesn't destroy the cursor if you plan to use it.
Returns:
Originating Cursor object

Definition at line 110 of file cmcRowSet.cpp.

long deleteRow ( ) [virtual, slot]

Delete a Row
.

Definition at line 910 of file cmcRowSet.cpp.

long deleteRow ( long  row,
long  flags = 0 
) [virtual, slot]

Mark a row for deletion
.

This function doesn't actually delete a row, but only marks it for deletion. You must call commit() in order to save the deleted items to disk. The procedure for deleting rows is as follows:

vbScript Example ~ Deleting Rows
 dim cursor: set cursor = dapp.db.getCursor("Person")
 cursor.setColumn "personKey"
 cursor.setFilter "[ViewFilter(1,F,,deleteMe,True)]"
 dim rs: set rs = cursor.getDeleteRowSet
 dim i: for i = rs.firstRow to rs.lastRow
   if( rs.deleteRow(i) = -1 ) then
     dexe.debug "Unable to delete: " & rs.getRowString(i,"personKey")
   end if
 next
 rs.commit
Note:
Calling this function from anything other than a "Delete" row set will generate an error.
See also:
commit
Returns:
Integer ~ 0 on success, -1 on error

Todo:
implement dirty rowset

Parameters:
rowindex ~ (firstRow <= row <= lastRow)

flagsunused ~ defaults to zero

Definition at line 915 of file cmcRowSet.cpp.

virtual long firstCol ( ) [inline, virtual, slot]

Return the first row index
.

In Commence, some object collections use zero based indexes, and some use one based indexes. Why try to remember? Use these functions instead.

See also:
firstColumn, firstRow, lastColumn, lastCol, lastRow
Returns:
0 (zero) ~ rowset columns are zero based

Definition at line 1038 of file cmcRowSet.h.

virtual long firstColumn ( ) [inline, virtual, slot]

Return the first row index
.

In Commence, some object collections use zero based indexes, and some use one based indexes. Why try to remember? Use these functions instead.

See also:
firstCol, lastColumn, lastCol, firstRow, lastRow
Returns:
0 (zero) ~ rowset columns are zero based

Definition at line 1025 of file cmcRowSet.h.

virtual long firstRow ( ) [inline, virtual, slot]

Return the first row index
.

In Commence, some object collections use zero based indexes, and some use one based indexes. Why try to remember? Use these functions instead.

See also:
firstColumn, firstCol, lastRow, lastColumn, lastCol
Returns:
0 (zero) ~ rowset rows are zero based

Definition at line 1012 of file cmcRowSet.h.

long getColumnIndex ( const QString &  col,
long  flags = 0 
) [virtual, slot]

Get Column Index
.

This gets the index number of the requested column. If no matching column exists, a -1 is returned.

This function first looks to the originating cursor for the column index. If a specific list of columns has been defined for the cursor, then this column index function operates very quickly because it does not need to make calls into the Commence API to retrieve it. If columns have not been defined for the cursor, then this function will look to its own cache to determine the index number. If it cannot be found here, then finally it makes a call into the Commence API to retrieve that information.

Therefore, by definition, it makes sense to define columns for the cursors before using them in rowset queries and updates.

See also:
getColumnLabel
Returns:
Integer value of column index for label. -1 if label could not be found.
Parameters:
colname ~ text label of column

flagsunused ~ defaults to zero

Definition at line 158 of file cmcRowSet.cpp.

QString getColumnLabel ( long  col,
long  flags = 0 
) [virtual, slot]

Get Column Label
.

This gets the label for a specific column. If the column specified is out of range, then this function returns an empty string.

See also:
getColumnIndex
Returns:
String value of column label for requested index
Parameters:
colindex ~ column number

flagsunused ~ defaults to zero

Definition at line 258 of file cmcRowSet.cpp.

bool getRowBool ( long  col) [virtual, slot]

Get Default Row Boolean
.

This is a short-hand function that provides the default row.

Returns:
bool ~ True/False of row and column
Parameters:
collong ~ column number

Definition at line 520 of file cmcRowSet.cpp.

bool getRowBool ( long  row,
long  col 
) [virtual, slot]

extended: Get a Row Boolean by column number

This reads a row value and converts it to a Boolean true/false. This is an important function since, in Commence, there are about three different versions of True and False, depending on the object type that you are reading. One is TRUE/FALSE for cursors and rowsets, another is Yes/No for connections, and yet another is... well... something else. I can't remember. This function makes uniform that user interface.

See also:
getRowBool( by column name )
Returns:
bool ~ True/False of row and column
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

colindex ~ (firstCol <= col <= lastCol)

Definition at line 525 of file cmcRowSet.cpp.

bool getRowBool ( const QString &  col) [virtual, slot]

Get a Row Boolean
.

Definition at line 530 of file cmcRowSet.cpp.

bool getRowBool ( long  row,
const QString &  col 
) [virtual, slot]

extended: Get a Row Boolean by column name

This reads a row value and converts it to a Boolean true/false. This is an important function since, in Commence, there are about three different versions of True and False, depending on the object type that you are reading. One is TRUE/FALSE for cursors and rowsets, another is Yes/No for connections, and yet another is... well... something else. I can't remember. This function makes uniform that user interface.

See also:
getRowBool( by column number )
Returns:
bool ~ True/False or row and column
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

colname ~ text label of column

Definition at line 535 of file cmcRowSet.cpp.

QString getRowGUID ( ) [slot]

Get the Row GUID
.

Definition at line 495 of file cmcRowSet.cpp.

QString getRowGUID ( long  row) [virtual, slot]

extended: Read a GUID from a row

In order for this function to work properly, the category must be GUID ready. Refer to the secion THID's and GUID's and why we need them for more information.

See also:
getRowID
Returns:
String GUID of row
Todo:
get GUID values working
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

Definition at line 478 of file cmcRowSet.cpp.

QString getRowID ( ) [virtual, slot]

Get a Row ID
.

Definition at line 389 of file cmcRowSet.cpp.

QString getRowID ( long  row,
long  flags = 0 
) [virtual, slot]

Get a Row ID
.

In order for this function to work properly, the rowset MUST be opened in USE_THIDS mode. If not, the results of this function are unpredictable. Refer to the secion THID's and GUID's and why we need them for more information.

See also:
getRowGUID
Returns:
String THID of row
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

flagsunused ~ defaults to zero

Definition at line 395 of file cmcRowSet.cpp.

long getRowLong ( long  row,
long  col 
) [virtual, slot]

extended: Get a Row Long by column number

Returns:
Integer value of row and column
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

colindex ~ (firstCol <= col <= lastCol)

Definition at line 545 of file cmcRowSet.cpp.

long getRowLong ( long  col) [virtual, slot]

Get a Row Long
.

Definition at line 540 of file cmcRowSet.cpp.

long getRowLong ( const QString &  col) [virtual, slot]

Get a Row Long
.

Definition at line 553 of file cmcRowSet.cpp.

long getRowLong ( long  row,
const QString &  col 
) [virtual, slot]

extended: Get a Row Long by column name

Returns:
Integer value of row and column
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

colname ~ text label of column

Definition at line 558 of file cmcRowSet.cpp.

QString getRowString ( long  col) [virtual, slot]

Get a Row String
.

Definition at line 505 of file cmcRowSet.cpp.

QString getRowString ( long  row,
long  col 
) [virtual, slot]

extended: Get a Row String by column number

Returns:
String value of row and column
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

colindex ~ (firstCol <= col <= lastCol)

Definition at line 500 of file cmcRowSet.cpp.

QString getRowString ( const QString &  col) [virtual, slot]

Get the Row String by column number
.

Definition at line 510 of file cmcRowSet.cpp.

QString getRowString ( long  row,
const QString &  col 
) [virtual, slot]

extended: Get a Row String by column name

Returns:
String value of row and column
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

colname ~ text label of column

Definition at line 515 of file cmcRowSet.cpp.

QString getRowTHID ( ) [virtual, slot]

Get the Row THID
.

Definition at line 473 of file cmcRowSet.cpp.

QString getRowTHID ( long  row) [virtual, slot]

Get Row ID Alias
.

Definition at line 468 of file cmcRowSet.cpp.

QString getRowValue ( long  row,
const QString &  col 
) [virtual, slot]

extended: Get a Row Value (String) by column name

Returns:
String value of row and column
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

colname ~ text label of column

Definition at line 384 of file cmcRowSet.cpp.

QString getRowValue ( long  row,
long  col,
long  flags = 0 
) [virtual, slot]

Get a Row Value (String) by column number
.

Returns:
String value of row and column
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

colindex ~ (firstCol <= col <= lastCol)

flagsunused ~ defaults to zero

Definition at line 315 of file cmcRowSet.cpp.

QString getRowVar ( long  col,
const QString &  field 
) [virtual, slot]

Get a Row Var
.

Definition at line 564 of file cmcRowSet.cpp.

QString getRowVar ( long  row,
long  col,
const QString &  field 
) [virtual, slot]

Get Row Var
.

This gets a var value from a column

Definition at line 573 of file cmcRowSet.cpp.

QString getRowVar ( const QString &  col,
const QString &  field 
) [virtual, slot]

Get a Row Var
.

Definition at line 583 of file cmcRowSet.cpp.

QString getRowVar ( long  row,
const QString &  col,
const QString &  field 
) [virtual, slot]

Get a Row Var
.

Definition at line 592 of file cmcRowSet.cpp.

bool getShared ( long  row) [virtual, slot]

Get the Shared status of a Row
.

Definition at line 1170 of file cmcRowSet.cpp.

bool isDirty ( ) [virtual, slot]

True when the rowset is dirty (needs a commit)
.

See also:
commit

Definition at line 1086 of file cmcRowSet.cpp.

long lastCol ( ) [virtual, slot]

Return the last column index
.

This is an alias for lastColumn().

vbScript Example ~ Using lastCol
 dim i: for i = rs.firstCol to rs.lastCol
   dexe.debug rs.getRowValue(0,i)
 next
See also:
lastRow, lasColumn, firstColumn, firstCol, firstRow
Returns:
lastColumn()

Definition at line 1081 of file cmcRowSet.cpp.

long lastColumn ( ) [virtual, slot]

Return the last column index
.

This function returns the columnCount() - 1 value. It is used to make for/next loops look a little cleaner:

vbScript Example ~ Using lastColumn
 dim i: for i = rs.firstColumn to rs.lastColumn
   dexe.debug rs.getRowValue(0,i)
 next
See also:
lastRow, lastCol, firstRow, firstColumn, firstCol
Returns:
columnCount - 1

Definition at line 1076 of file cmcRowSet.cpp.

long lastRow ( ) [virtual, slot]

Return the last row index
.

This function returns the rowCount() - 1 value. It is used to make for/next loops look a little cleaner:

vbScript Example ~ Using lastRow
 dim i: for i = rs.firstRow to rs.lastRow
   dexe.debug rs.getRowValue(i,0)
 next
See also:
lastColumn, lastCol, firstRow, firstColumn, firstCol
Returns:
rowCount() - 1

Definition at line 1071 of file cmcRowSet.cpp.

long modifyRow ( long  row,
long  col,
const QString &  value,
long  flags = 0 
) [virtual, slot]

Modify a Row String by column number
.

Note:
Calling this function from a rowset other than Add or Edit row set will generate an error.
Attention:
There appears to be a bug within Commence regarding this function. While it has been demonstrated as being possible to make a connection setting using this function, internally Commence appears to be generating an error-code result. Flag options have been provided with this wrapper to override the regular error reporting, but I am still uncertain if this is an error within Commence (that it's generating an error on call) or if Commence is not suppose to be allowing connections to be made from the cursor.rowset.modifyRow function.
vbScript Example ~ Setting Related Columns
 cursor.setRelatedColumn "Attendee", "Contacts", "Contact Name"
 dim rs: set rs = cursor.getEditRowSet

 '
 ' This resets all the assigned staff persons on the docket
 '
 dim i: for i = rs.firstRow to rs.lastRow
   rs.modifyRow i, 0, "" ' clear the connection
   dim j: for j = 0 To UBound(staff) - 1
     rs.modifyRow i, 0, staff(j), 2 ' note: (2) cmcRowSet override (hide errors)
   next
 next
 rs.commit
The preceeding code actually works, and it does not generate any errors, and the connections are reassigned as expected. However, if the (2) cmcRowSet override had not been applied the user would be looking at a handful of error messages.
Here is an example of the output of error codes the user would see if he did not override the error handling:
Error Messages when setting related columns
 FAILED(8000001f): modifyRow(category='Calendar', row=0, col=0 'Attendee Contacts Contact Name', buf='Tom', flags=0)
 FAILED(8000001f): modifyRow(category='Calendar', row=0, col=0 'Attendee Contacts Contact Name', buf='Dick', flags=0)
 FAILED(8000001f): modifyRow(category='Calendar', row=0, col=0 'Attendee Contacts Contact Name', buf='Harry', flags=0)
 FAILED(8000001f): modifyRow(category='Calendar', row=1, col=0 'Attendee Contacts Contact Name', buf='Tom', flags=0)
 FAILED(8000001f): modifyRow(category='Calendar', row=1, col=0 'Attendee Contacts Contact Name', buf='Dick', flags=0)
 FAILED(8000001f): modifyRow(category='Calendar', row=1, col=0 'Attendee Contacts Contact Name', buf='Harry', flags=0)
As it turns out, the "bug" can be attributed to opening the cursor in USE_THIDS mode. When opened in this mode, setting connections must be performed using THID values rather than categoryKey values.
Returns:
Integer ~ 0 on success, -1 on error
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

colindex ~ (firstCol <= col <= lastCol)

valuestring value

flagsoptional ~ defaults to zero.
  • flags=1 causes this function to check the current value of the row before applying the modification.
  • flags=2 causes this function to ignore return error codes from Commence

Definition at line 666 of file cmcRowSet.cpp.

long modifyRow ( long  row,
const QString &  col,
const QString &  value,
long  flags = 0 
) [virtual, slot]

extended: Modify a Row String by column name

Note:
Calling this function from a rowset other than Add or Edit row set will generate an error.
Returns:
Integer ~ 0 on success, -1 on error
Parameters:
rowindex ~ (firstRow <= row <= lastRow)

colname ~ text label of column

valuestring value
flagsoptional ~ defaults to zero.

Definition at line 808 of file cmcRowSet.cpp.

long rowCount ( ) [virtual, slot]

Rowset Row Count
.

The Row Count value returns the number of rows requested for this rowset object when it was requested. This may not necessarily be the same number of rows that the hosting cursor contains.

See also:
columnCount, colCount
Returns:
Integer value of RowSet item count

Definition at line 115 of file cmcRowSet.cpp.

bool rowInRange ( long  row) [virtual, slot]

extended: Quick Row Range Test

This is a handy function for determining quickly if an index variable is within the row range of the rowset.

See also:
colInRange, rowCount, columnCount, colCount
Returns:
bool True if index value is within range
Parameters:
rowindex value to be checked

Definition at line 136 of file cmcRowSet.cpp.

QString setRowGUID ( long  row) [virtual, slot]

This sets a GUID on a Row
.

Definition at line 640 of file cmcRowSet.cpp.

bool setShared ( long  row) [virtual, slot]

Make a row Shared
.

Definition at line 1104 of file cmcRowSet.cpp.

bool setTimeStamp ( long  row) [virtual, slot]

Set Time Stamp
.

This will set the Time Stamp fields on the row. In order for this function to operate properly, the category must have a Var field available.

The timestamp fields appear on the item as follows:

 guid={d3c8e674-84b9-4ce9-b960-15fb442248b1}
 cmcID=nothing
 createdOn=20101011170217
 createdBy=MWP
 changedOn=20101011173130
 changedBy=CWG
Note:
In order for this function to work properly, you must expose the var field in your rowset.

Definition at line 1234 of file cmcRowSet.cpp.

long type ( ) [virtual, slot]

extended: RowSet Type ID

This returns a type number for the type of RowSet object implemented here. This single RowSet class handles the interface for any one of the four rowset types and different functions are available depending on the type of rowset created. This type variable determines that functionality.

vbScript Example ~ Reading the RowSet Type
 if( rs.type = 2 ) then
   dexe.debug "this is an ADD rowset"
 end if
Note:
This is mostly an internal function
See also:
ROWSET_TYPES, typeName
Returns:
Integer value of RowSet type

Definition at line 89 of file cmcRowSet.cpp.

QString typeName ( void  ) [slot]

extended: RowSet Type Name

See also:
ROWSET_TYPES, type
Returns:
String value of current RowSet Type

Definition at line 84 of file cmcRowSet.cpp.

QString typeName ( long  type) [static, slot]

extended: RowSet Type Name

This function is used to convert a rowset-type-code into a string value. It is used when building the request for Commence since Commence requires a string-type request for the API.

vbScript Example ~ Making a RowSet Type String Message
 dexe.debug "Get" & rs.typeName(2) & "RowSetByID"
 ' result: "GetAddRowSetByID"
Note:
This is mostly an internal function
See also:
ROWSET_TYPES, type
Returns:
String value of RowSet Type

Definition at line 69 of file cmcRowSet.cpp.

QString varValue ( long  row,
const QString &  col,
const QString &  field 
) [virtual, slot]

Get a Var Value
.

Definition at line 613 of file cmcRowSet.cpp.

QString varValue ( const QString &  col,
const QString &  field 
) [virtual, slot]

Get a Var Value
.

Definition at line 632 of file cmcRowSet.cpp.

QString varValue ( long  col,
const QString &  field 
) [virtual, slot]

Get a Var Value
.

Definition at line 623 of file cmcRowSet.cpp.

QString varValue ( long  row,
long  col,
const QString &  field 
) [virtual, slot]

Get a Var Value
.

Definition at line 603 of file cmcRowSet.cpp.


Member Data Documentation

QString m_categoryName [private]

Category Name Cache
.

We cache the category name here because it is possible that the cursor might disappear on us while we are still in existance.

Definition at line 1170 of file cmcRowSet.h.

long m_colCount [private]

Column Count Cache
.

This is a column count cache - since the colCount doesn't change after the object has been instantiated.

See also:
columnCount, colCount, colInRange

Definition at line 1219 of file cmcRowSet.h.

QHash<QString,long> m_columns [private]

Column Name Map Cache
.

This records the column mapping. It's purpose is to expedite the lookup of the column numbers.

Definition at line 1237 of file cmcRowSet.h.

long m_currentSelection [private]

Current Row Selection
.

This emulates the currentSelection() function like what's on the Connection object.

Definition at line 1246 of file cmcRowSet.h.

QPointer<cmcCursor> m_cursor [private]

Originating Cursor Pointer
.

Maintain a reference to the cursor that created this object. Note that we are using a QPointer to make this reference, causing the pointer to automatically cleared if the cursor object is destroyed.

Definition at line 1180 of file cmcRowSet.h.

bool m_dirty [private]

RowSet Dirty Indicator
.

This is true when the rowset goes dirty. It goes dirty when something is written to one of the columns

Definition at line 1228 of file cmcRowSet.h.

long m_flags [private]

RowSet Flags
.

These flags were passed in on the constructor. Not sure what they're for.

Definition at line 1188 of file cmcRowSet.h.

long m_rowCount [private]

RowCount Cache
.

This is a row count cache - since the rowCount doesn't change after the object has been instantiated.

See also:
rowCount, rowInRange

Definition at line 1209 of file cmcRowSet.h.

long m_type [private]

Rowset Type
.

This type is set by the subclass (add, query, edit, delete) rowset. Note that this is very un-object-oriented-like, for a base class to know about its derived classes, but we're talking about Commence here.

See also:
ROWSET_TYPES

Definition at line 1199 of file cmcRowSet.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com