Skip to main content

AsyncNode

Struct AsyncNode 

Source
pub struct AsyncNode { /* private fields */ }
Expand description

Async VoltDB connection node

Implementations§

Source§

impl AsyncNode

Source

pub async fn new(opt: NodeOpt) -> Result<AsyncNode, VoltError>

Create a new async connection to VoltDB server

Source

pub fn get_sequence(&self) -> i64

Get the next sequence number for request tracking

Source

pub fn pending_count(&self) -> usize

Get the current pending request count (used for load balancing)

Source

pub fn conn_info(&self) -> &ConnInfo

Get connection info from authentication

Source

pub async fn list_procedures(&self) -> Result<Receiver<VoltTable>, VoltError>

List all stored procedures available in the database

Source

pub async fn call_sp( &self, query: &str, param: Vec<&dyn Value>, ) -> Result<Receiver<VoltTable>, VoltError>

Call a stored procedure with parameters

Source

pub async fn call_sp_with_timeout( &self, query: &str, param: Vec<&dyn Value>, _timeout_duration: Duration, ) -> Result<Receiver<VoltTable>, VoltError>

Call a stored procedure with custom timeout

Source

pub async fn upload_jar( &self, bs: Vec<u8>, ) -> Result<Receiver<VoltTable>, VoltError>

Upload a JAR file containing stored procedure classes

Source

pub async fn query(&self, sql: &str) -> Result<Receiver<VoltTable>, VoltError>

Execute an ad-hoc SQL query

Source

pub async fn ping(&self) -> Result<(), VoltError>

Send a ping to keep the connection alive

Source

pub async fn shutdown(&self) -> Result<(), VoltError>

Shutdown the connection gracefully

Trait Implementations§

Source§

impl Debug for AsyncNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for AsyncNode

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more