pub struct ClientSession { /* private fields */ }Implementations§
Source§impl ClientSession
impl ClientSession
pub fn new(session: Session) -> Arc<Self> ⓘ
pub fn id(&self) -> i64
pub fn space(&self) -> Option<SpaceSummary>
pub fn set_space(&self, space: SpaceSummary)
pub fn clear_space(&self)
pub fn space_name(&self) -> Option<String>
pub fn user(&self) -> String
pub fn roles(&self) -> HashMap<i64, RoleType>
pub fn role_with_space(&self, space: i64) -> Option<RoleType>
pub fn is_god(&self) -> bool
pub fn is_admin(&self) -> bool
pub fn is_schema_admin(&self) -> bool
pub fn set_role(&self, space: i64, role: RoleType)
pub fn idle_seconds(&self) -> u64
pub fn charge(&self)
pub fn timezone(&self) -> Option<i32>
pub fn set_timezone(&self, timezone: i32)
pub fn graph_addr(&self) -> Option<String>
pub fn update_graph_addr(&self, host_addr: String)
pub fn get_session(&self) -> Session
pub fn update_space_name(&self, space_name: String)
pub fn add_query(&self, ep_id: u32, query_context: String)
Sourcepub fn register_streaming_query(
&self,
query_id: u32,
query_text: String,
runtime: Weak<ExecutionRuntime>,
)
pub fn register_streaming_query( &self, query_id: u32, query_text: String, runtime: Weak<ExecutionRuntime>, )
Register a streaming query with a weak runtime reference for KILL QUERY support.
Sourcepub fn unregister_streaming_query(&self, query_id: u32)
pub fn unregister_streaming_query(&self, query_id: u32)
Unregister a streaming query on completion.
pub fn delete_query(&self, ep_id: u32)
pub fn find_query(&self, ep_id: u32) -> bool
pub fn mark_query_killed(&self, ep_id: u32)
pub fn mark_all_queries_killed(&self)
pub fn active_queries_count(&self) -> usize
pub fn kill_query(&self, query_id: u32) -> QueryResult<()>
pub fn kill_multiple_queries(&self, query_ids: &[u32]) -> Vec<QueryResult<()>> ⓘ
Sourcepub fn open_cursor(
&self,
query: String,
result: StreamingQueryResult,
columns: Vec<String>,
) -> Result<u64, String>
pub fn open_cursor( &self, query: String, result: StreamingQueryResult, columns: Vec<String>, ) -> Result<u64, String>
Open a forward-only cursor over an already-started streaming result.
Sourcepub fn fetch_cursor_page(
&self,
cursor_id: u64,
page_size: usize,
) -> Result<CursorPage, String>
pub fn fetch_cursor_page( &self, cursor_id: u64, page_size: usize, ) -> Result<CursorPage, String>
Fetch one page from a cursor (blocking; run off the async runtime).
Sourcepub fn close_cursor(&self, cursor_id: u64) -> bool
pub fn close_cursor(&self, cursor_id: u64) -> bool
Release a cursor; returns false when the id was unknown.
Sourcepub fn close_all_cursors(&self)
pub fn close_all_cursors(&self)
Release every cursor held by this session.
Sourcepub fn cursor_count(&self) -> usize
pub fn cursor_count(&self) -> usize
Number of currently open cursors.
pub fn current_transaction(&self) -> Option<TransactionId>
pub fn bind_transaction(&self, txn_id: TransactionId)
pub fn unbind_transaction(&self)
pub fn has_active_transaction(&self) -> bool
pub fn is_auto_commit(&self) -> bool
pub fn set_auto_commit(&self, auto_commit: bool)
pub fn transaction_options(&self) -> TransactionOptions
pub fn set_transaction_options(&self, options: TransactionOptions)
pub fn push_savepoint(&self, savepoint_id: SavepointId)
pub fn savepoint_stack(&self) -> Vec<SavepointId> ⓘ
pub fn clear_savepoints(&self)
pub fn savepoint_count(&self) -> usize
pub fn statistics(&self) -> &SessionStatistics
Sourcepub fn set_variable(&self, name: String, value: Value)
pub fn set_variable(&self, name: String, value: Value)
Assign a session variable, recording a transaction overlay operation when an explicit transaction is active.
Sourcepub fn variable_value(&self, name: &str) -> Option<Value>
pub fn variable_value(&self, name: &str) -> Option<Value>
Effective value of a session variable: transaction overlay first, then the base store.
Sourcepub fn variables_snapshot(&self) -> HashMap<String, Value>
pub fn variables_snapshot(&self) -> HashMap<String, Value>
Snapshot of all session variables (base + overlay) for injection as query inputs.
Sourcepub fn commit_variables(&self)
pub fn commit_variables(&self)
COMMIT: apply overlay operations to the base store and clear the overlay (the last assignment of each variable wins).
Sourcepub fn rollback_variables(&self)
pub fn rollback_variables(&self)
Full ROLLBACK: restore pre-transaction values and clear the overlay.
Sourcepub fn rollback_variables_to(&self, savepoint_name: &str) -> bool
pub fn rollback_variables_to(&self, savepoint_name: &str) -> bool
ROLLBACK TO SAVEPOINT: restore values assigned after the named savepoint and truncate the overlay at the savepoint marker.
Sourcepub fn release_variable_savepoint(&self, savepoint_name: &str)
pub fn release_variable_savepoint(&self, savepoint_name: &str)
RELEASE SAVEPOINT: drop the marker (operations stay part of the transaction; they are no longer individually rollback-able).
Sourcepub fn push_variable_savepoint(&self, savepoint_name: &str)
pub fn push_variable_savepoint(&self, savepoint_name: &str)
SAVEPOINT: record a variable-overlay boundary so ROLLBACK TO can restore assignments made after the savepoint.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ClientSession
impl !RefUnwindSafe for ClientSession
impl !UnwindSafe for ClientSession
impl Send for ClientSession
impl Sync for ClientSession
impl Unpin for ClientSession
impl UnsafeUnpin for ClientSession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.