The Cursor class represents a cursor to iterate through instances of a specified class, the result set of a find/search operation, or the result set from SQL queries. It provides the following methods:
find(cls, idx, value) Find a database object of class clsby an indexidxand keyvalue(a DB API compliant call)search(cls, idx, op, value) Locate the position of a database object of class clsin an index idx and keyvalueusing the operationop(a DB API compliant call)checkpoint() Checkpoint the cursor; this updates the index for the any updated objects previously returned by the methods first(), last(), next(), prev()orskip().close() Close the cursor getAutoId() Get the autoidof the current objectfirst() Move cursor to the first position last() Move cursor to the last position next() Move cursor to the next position prev() Move cursor to the previous position skip() Move cursor to the next position without retrieving the element reset() Reset (rewind) the cursor current() Return the object to which the cursor is referring execute(query [,args]) Execute a SQL queryagainst the database substituting argumentsargsfor format specifiers in thequerystring (a DB API compliant call)execute_many(query, args) Execute a SQL queryagainst the database applying a set of parametersargs(a DB API compliant call)fetchone() Return the next row of result set (a DB API compliant call) fetchmany([size=cursor.arraysize]) Fetch the next set of rows from a result set optionally specifying the sizeof the resutl set (a DB API compliant call)fetchall() Fetch all (remaining) rows of a query result (a DB API compliant call) rowcount The Read-Only property that indicates the number of rows affected
- See also: Using Python with eXtremeDB