pub struct SimplePostgresClient { /* private fields */ }
Implementations§
Source§impl SimplePostgresClient
impl SimplePostgresClient
pub fn build_single_token_owner_index_upsert_statement( client: &mut Client, config: &GeyserPluginPostgresConfig, ) -> Result<Statement, GeyserPluginError>
pub fn build_single_token_mint_index_upsert_statement( client: &mut Client, config: &GeyserPluginPostgresConfig, ) -> Result<Statement, GeyserPluginError>
Sourcepub fn build_bulk_token_index_insert_statement_common(
client: &mut Client,
table: &str,
source_key_name: &str,
config: &GeyserPluginPostgresConfig,
) -> Result<Statement, GeyserPluginError>
pub fn build_bulk_token_index_insert_statement_common( client: &mut Client, table: &str, source_key_name: &str, config: &GeyserPluginPostgresConfig, ) -> Result<Statement, GeyserPluginError>
Common build the token mint index bulk insert statement.
Sourcepub fn build_bulk_token_owner_index_insert_statement(
client: &mut Client,
config: &GeyserPluginPostgresConfig,
) -> Result<Statement, GeyserPluginError>
pub fn build_bulk_token_owner_index_insert_statement( client: &mut Client, config: &GeyserPluginPostgresConfig, ) -> Result<Statement, GeyserPluginError>
Build the token owner index bulk insert statement
Sourcepub fn build_bulk_token_mint_index_insert_statement(
client: &mut Client,
config: &GeyserPluginPostgresConfig,
) -> Result<Statement, GeyserPluginError>
pub fn build_bulk_token_mint_index_insert_statement( client: &mut Client, config: &GeyserPluginPostgresConfig, ) -> Result<Statement, GeyserPluginError>
Build the token mint index bulk insert statement.
Sourcepub fn bulk_insert_token_owner_index(&mut self) -> Result<(), GeyserPluginError>
pub fn bulk_insert_token_owner_index(&mut self) -> Result<(), GeyserPluginError>
Execute the token owner bulk insert query.
Sourcepub fn bulk_insert_token_mint_index(&mut self) -> Result<(), GeyserPluginError>
pub fn bulk_insert_token_mint_index(&mut self) -> Result<(), GeyserPluginError>
Execute the token mint index bulk insert query.
Sourcepub fn queue_secondary_indexes(&mut self, account: &DbAccountInfo)
pub fn queue_secondary_indexes(&mut self, account: &DbAccountInfo)
Queue bulk insert secondary indexes: token owner and token mint indexes.
Sourcepub fn update_token_owner_index(
client: &mut Client,
statement: &Statement,
account: &DbAccountInfo,
) -> Result<(), GeyserPluginError>
pub fn update_token_owner_index( client: &mut Client, statement: &Statement, account: &DbAccountInfo, ) -> Result<(), GeyserPluginError>
Function for updating a single token owner index.
Sourcepub fn update_token_mint_index(
client: &mut Client,
statement: &Statement,
account: &DbAccountInfo,
) -> Result<(), GeyserPluginError>
pub fn update_token_mint_index( client: &mut Client, statement: &Statement, account: &DbAccountInfo, ) -> Result<(), GeyserPluginError>
Function for updating a single token mint index.
Sourcepub fn clear_buffered_indexes(&mut self)
pub fn clear_buffered_indexes(&mut self)
Clean up the buffered indexes – we do not need to
write them to disk individually as they have already been handled
when the accounts were flushed out individually in upsert_account_internal
.
Source§impl SimplePostgresClient
impl SimplePostgresClient
pub fn connect_to_db( config: &GeyserPluginPostgresConfig, ) -> Result<Client, GeyserPluginError>
pub fn new( config: &GeyserPluginPostgresConfig, ) -> Result<Self, GeyserPluginError>
Trait Implementations§
Source§impl PostgresClient for SimplePostgresClient
impl PostgresClient for SimplePostgresClient
fn update_account( &mut self, account: DbAccountInfo, is_startup: bool, ) -> Result<(), GeyserPluginError>
fn update_slot_status( &mut self, slot: u64, parent: Option<u64>, status: SlotStatus, ) -> Result<(), GeyserPluginError>
fn notify_end_of_startup(&mut self) -> Result<(), GeyserPluginError>
fn log_transaction( &mut self, transaction_log_info: LogTransactionRequest, ) -> Result<(), GeyserPluginError>
fn update_block_metadata( &mut self, block_info: UpdateBlockMetadataRequest, ) -> Result<(), GeyserPluginError>
fn join(&mut self) -> Result<()>
Auto Trait Implementations§
impl !Freeze for SimplePostgresClient
impl RefUnwindSafe for SimplePostgresClient
impl Send for SimplePostgresClient
impl Sync for SimplePostgresClient
impl Unpin for SimplePostgresClient
impl UnwindSafe for SimplePostgresClient
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 more