[−][src]Function eosio_cdt_sys::db_previous_i64
pub unsafe extern "C" fn db_previous_i64(
iterator: i32,
primary: *mut u64
) -> i32
Find the table row preceding the referenced table row in a primary 64-bit integer index table
@brief Find the table row preceding the referenced table row in a primary 64-bit integer index table
@param iterator - The iterator to the referenced table row
@param primary - Pointer to a uint64_t
variable which will have its value set to the primary key of the previous table row
@return iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table)
@pre iterator
points to an existing table row in the table or it is the end iterator of the table
@post *primary
will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise *primary
will be left untouched
Example:
@code uint64_t prim = 0; int32_t itr_prev = db_previous_i64(itr, &prim); @endcode