ICursor –. More..
#include <dbapi/dbapi.hpp>
Public Member Functions | |
virtual | ~ICursor () |
Destructor. More.. | |
virtual void | SetParam (constCVariant &v, constCDBParamVariant ¶m)=0 |
Set input parameter. More.. | |
virtual IResultSet * | Open ()=0 |
Open cursor and get corresponding resultset. More.. | |
virtual NCBI_DEPRECATEDCNcbiOstream & | GetBlobOStream (unsigned int col, size_t blob_size, TBlobOStreamFlagsflags=0, size_t buf_size=0)=0 |
Get output stream for BLOB updates, requires BLOB column number. More.. | |
virtual NCBI_DEPRECATEDCNcbiOstream & | GetBlobOStream (unsigned int col, size_t blob_size, EAllowLog log_it, size_t buf_size=0) |
virtual NCBI_DEPRECATEDIWriter * | GetBlobWriter (unsigned int col, size_t blob_size, TBlobOStreamFlagsflags=0)=0 |
Get Blob Writer. More.. | |
virtual NCBI_DEPRECATEDIWriter * | GetBlobWriter (unsigned int col, size_t blob_size, EAllowLog log_it) |
virtual void | Update (conststring &table, conststring &updateSql)=0 |
Update statement for cursor. More.. | |
virtual void | Delete (conststring &table)=0 |
Delete statement for cursor. More.. | |
virtual void | Cancel ()=0 |
Cancel cursor. More.. | |
virtual void | Close ()=0 |
Close cursor. More.. | |
virtual class IConnection * | GetParentConn ()=0 |
Get the parent connection. More.. |
AlarmClock; BlockedNumberContract; BlockedNumberContract.BlockedNumbers; Browser; CalendarContract; CalendarContract.Attendees; CalendarContract.CalendarAlerts. The biggest problem was the Reset method because an ICursor doesn't have a reset method. I decided to set the cursor null and the recreated at the moment that MoveNext is called. This also makes sure the ICursor is only created when we really need it. Below you can find my full class.
Detailed Description
ICursor –.
Interface for a cursor.
Definition at line 563 of file dbapi.hpp.
Constructor & Destructor Documentation
◆ ~ICursor()
Destructor.
Definition at line 148 of file dbapi.cpp.
Member Function Documentation
◆ Cancel()
Cancel cursor.
Implemented in CCursor.
◆ Close()
Close cursor.
Implemented in CCursor.
◆ Delete()
| pure virtual |
Delete statement for cursor.
table | table name. |
Implemented in CCursor.
◆ GetBlobOStream() [1/2]
| pure virtual |
Get output stream for BLOB updates, requires BLOB column number.
col | Column number. |
blob_size | blob_size is the size of the BLOB to be written. |
flags |
- See also
- EBlobOStreamFlags.
buf_size | The size of internal buffer, default 4096. |
- Deprecated:
- Please use IStatement::GetBlobOStream instead.
- See also
- IStatement::GetBlobOStream
Implemented in CCursor.
Referenced by CCursor::GetBlobOStream(), and GetBlobOStream().
◆ GetBlobOStream() [2/2]
| virtual |
Reimplemented in CCursor.
Definition at line 152 of file dbapi.cpp.
References eDisableLog, fBOS_SkipLogging, and GetBlobOStream().
◆ GetBlobWriter() [1/2]
| pure virtual |
Get Blob Writer.
Implementation of IWriter interface
col | Column number. |
blob_size | blob_size is the size of the BLOB to be written. |
flags |
- See also
- EBlobOStreamFlags.
- Deprecated:
- Please use IStatement::GetBlobWriter instead.
- See also
- IStatement::GetBlobWriter
Implemented in CCursor.
Referenced by CCursor::GetBlobWriter(), and GetBlobWriter(). Sims 3 download game for mac.
◆ GetBlobWriter() [2/2]
| virtual |
Reimplemented in CCursor.
Definition at line 160 of file dbapi.cpp.
References eDisableLog, fBOS_SkipLogging, and GetBlobWriter().
◆ GetParentConn()
| pure virtual |
Get the parent connection.
NOTE: If the original connections was cloned, returns cloned connection.
Implemented in CCursor.
◆ Open()
Open cursor and get corresponding resultset.
Implemented in CCursor.
Referenced by CDbapiTest::Run().
◆ SetParam()
| pure virtual |
Set input parameter.
v | Parameter value. |
name | Parameter name. |
Implemented in CCursor.
◆ Update()
| pure virtual |
Update statement for cursor.
table | table name. |
updateSql | SQL statement. |
Implemented in CCursor.
Referenced by CDbapiTest::Run().
The documentation for this class was generated from the following files:- include/dbapi/dbapi.hpp
- src/dbapi/dbapi.cpp
Provides access to members that hand out enumerated rows, field collections and allows for the updating, deleting and inserting of rows.
Product Availability
Cursor
Cursor Pointer
Members
Description | |
---|---|
DeleteRow | Delete the existing Row in the database corresponding to the current position of the cursor. |
Fields | The Fields Collection for this cursor. |
FindField | The index of the field with the specified name. |
Flush | Flush any outstanding buffered writes to the database. |
InsertRow | Insert a new Row into the database using the property values in the input buffer. The object ID of the new Row, if there is one, is returned. |
NextRow | Advance the position of the cursor by one and return the Row object at that position. |
UpdateRow | Update the existing Row in the database corresponding to the current position of the cursor. |
CoClasses that implement ICursor
CoClasses and Classes | Description |
---|---|
Cursor | Esri Cursor object. |
FeatureCursor | Esri Feature Cursor object. |
RelQueryCursor | A cursor that is opened from a RelQueryTable. |
TemporalCursor (esriTrackingAnalyst) | Controls settings for the temporal cursor. |
Remarks
Cursors are forward only; they do not support backing up and retrieving rows that have already been retrieved or making multiple passes over data. If an application needs to make multiple passes over the data, the application needs to reexecute the query that returned the cursor. If both executions of the query are made within the same edit session (or database transaction with the appropriate level of isolation), the application is guaranteed not to see any changes made to the data by other concurrently executing applications.
Note that while a cursor is created in the client's memory after a call to methods such as ITable.Search or ITable.Insert, the DBMS cursor is not created until a call to NextRow (or a similar method) is made. This is why retrieving the first row may take longer than subsequent rows, and because underlying DBMS errors might be raised on the call, error handling is recommended.
When using cursors within an edit session, they should always be scoped to edit operations. In other words, a cursor should be created after an edit operation has begun and should not be used once that edit operation has been stopped or aborted.