Implement simple result stepping in the MySQL module.

This commit is contained in:
Sandu Liviu Catalin
2016-06-29 18:31:10 +03:00
parent 03237f9c15
commit 7836f0ab23
4 changed files with 157 additions and 11 deletions
+40
View File
@@ -173,6 +173,46 @@ public:
return m_Handle;
}
/* --------------------------------------------------------------------------------------------
* Returns the current position of the row cursor for the last Next().
*/
Object RowIndex() const
{
return MakeULongObj(SQMOD_GET_CREATED(*this)->RowIndex());
}
/* --------------------------------------------------------------------------------------------
* Returns the number of rows in the result set.
*/
Object RowCount() const
{
return MakeULongObj(SQMOD_GET_CREATED(*this)->RowCount());
}
/* --------------------------------------------------------------------------------------------
* Retrieve the next row from the query.
*/
bool Next() const
{
return SQMOD_GET_CREATED(*this)->Next();
}
/* --------------------------------------------------------------------------------------------
* Seeks to an arbitrary row in a query result set.
*/
bool SetRowIndex(SQInteger index) const
{
return SQMOD_GET_CREATED(*this)->SetRowIndex(ConvTo< Uint64 >::From(index));
}
/* --------------------------------------------------------------------------------------------
* Seeks to an arbitrary row in a query result set.
*/
bool SetLongRowIndex(Object & index) const
{
return SQMOD_GET_CREATED(*this)->SetRowIndex(FetchULongObjVal(index));
}
/* --------------------------------------------------------------------------------------------
* Retrieve a signed 8 bit integer from a field.
*/