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 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