Package gen :: Package db :: Module dbdir :: Class GrampsDBDirAssocCursor
[frames] | no frames]

Class GrampsDBDirAssocCursor

source code


Instance Methods
 
__init__(self, source, txn=None) source code
 
first(self)
Return the first (index, data) pair in the database.
source code
 
next(self)
Return the next (index, data) pair in the database.
source code
 
close(self)
Close the cursor.
source code
 
delete(self) source code
 
get_length(self)
Return the number of records in the table referenced by the cursor.
source code
Method Details

first(self)

source code 

Return the first (index, data) pair in the database.

This should be called before the first call to next(). Note that the data return is in the format of the serialized format stored in the database, not in the more usable class object. The data should be converted to a class using the class's unserialize method.

If no data is available, None is returned.

Overrides: cursor.GrampsCursor.first
(inherited documentation)

next(self)

source code 

Return the next (index, data) pair in the database.

Like the first() method, the data return is in the format of the serialized format stored in the database, not in the more usable class object. The data should be converted to a class using the class's unserialize method.

None is returned when no more data is available.

Overrides: cursor.GrampsCursor.next
(inherited documentation)

close(self)

source code 

Close the cursor.

This should be called when the user is finished using the cursor, freeing up the cursor's resources.

Overrides: cursor.GrampsCursor.close
(inherited documentation)

get_length(self)

source code 

Return the number of records in the table referenced by the cursor.

Overrides: cursor.GrampsCursor.get_length
(inherited documentation)