// file: kb_lib/src/db/queries.rs

//! Database queries.

mod analysis_signal;
mod chain_instruction;
mod chain_slot;
mod chain_transaction;
mod db_metadata;
mod db_runtime_event;
mod dex;
mod dex_decode_replay_ledger;
mod dex_decoded_event;
mod dex_event_coverage_entry;
mod fee_event;
mod fee_event_amount;
mod instruction_observation;
mod known_http_endpoint;
mod known_ws_endpoint;
mod launch_attribution;
mod launch_event;
mod launch_surface;
mod launch_surface_key;
mod liquidity_event;
mod local_dex_corpus_search;
mod local_pipeline_diagnostics;
mod observed_token;
mod onchain_observation;
mod orderbook_event;
mod pair;
mod pair_analytic_signal;
mod pair_candle;
mod pair_metric;
mod pool;
mod pool_admin_event;
mod pool_lifecycle_event;
mod pool_listing;
mod pool_origin;
mod pool_token;
mod program_instruction_diagnostic;
mod protocol_candidate;
mod reward_event;
mod swap;
mod token;
mod token_account_event;
mod token_burn_event;
mod token_mint_event;
mod trade_event;
mod transaction_classification;
mod wallet;
mod wallet_holding;
mod wallet_participation;

pub use analysis_signal::query_analysis_signals_insert;
pub use analysis_signal::query_analysis_signals_list;
pub use chain_instruction::query_chain_instructions_delete_by_transaction_id;
pub use chain_instruction::query_chain_instructions_get_by_id;
pub use chain_instruction::query_chain_instructions_insert;
pub use chain_instruction::query_chain_instructions_list_by_transaction_id;
pub use chain_slot::query_chain_slots_get;
pub use chain_slot::query_chain_slots_list_recent;
pub use chain_slot::query_chain_slots_upsert;
pub use chain_transaction::query_chain_transactions_get_by_signature;
pub use chain_transaction::query_chain_transactions_list_recent;
pub use chain_transaction::query_chain_transactions_list_signatures_for_replay;
pub use chain_transaction::query_chain_transactions_upsert;
pub use db_metadata::query_db_metadatas_get;
pub use db_metadata::query_db_metadatas_list;
pub use db_metadata::query_db_metadatas_upsert;
pub use db_runtime_event::query_db_runtime_events_insert;
pub use db_runtime_event::query_db_runtime_events_list_recent;
pub use dex::query_dexs_get_by_code;
pub use dex::query_dexs_list;
pub use dex::query_dexs_upsert;
pub use dex_decode_replay_ledger::query_dex_decode_replay_ledger_get_by_signature;
pub use dex_decode_replay_ledger::query_dex_decode_replay_ledger_get_by_transaction;
pub use dex_decode_replay_ledger::query_dex_decode_replay_ledger_upsert;
pub use dex_decoded_event::query_dex_decoded_events_cleanup_raydium_launchpad_anchor_self_cpi_audits;
pub use dex_decoded_event::query_dex_decoded_events_delete_by_key;
pub use dex_decoded_event::query_dex_decoded_events_delete_instruction_audit_by_discriminator;
pub use dex_decoded_event::query_dex_decoded_events_delete_local_replay_scope_by_transaction_id;
pub use dex_decoded_event::query_dex_decoded_events_delete_locally_covered_upstream_instruction_matches;
pub use dex_decoded_event::query_dex_decoded_events_delete_meteora_dlmm_anchor_swap_instruction_audits;
pub use dex_decoded_event::query_dex_decoded_events_delete_raydium_clmm_instruction_audit_by_discriminator;
pub use dex_decoded_event::query_dex_decoded_events_delete_raydium_launchpad_anchor_self_cpi_audit;
pub use dex_decoded_event::query_dex_decoded_events_delete_related_instruction_audit;
pub use dex_decoded_event::query_dex_decoded_events_delete_replaced_raydium_clmm_instruction_audits;
pub use dex_decoded_event::query_dex_decoded_events_delete_replaced_raydium_cpmm_instruction_audits;
pub use dex_decoded_event::query_dex_decoded_events_get_by_key;
pub use dex_decoded_event::query_dex_decoded_events_get_latest_pump_fun_create_payload_by_mint;
pub use dex_decoded_event::query_dex_decoded_events_list_by_transaction_id;
pub use dex_decoded_event::query_dex_decoded_events_update_payload_json_by_id;
pub use dex_decoded_event::query_dex_decoded_events_upsert;
pub use dex_event_coverage_entry::query_dex_event_coverage_entries_delete_by_decoder;
pub use dex_event_coverage_entry::query_dex_event_coverage_entries_list_by_decoder;
pub use dex_event_coverage_entry::query_dex_event_coverage_entries_list_summary_by_decoder;
pub use dex_event_coverage_entry::query_dex_event_coverage_entries_refresh_local_counts;
pub use dex_event_coverage_entry::query_dex_event_coverage_entries_refresh_local_counts_by_decoder;
pub use dex_event_coverage_entry::query_dex_event_coverage_entries_upsert;
pub use fee_event::query_fee_events_get_by_decoded_event_id;
pub use fee_event::query_fee_events_list_recent;
pub use fee_event::query_fee_events_upsert;
pub use fee_event_amount::query_fee_event_amounts_backfill_single_leg_from_fee_events;
pub use fee_event_amount::query_fee_event_amounts_delete_by_fee_event_id;
pub use fee_event_amount::query_fee_event_amounts_list_by_fee_event_id;
pub use fee_event_amount::query_fee_event_amounts_replace_for_fee_event;
pub use fee_event_amount::query_fee_events_upsert_with_amount_legs;
pub use instruction_observation::query_instruction_observation_source_rows_list_by_signature;
pub use instruction_observation::query_instruction_observation_source_rows_list_recent;
pub use instruction_observation::query_instruction_observation_source_rows_list_replay_window;
pub use instruction_observation::query_instruction_observations_delete_by_transaction_ids;
pub use instruction_observation::query_instruction_observations_list_by_filter;
pub use instruction_observation::query_instruction_observations_upsert;
pub use known_http_endpoint::query_known_http_endpoints_get;
pub use known_http_endpoint::query_known_http_endpoints_list;
pub use known_http_endpoint::query_known_http_endpoints_upsert;
pub use known_ws_endpoint::query_known_ws_endpoints_get;
pub use known_ws_endpoint::query_known_ws_endpoints_list;
pub use known_ws_endpoint::query_known_ws_endpoints_upsert;
pub use launch_attribution::query_launch_attributions_get_by_decoded_event_id;
pub use launch_attribution::query_launch_attributions_list_by_pool_id;
pub use launch_attribution::query_launch_attributions_upsert;
pub use launch_event::query_launch_events_upsert;
pub use launch_surface::query_launch_surfaces_get_by_code;
pub use launch_surface::query_launch_surfaces_list;
pub use launch_surface::query_launch_surfaces_upsert;
pub use launch_surface_key::query_launch_surface_keys_get_by_match;
pub use launch_surface_key::query_launch_surface_keys_list_by_surface_id;
pub use launch_surface_key::query_launch_surface_keys_upsert;
pub use liquidity_event::query_liquidity_events_list_recent;
pub use liquidity_event::query_liquidity_events_upsert;
pub use local_dex_corpus_search::query_local_dex_corpus_search_get_summary;
pub use local_dex_corpus_search::query_local_dex_corpus_search_list_decoded_event_samples;
pub use local_dex_corpus_search::query_local_dex_corpus_search_list_pool_pair_samples;
pub use local_dex_corpus_search::query_local_dex_corpus_search_list_transaction_samples;
pub use local_pipeline_diagnostics::query_local_decoded_event_diagnostic_list_summaries;
pub use local_pipeline_diagnostics::query_local_duplicate_decoded_event_trade_diagnostic_list_samples;
pub use local_pipeline_diagnostics::query_local_event_classification_diagnostic_list_summaries;
pub use local_pipeline_diagnostics::query_local_launch_origin_diagnostic_list_samples;
pub use local_pipeline_diagnostics::query_local_missing_trade_event_diagnostic_list_samples;
pub use local_pipeline_diagnostics::query_local_missing_trade_event_reason_list_summaries;
pub use local_pipeline_diagnostics::query_local_multi_trade_signature_pair_diagnostic_list_samples;
pub use local_pipeline_diagnostics::query_local_non_actionable_pair_diagnostic_list_summaries;
pub use local_pipeline_diagnostics::query_local_pair_actionability_diagnostic_list_summaries;
pub use local_pipeline_diagnostics::query_local_pair_diagnostic_list_summaries;
pub use local_pipeline_diagnostics::query_local_pair_trading_readiness_diagnostic_list_summaries;
pub use local_pipeline_diagnostics::query_local_pair_without_candle_diagnostic_list_samples;
pub use local_pipeline_diagnostics::query_local_pair_without_trade_diagnostic_list_samples;
pub use local_pipeline_diagnostics::query_local_pipeline_diagnostic_get_counters;
pub use local_pipeline_diagnostics::query_local_pipeline_diagnostic_list_summaries;
pub use local_pipeline_diagnostics::query_local_pool_origin_diagnostic_list_samples;
pub use local_pipeline_diagnostics::query_local_raydium_program_instruction_diagnostic_list_summaries;
pub use local_pipeline_diagnostics::query_local_token_metadata_gap_diagnostic_list_samples;
pub use observed_token::query_observed_tokens_get_by_mint;
pub use observed_token::query_observed_tokens_list;
pub use observed_token::query_observed_tokens_upsert;
pub use onchain_observation::query_onchain_observations_insert;
pub use onchain_observation::query_onchain_observations_list_recent;
pub use orderbook_event::query_orderbook_events_upsert;
pub use pair::query_pairs_get_by_pool_id;
pub use pair::query_pairs_list;
pub use pair::query_pairs_update_symbol;
pub use pair::query_pairs_upsert;
pub use pair_analytic_signal::query_pair_analytic_signals_get_by_key;
pub use pair_analytic_signal::query_pair_analytic_signals_list_by_pair_id;
pub use pair_analytic_signal::query_pair_analytic_signals_upsert;
pub use pair_candle::query_pair_candles_get_by_key;
pub use pair_candle::query_pair_candles_list_by_pair_and_timeframe;
pub use pair_candle::query_pair_candles_upsert;
pub use pair_metric::query_pair_metrics_get_by_pair_id;
pub use pair_metric::query_pair_metrics_list;
pub use pair_metric::query_pair_metrics_upsert;
pub use pool::query_pools_get_by_address;
pub use pool::query_pools_list;
pub use pool::query_pools_upsert;
pub use pool_admin_event::query_pool_admin_events_delete_by_decoded_event_id;
pub use pool_admin_event::query_pool_admin_events_get_by_decoded_event_id;
pub use pool_admin_event::query_pool_admin_events_list_recent;
pub use pool_admin_event::query_pool_admin_events_upsert;
pub use pool_lifecycle_event::query_pool_lifecycle_events_get_by_decoded_event_id;
pub use pool_lifecycle_event::query_pool_lifecycle_events_list_recent;
pub use pool_lifecycle_event::query_pool_lifecycle_events_upsert;
pub use pool_listing::query_pool_listings_get_by_pool_id;
pub use pool_listing::query_pool_listings_list;
pub use pool_listing::query_pool_listings_upsert;
pub use pool_origin::query_pool_origins_get_by_pool_id;
pub use pool_origin::query_pool_origins_list;
pub use pool_origin::query_pool_origins_upsert;
pub use pool_token::query_pool_tokens_list_by_pool_id;
pub use pool_token::query_pool_tokens_upsert;
pub use program_instruction_diagnostic::query_program_instruction_diagnostics_list_by_program_id;
pub use program_instruction_diagnostic::query_program_instruction_discriminator_summaries_list_by_program_id;
pub use protocol_candidate::query_protocol_candidate_summaries_list_by_priority;
pub use protocol_candidate::query_protocol_candidates_delete_by_transaction_id;
pub use protocol_candidate::query_protocol_candidates_insert;
pub use protocol_candidate::query_protocol_candidates_list_by_program_id;
pub use protocol_candidate::query_protocol_candidates_list_by_transaction_id;
pub use protocol_candidate::query_protocol_candidates_list_recent;
pub use reward_event::query_reward_events_get_by_decoded_event_id;
pub use reward_event::query_reward_events_list_recent;
pub use reward_event::query_reward_events_upsert;
pub use swap::query_swaps_list_recent;
pub use swap::query_swaps_upsert;
pub use token::query_tokens_get_by_id;
pub use token::query_tokens_get_by_mint;
pub use token::query_tokens_list;
pub use token::query_tokens_list_missing_metadata;
pub use token::query_tokens_upsert;
pub use token_account_event::query_token_account_events_upsert;
pub use token_burn_event::query_token_burn_events_list_recent;
pub use token_burn_event::query_token_burn_events_upsert;
pub use token_mint_event::query_token_mint_events_list_recent;
pub use token_mint_event::query_token_mint_events_upsert;
pub use trade_event::query_trade_events_get_by_decoded_event_id;
pub use trade_event::query_trade_events_list_by_pair_id;
pub use trade_event::query_trade_events_list_by_transaction_id;
pub use trade_event::query_trade_events_upsert;
pub use trade_event::query_trade_market_materialization_delete_all;
pub use transaction_classification::query_transaction_classifications_get_by_signature;
pub use transaction_classification::query_transaction_classifications_get_by_transaction_id;
pub use transaction_classification::query_transaction_classifications_list_recent;
pub use transaction_classification::query_transaction_classifications_upsert;
pub use wallet::query_wallets_get_by_address;
pub use wallet::query_wallets_list;
pub use wallet::query_wallets_upsert;
pub use wallet_holding::query_wallet_holdings_get_by_wallet_and_token;
pub use wallet_holding::query_wallet_holdings_list_by_wallet_id;
pub use wallet_holding::query_wallet_holdings_upsert;
pub use wallet_participation::query_wallet_participations_get_by_unique_key;
pub use wallet_participation::query_wallet_participations_list_by_pool_id;
pub use wallet_participation::query_wallet_participations_list_by_wallet_id;
pub use wallet_participation::query_wallet_participations_upsert;
