Modules | Functions
Database Connectivity

Returns a designated set of versioned rows. More...

Modules

 Database Settings
 
 Database Interface
 
 Database Dialogs
 
 SQL Functions
 

Functions

Public int mdlDB_openCursorVersionWithID (CursorID *cursID, WCharCP SQLselectStmt, int versionSet)
 
Public long mdlDB_deletePendingVersion (WCharCP SQLdeleteStmt, int versionId)
 Deletes pending updates from file and restores previous current version values. More...
 

Detailed Description

Returns a designated set of versioned rows.

When run against a non-versioned table the only valid mode is MTVS_CURRENT.

Parameters
[out]cursIDidentical to mdlDB_openCursorWithID
[in]SQLselectStmtidentical to mdlDB_openCursorWithID
[in]versionSetMTVS_PENDG, MTVS_PAST, MTVS_CURRENT
Returns
SUCCESS or error code
Remarks
The 1st four columns returned are always: document_name NULL when mode is not MTVS_PENDING node_name NULL when mode is not MTVS_PENDING user_ID 0 when mode is not MTVS_PENDING version_ID followed by the other columns requested in SQL SELECT in the normal manner. Please note that the ODS columns are not returned when a "SELECT *" type statement is used.

The other select modes simply return rows in the normal manner w/o any implied columns. It is not intended that when a current record set (MTVS_CURRENT) is requested that this call is equivalent to mdlDB_openCursorWithID ; instead, it will return all current state records even though the user may have already made/created his own future state records via previous transactions. This could serve to access a base state or previous value prior to a commit; i.e. - the rows as seen by "others". this call then be followed by the normal mdlDB_fetchRowByID mdlDB_closeCursorByID sequence

Function Documentation

Public long mdlDB_deletePendingVersion ( WCharCP  SQLdeleteStmt,
int  versionId 
)

Deletes pending updates from file and restores previous current version values.

Parameters
[in]SQLdeleteStmtvalid SQL DELETE statement
[in]versionIdversion ID of pending row
Returns
Count of records deleted
Remarks
The designated pending row changes are deleted and will not participate in any future commit operation.
Public int mdlDB_openCursorVersionWithID ( CursorID cursID,
WCharCP  SQLselectStmt,
int  versionSet 
)

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.