pub trait MetadataAccessor {
// Required methods
fn get_length(&self, table_ref: &TableRef) -> usize;
fn get_offset(&self, table_ref: &TableRef) -> usize;
}
Expand description
Access metadata of a table span in a database.
Both Prover and Verifier use this information when processing a query.
Note: we assume that the query has already been validated so that we will only be accessing information about tables that exist in the database.
Required Methods§
Sourcefn get_length(&self, table_ref: &TableRef) -> usize
fn get_length(&self, table_ref: &TableRef) -> usize
Return the data span’s length in the table (not the full table length)
Sourcefn get_offset(&self, table_ref: &TableRef) -> usize
fn get_offset(&self, table_ref: &TableRef) -> usize
Return the data span’s offset in the table
If the data span has its first row starting at the ith table row,
this get_offset
should then return i
.