pub(crate) struct PreparedQueries {Show 26 fields
select_txo_ada: PreparedStatement,
delete_txo_ada: SkipMap<u16, Arc<Batch>>,
select_txo_assets: PreparedStatement,
delete_txo_assets: SkipMap<u16, Arc<Batch>>,
select_unstaked_txo_ada: PreparedStatement,
delete_unstaked_txo_ada: SkipMap<u16, Arc<Batch>>,
select_unstaked_txo_assets: PreparedStatement,
delete_unstaked_txo_assets: SkipMap<u16, Arc<Batch>>,
select_txi_by_hash: PreparedStatement,
delete_txi_by_hash: SkipMap<u16, Arc<Batch>>,
select_stake_registration: PreparedStatement,
delete_stake_registration: SkipMap<u16, Arc<Batch>>,
select_cip36_registration: PreparedStatement,
delete_cip36_registration: SkipMap<u16, Arc<Batch>>,
select_cip36_registration_invalid: PreparedStatement,
delete_cip36_registration_invalid: SkipMap<u16, Arc<Batch>>,
select_cip36_registration_for_vote_key: PreparedStatement,
delete_cip36_registration_for_vote_key: SkipMap<u16, Arc<Batch>>,
select_rbac509_registration: PreparedStatement,
delete_rbac509_registration: SkipMap<u16, Arc<Batch>>,
select_chain_root_for_txn_id: PreparedStatement,
delete_chain_root_for_txn_id: SkipMap<u16, Arc<Batch>>,
select_chain_root_for_role0_key: PreparedStatement,
delete_chain_root_for_role0_key: SkipMap<u16, Arc<Batch>>,
select_chain_root_for_stake_address: PreparedStatement,
delete_chain_root_for_stake_address: SkipMap<u16, Arc<Batch>>,
}
Expand description
All prepared purge queries for a session.
Fields§
§select_txo_ada: PreparedStatement
TXO ADA Primary Key Query.
delete_txo_ada: SkipMap<u16, Arc<Batch>>
TXO Delete Query.
select_txo_assets: PreparedStatement
TXO Asset Primary Key Query.
delete_txo_assets: SkipMap<u16, Arc<Batch>>
TXO Assets Delete Query.
select_unstaked_txo_ada: PreparedStatement
Unstaked TXO ADA Primary Key Query.
delete_unstaked_txo_ada: SkipMap<u16, Arc<Batch>>
Unstaked TXO ADA Delete Query.
select_unstaked_txo_assets: PreparedStatement
Unstaked TXO Assets Primary Key Query.
delete_unstaked_txo_assets: SkipMap<u16, Arc<Batch>>
Unstaked TXO Asset Delete Query.
select_txi_by_hash: PreparedStatement
TXI by TXN Hash by TXN Hash Primary Key Query.
delete_txi_by_hash: SkipMap<u16, Arc<Batch>>
TXI by TXN Hash Delete Query.
select_stake_registration: PreparedStatement
Stake Registration Primary Key Query.
delete_stake_registration: SkipMap<u16, Arc<Batch>>
Stake Registration Delete Query.
select_cip36_registration: PreparedStatement
CIP36 Registrations Primary Key Query.
delete_cip36_registration: SkipMap<u16, Arc<Batch>>
CIP36 Registrations Delete Query.
select_cip36_registration_invalid: PreparedStatement
CIP36 Registration Invalid Primary Key Query.
delete_cip36_registration_invalid: SkipMap<u16, Arc<Batch>>
CIP36 Registration Invalid Delete Query.
select_cip36_registration_for_vote_key: PreparedStatement
CIP36 Registration for Vote Key Primary Key Query.
delete_cip36_registration_for_vote_key: SkipMap<u16, Arc<Batch>>
CIP36 Registration for Vote Key Delete Query.
select_rbac509_registration: PreparedStatement
RBAC 509 Registrations Primary Key Query.
delete_rbac509_registration: SkipMap<u16, Arc<Batch>>
RBAC 509 Registrations Delete Query.
select_chain_root_for_txn_id: PreparedStatement
Chain Root for TX ID Primary Key Query..
delete_chain_root_for_txn_id: SkipMap<u16, Arc<Batch>>
Chain Root for TX ID Delete Query..
select_chain_root_for_role0_key: PreparedStatement
Chain Root for Role 0 Key Primary Key Query..
delete_chain_root_for_role0_key: SkipMap<u16, Arc<Batch>>
Chain Root for Role 0 Key Delete Query..
select_chain_root_for_stake_address: PreparedStatement
Chain Root for Stake Address Primary Key Query..
delete_chain_root_for_stake_address: SkipMap<u16, Arc<Batch>>
Chain Root for Stake Address Delete Query..
Implementations§
Source§impl PreparedQueries
impl PreparedQueries
Sourcepub(crate) async fn new(session: Arc<Session>, cfg: &EnvVars) -> Result<Self>
pub(crate) async fn new(session: Arc<Session>, cfg: &EnvVars) -> Result<Self>
Create new prepared queries for a given session.
Sourcepub(crate) async fn prepare(
session: Arc<Session>,
query: &str,
consistency: Consistency,
idempotent: bool,
) -> Result<PreparedStatement>
pub(crate) async fn prepare( session: Arc<Session>, query: &str, consistency: Consistency, idempotent: bool, ) -> Result<PreparedStatement>
Prepares a statement.
Sourcepub(crate) async fn prepare_batch(
session: Arc<Session>,
query: &str,
cfg: &EnvVars,
consistency: Consistency,
idempotent: bool,
logged: bool,
) -> Result<SkipMap<u16, Arc<Batch>>>
pub(crate) async fn prepare_batch( session: Arc<Session>, query: &str, cfg: &EnvVars, consistency: Consistency, idempotent: bool, logged: bool, ) -> Result<SkipMap<u16, Arc<Batch>>>
Prepares all permutations of the batch from 1 to max. It is necessary to do this because batches are pre-sized, they can not be dynamic. Preparing the batches in advance is a very larger performance increase.
Sourcepub(crate) async fn execute_iter(
&self,
session: Arc<Session>,
select_query: PreparedSelectQuery,
) -> Result<QueryPager>
pub(crate) async fn execute_iter( &self, session: Arc<Session>, select_query: PreparedSelectQuery, ) -> Result<QueryPager>
Executes a select query with the given parameters.
Returns an iterator that iterates over all the result pages that the query returns.
Sourcepub(crate) async fn execute_batch<T: SerializeRow + Debug>(
&self,
session: Arc<Session>,
cfg: Arc<EnvVars>,
query: PreparedDeleteQuery,
values: Vec<T>,
) -> Result<Vec<QueryResult>>
pub(crate) async fn execute_batch<T: SerializeRow + Debug>( &self, session: Arc<Session>, cfg: Arc<EnvVars>, query: PreparedDeleteQuery, values: Vec<T>, ) -> Result<Vec<QueryResult>>
Execute a purge query with the given parameters.
Auto Trait Implementations§
impl !Freeze for PreparedQueries
impl !RefUnwindSafe for PreparedQueries
impl Send for PreparedQueries
impl Sync for PreparedQueries
impl Unpin for PreparedQueries
impl !UnwindSafe for PreparedQueries
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§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
§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
§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.§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.§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.§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
§impl<T> Tap for T
impl<T> Tap for T
§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 more§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 more§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 more§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 more§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 more§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 more§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.§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.§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.§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.§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.§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.§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.