[−][src]Function eosio_cdt_sys::db_get_i64
pub unsafe extern "C" fn db_get_i64(
iterator: i32,
data: *const c_void,
len: u32
) -> i32
Get a record in a primary 64-bit integer index table
@brief Get a record in a primary 64-bit integer index table
@param iterator - The iterator to the table row containing the record to retrieve
@param data - Pointer to the buffer which will be filled with the retrieved record
@param len - Size of the buffer
@return size of the data copied into the buffer if len > 0
, or size of the retrieved record if len == 0
.
@pre iterator
points to an existing table row in the table
@pre data
is a valid pointer to a range of memory at least len
bytes long
@post data
will be filled with the retrieved record (truncated to the first len
bytes if necessary)
Example:
@code char value[50]; auto len = db_get_i64(itr, value, 0); eosio_assert(len <= 50, "buffer to small to store retrieved record"); db_get_i64(itr, value, len); @endcode