[−][src]Struct tarantool_module::Space
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 foundSome(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 foundSome(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]
&mut self,
value: &T,
with_result: bool
) -> Result<Option<Tuple>, Error> where
T: AsTuple,
Execute an INSERT request.
value
- tuple value to insertwith_result
- indicates if result is required. Iffalse
- successful result will always containNone
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]
&mut self,
value: &T,
with_result: bool
) -> Result<Option<Tuple>, Error> where
T: AsTuple,
Execute an REPLACE request.
value
- tuple value to replace withwith_result
- indicates if result is required. Iffalse
- successful result will always containNone
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,