[][src]Struct tarantool_module::Space

pub struct Space { /* fields omitted */ }

Implementations

impl Space[src]

pub fn find_by_name(name: &str) -> Result<Option<Self>, Error>[src]

Find space id by name.

This function performs SELECT request to _vspace system space.

  • name - space name

Returns:

  • None if not found
  • Some(space) otherwise

See also: index_by_name

pub fn index_by_name(&self, name: &str) -> Result<Option<Index>, Error>[src]

Find index id by name.

This function performs SELECT request to _vindex system space.

  • name - index name

Returns:

  • None if not found
  • Some(index) otherwise

See also: find_by_name

pub fn primary_key(&self) -> Index[src]

Returns index with id = 0

pub fn insert<T>(
    &mut self,
    value: &T,
    with_result: bool
) -> Result<Option<Tuple>, Error> where
    T: AsTuple
[src]

Execute an INSERT request.

  • value - tuple value to insert
  • with_result - indicates if result is required. If false - successful result will always contain None

Returns a new tuple.

See also: box.space[space_id]:insert(tuple)

pub fn replace<T>(
    &mut self,
    value: &T,
    with_result: bool
) -> Result<Option<Tuple>, Error> where
    T: AsTuple
[src]

Execute an REPLACE request.

  • value - tuple value to replace with
  • with_result - indicates if result is required. If false - successful result will always contain None

Returns a new tuple.

See also: box.space[space_id]:replace(tuple)

pub fn truncate(&mut self) -> Result<(), Error>[src]

Truncate space.

Auto Trait Implementations

impl RefUnwindSafe for Space

impl Send for Space

impl Sync for Space

impl Unpin for Space

impl UnwindSafe for Space

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.