pub struct Transaction<'a, S> {
stash: &'a mut S,
databases: TableTransaction<DatabaseKey, DatabaseValue>,
schemas: TableTransaction<SchemaKey, SchemaValue>,
items: TableTransaction<ItemKey, ItemValue>,
roles: TableTransaction<RoleKey, RoleValue>,
compute_instances: TableTransaction<ComputeInstanceKey, ComputeInstanceValue>,
compute_instance_replicas: TableTransaction<ComputeInstanceReplicaKey, ComputeInstanceReplicaValue>,
introspection_sources: TableTransaction<ComputeIntrospectionSourceIndexKey, ComputeIntrospectionSourceIndexValue>,
id_allocator: TableTransaction<IdAllocKey, IdAllocValue>,
audit_log_updates: Vec<(AuditLogKey, (), i64)>,
}
Fields
stash: &'a mut S
databases: TableTransaction<DatabaseKey, DatabaseValue>
schemas: TableTransaction<SchemaKey, SchemaValue>
items: TableTransaction<ItemKey, ItemValue>
roles: TableTransaction<RoleKey, RoleValue>
compute_instances: TableTransaction<ComputeInstanceKey, ComputeInstanceValue>
compute_instance_replicas: TableTransaction<ComputeInstanceReplicaKey, ComputeInstanceReplicaValue>
introspection_sources: TableTransaction<ComputeIntrospectionSourceIndexKey, ComputeIntrospectionSourceIndexValue>
id_allocator: TableTransaction<IdAllocKey, IdAllocValue>
audit_log_updates: Vec<(AuditLogKey, (), i64)>
Implementations
sourceimpl<'a, S: Append> Transaction<'a, S>
impl<'a, S: Append> Transaction<'a, S>
pub fn loaded_items(&self) -> Vec<(GlobalId, QualifiedObjectName, Vec<u8>)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn insert_audit_log_event(&mut self, event: VersionedEvent)
pub fn insert_database(
&mut self,
database_name: &str
) -> Result<DatabaseId, Error>
pub fn insert_schema(
&mut self,
database_id: DatabaseId,
schema_name: &str
) -> Result<SchemaId, Error>
pub fn insert_role(&mut self, role_name: &str) -> Result<u64, Error>
sourcepub fn insert_compute_instance(
&mut self,
cluster_name: &str,
config: &Option<ComputeInstanceIntrospectionConfig>,
introspection_sources: &Vec<(&'static BuiltinLog, GlobalId)>
) -> Result<ComputeInstanceId, Error>
pub fn insert_compute_instance(
&mut self,
cluster_name: &str,
config: &Option<ComputeInstanceIntrospectionConfig>,
introspection_sources: &Vec<(&'static BuiltinLog, GlobalId)>
) -> Result<ComputeInstanceId, Error>
Panics if any introspection source id is not a system id
pub fn insert_compute_instance_replica(
&mut self,
compute_name: &str,
replica_name: &str,
config: &ConcreteComputeInstanceReplicaConfig
) -> Result<ReplicaId, Error>
pub fn insert_item(
&mut self,
id: GlobalId,
schema_id: SchemaId,
item_name: &str,
item: &[u8]
) -> Result<(), Error>
pub fn get_and_increment_id(&mut self, key: String) -> Result<u64, Error>
pub fn remove_database(&mut self, id: &DatabaseId) -> Result<(), Error>
pub fn remove_schema(
&mut self,
database_id: &DatabaseId,
schema_id: &SchemaId
) -> Result<(), Error>
pub fn remove_role(&mut self, name: &str) -> Result<(), Error>
pub fn remove_compute_instance(
&mut self,
name: &str
) -> Result<Vec<GlobalId>, Error>
pub fn remove_compute_instance_replica(
&mut self,
name: &str,
compute_id: ComputeInstanceId
) -> Result<(), Error>
pub fn remove_item(&mut self, id: GlobalId) -> Result<(), Error>
pub fn update_item(
&mut self,
id: GlobalId,
item_name: &str,
item: &[u8]
) -> Result<(), Error>
pub async fn commit(self) -> Result<(), Error>
Auto Trait Implementations
impl<'a, S> RefUnwindSafe for Transaction<'a, S> where
S: RefUnwindSafe,
impl<'a, S> Send for Transaction<'a, S> where
S: Send,
impl<'a, S> Sync for Transaction<'a, S> where
S: Sync,
impl<'a, S> Unpin for Transaction<'a, S>
impl<'a, S> !UnwindSafe for Transaction<'a, S>
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> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T
in a tonic::Request
sourceimpl<P, R> ProtoType<R> for P where
R: RustType<P>,
impl<P, R> ProtoType<R> for P where
R: RustType<P>,
sourcefn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See RustType::from_proto
.
sourcefn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See RustType::into_proto
.
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