Struct springql_core::api::SpringPipeline
source · [−]pub struct SpringPipeline(_);
Expand description
Pipeline.
Implementations
sourceimpl SpringPipeline
impl SpringPipeline
sourcepub fn new(config: &SpringConfig) -> Result<Self>
pub fn new(config: &SpringConfig) -> Result<Self>
Creates and open an in-process stream pipeline.
sourcepub fn command<S: AsRef<str>>(&self, sql: S) -> Result<()>
pub fn command<S: AsRef<str>>(&self, sql: S) -> Result<()>
Execute commands (DDL).
Failure
- SpringError::Sql when:
- Invalid SQL syntax.
- Refers to undefined objects (streams, pumps, etc)
- Other semantic errors.
- SpringError::InvalidOption when:
OPTIONS
inCREATE
statement includes invalid key or value.
sourcepub fn pop(&self, queue: &str) -> Result<SpringRow>
pub fn pop(&self, queue: &str) -> Result<SpringRow>
Pop a row from an in memory queue. This is a blocking function.
Do not call this function from threads.
If you need to pop from multiple in-memory queues using threads, use spring_pop_non_blocking()
.
See: https://github.com/SpringQL/SpringQL/issues/125
Failure
- SpringError::Unavailable when:
- queue named
queue
does not exist.
- queue named
sourcepub fn pop_non_blocking(&self, queue: &str) -> Result<Option<SpringRow>>
pub fn pop_non_blocking(&self, queue: &str) -> Result<Option<SpringRow>>
Pop a row from an in memory queue. This is a non-blocking function.
Returns
Ok(Some)
when at least a row is in the queue.None
when no row is in the queue.
Failure
- SpringError::Unavailable when:
- queue named
queue
does not exist.
- queue named
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SpringPipeline
impl Send for SpringPipeline
impl Sync for SpringPipeline
impl Unpin for SpringPipeline
impl UnwindSafe for SpringPipeline
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more