[−][src]Trait eosio_cdt::TableIndex
Table index
Associated Types
type Cursor: TableCursor<T> + 'a
The kind of cursor this table index uses
Required methods
fn code(&'a self) -> AccountName
Returns the account name of the smart contract
fn scope(&'a self) -> ScopeName
Returns the table scope
fn lower_bound<N: Into<K>>(&'a self, key: N) -> Option<Self::Cursor>
Returns a cursor pointing to the first row that matches a key
fn upper_bound<N: Into<K>>(&'a self, key: N) -> Option<Self::Cursor>
Returns a cursor pointing to the last row that matches a key
fn emplace<I: Borrow<T::Row>>(
&'a self,
payer: AccountName,
item: I
) -> Result<(), WriteError>
&'a self,
payer: AccountName,
item: I
) -> Result<(), WriteError>
Inserts a new row into the table
Errors
Will return Err
if there was an issue serializing the value.
fn find<N: Into<K>>(&'a self, key: N) -> Option<Self::Cursor>
Provided methods
fn exists<N: Into<K>>(&'a self, key: N) -> bool
Returns true if the table contains a row with the specified primary key
Implementations on Foreign Types
impl<'a, T> TableIndex<'a, u64, T> for PrimaryTableIndex<T> where
T: Table + 'a,
[src]
T: Table + 'a,
type Cursor = PrimaryTableCursor<T>
#[must_use]
fn code(&self) -> AccountName
[src]
#[must_use]
fn scope(&self) -> ScopeName
[src]
fn lower_bound<N: Into<u64>>(&'a self, key: N) -> Option<Self::Cursor>
[src]
fn upper_bound<N: Into<u64>>(&'a self, key: N) -> Option<Self::Cursor>
[src]
fn emplace<I: Borrow<T::Row>>(
&self,
payer: AccountName,
item: I
) -> Result<(), WriteError>
[src]
&self,
payer: AccountName,
item: I
) -> Result<(), WriteError>
fn find<Id>(&'a self, id: Id) -> Option<PrimaryTableCursor<T>> where
Id: Into<u64>,
[src]
Id: Into<u64>,
Returns a cursor pointing to a row with the specified primary key, if it exists
impl<'a, K, T> TableIndex<'a, K, T> for SecondaryTableIndex<K, T> where
K: IntoNativeSecondaryKey + 'a,
T: Table + 'a,
[src]
K: IntoNativeSecondaryKey + 'a,
T: Table + 'a,
type Cursor = SecondaryTableCursor<'a, K, T>
#[must_use]
fn code(&'a self) -> AccountName
[src]
#[must_use]
fn scope(&'a self) -> ScopeName
[src]
fn lower_bound<N: Into<K>>(&'a self, key: N) -> Option<Self::Cursor>
[src]
fn upper_bound<N: Into<K>>(&'a self, key: N) -> Option<Self::Cursor>
[src]
fn find<N: Into<K>>(&'a self, key: N) -> Option<Self::Cursor>
[src]
fn emplace<I: Borrow<T::Row>>(
&self,
payer: AccountName,
item: I
) -> Result<(), WriteError>
[src]
&self,
payer: AccountName,
item: I
) -> Result<(), WriteError>