Trait brontes_database::clickhouse::ClickhouseHandle

source ·
pub trait ClickhouseHandle:
    Send
    + Sync
    + Unpin
    + 'static {
    // Required methods
    fn get_metadata(
        &self,
        block_num: u64,
        block_timestamp: u64,
        block_hash: BlockHash,
        tx_hashes_in_block: Vec<TxHash>,
        quote_asset: Address,
    ) -> impl Future<Output = Result<Metadata>> + Send;
    fn get_cex_prices(
        &self,
        range_or_arbitrary: CexRangeOrArbitrary,
    ) -> impl Future<Output = Result<Vec<CexPriceData>>> + Send;
    fn get_cex_trades(
        &self,
        range_or_arbitrary: CexRangeOrArbitrary,
    ) -> impl Future<Output = Result<Vec<CexTradesData>>> + Send;
    fn query_many_range<T, D>(
        &self,
        start_block: u64,
        end_block: u64,
    ) -> impl Future<Output = Result<Vec<D>>> + Send
       where T: CompressedTable,
             T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>,
             D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static;
    fn query_many_arbitrary<T, D>(
        &self,
        range: &'static [u64],
    ) -> impl Future<Output = Result<Vec<D>>> + Send
       where T: CompressedTable,
             T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>,
             D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static;
    fn query_many<T, D>(&self) -> impl Future<Output = Result<Vec<D>>> + Send
       where T: CompressedTable,
             T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>,
             D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static;
    fn inner(&self) -> &ClickhouseClient<BrontesClickhouseTables>;
    fn get_init_crit_tables(
        &self,
    ) -> impl Future<Output = Result<ClickhouseCritTableCount>> + Send;
}

Required Methods§

source

fn get_metadata( &self, block_num: u64, block_timestamp: u64, block_hash: BlockHash, tx_hashes_in_block: Vec<TxHash>, quote_asset: Address, ) -> impl Future<Output = Result<Metadata>> + Send

source

fn get_cex_prices( &self, range_or_arbitrary: CexRangeOrArbitrary, ) -> impl Future<Output = Result<Vec<CexPriceData>>> + Send

source

fn get_cex_trades( &self, range_or_arbitrary: CexRangeOrArbitrary, ) -> impl Future<Output = Result<Vec<CexTradesData>>> + Send

source

fn query_many_range<T, D>( &self, start_block: u64, end_block: u64, ) -> impl Future<Output = Result<Vec<D>>> + Send
where T: CompressedTable, T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>, D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static,

source

fn query_many_arbitrary<T, D>( &self, range: &'static [u64], ) -> impl Future<Output = Result<Vec<D>>> + Send
where T: CompressedTable, T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>, D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static,

source

fn query_many<T, D>(&self) -> impl Future<Output = Result<Vec<D>>> + Send
where T: CompressedTable, T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>, D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static,

source

fn inner(&self) -> &ClickhouseClient<BrontesClickhouseTables>

source

fn get_init_crit_tables( &self, ) -> impl Future<Output = Result<ClickhouseCritTableCount>> + Send

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, U: 'a + ClickhouseHandle + ?Sized> ClickhouseHandle for &'a U
where &'a U: Send + Sync + Unpin + 'static,

source§

fn get_metadata( &self, block_num: u64, block_timestamp: u64, block_hash: BlockHash, tx_hashes_in_block: Vec<TxHash>, quote_asset: Address, ) -> impl Future<Output = Result<Metadata>> + Send

source§

fn get_cex_prices( &self, range_or_arbitrary: CexRangeOrArbitrary, ) -> impl Future<Output = Result<Vec<CexPriceData>>> + Send

source§

fn get_cex_trades( &self, range_or_arbitrary: CexRangeOrArbitrary, ) -> impl Future<Output = Result<Vec<CexTradesData>>> + Send

source§

fn query_many_range<T, D>( &self, start_block: u64, end_block: u64, ) -> impl Future<Output = Result<Vec<D>>> + Send
where T: CompressedTable, T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>, D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static,

source§

fn query_many_arbitrary<T, D>( &self, range: &'static [u64], ) -> impl Future<Output = Result<Vec<D>>> + Send
where T: CompressedTable, T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>, D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static,

source§

fn query_many<T, D>(&self) -> impl Future<Output = Result<Vec<D>>> + Send
where T: CompressedTable, T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>, D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static,

source§

fn inner(&self) -> &ClickhouseClient<BrontesClickhouseTables>

source§

fn get_init_crit_tables( &self, ) -> impl Future<Output = Result<ClickhouseCritTableCount>> + Send

source§

impl<'a, U: 'a + ClickhouseHandle + ?Sized> ClickhouseHandle for &'a mut U
where &'a mut U: Send + Sync + Unpin + 'static,

source§

fn get_metadata( &self, block_num: u64, block_timestamp: u64, block_hash: BlockHash, tx_hashes_in_block: Vec<TxHash>, quote_asset: Address, ) -> impl Future<Output = Result<Metadata>> + Send

source§

fn get_cex_prices( &self, range_or_arbitrary: CexRangeOrArbitrary, ) -> impl Future<Output = Result<Vec<CexPriceData>>> + Send

source§

fn get_cex_trades( &self, range_or_arbitrary: CexRangeOrArbitrary, ) -> impl Future<Output = Result<Vec<CexTradesData>>> + Send

source§

fn query_many_range<T, D>( &self, start_block: u64, end_block: u64, ) -> impl Future<Output = Result<Vec<D>>> + Send
where T: CompressedTable, T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>, D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static,

source§

fn query_many_arbitrary<T, D>( &self, range: &'static [u64], ) -> impl Future<Output = Result<Vec<D>>> + Send
where T: CompressedTable, T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>, D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static,

source§

fn query_many<T, D>(&self) -> impl Future<Output = Result<Vec<D>>> + Send
where T: CompressedTable, T::Value: From<T::DecompressedValue> + Into<T::DecompressedValue>, D: LibmdbxData<T> + DbRow + for<'de> Deserialize<'de> + Send + Debug + Unpin + 'static,

source§

fn inner(&self) -> &ClickhouseClient<BrontesClickhouseTables>

source§

fn get_init_crit_tables( &self, ) -> impl Future<Output = Result<ClickhouseCritTableCount>> + Send

Implementors§