riftenlabs-indexer/src/db/mod.rs

43 lines
986 B
Rust
Raw Normal View History

2026-01-21 12:34:59 +01:00
// Copyright (C) 2024-2026 Whiterun LLC
2024-03-04 16:40:50 +01:00
//
// This software is licensed under the GNU Affero General Public License (AGPL), version 3.0 or later.
// A copy of the license can be found in the LICENSE file or at https://www.gnu.org/licenses/agpl-3.0.html
use sqlx::SqlitePool;
2024-03-14 12:14:13 +01:00
pub mod bcmr;
pub mod blob;
pub mod cauldron;
2024-10-21 12:48:47 +02:00
pub mod crc20;
pub mod ido;
2026-01-05 15:40:01 +01:00
pub mod init;
pub mod moria;
pub mod oracle;
2024-10-31 10:55:29 +00:00
pub mod search;
2024-03-04 16:40:50 +01:00
#[derive(Clone)]
pub struct DB {
// readwrite
pub cauldron_w: SqlitePool,
// readonly
pub cauldron_r: SqlitePool,
// readonly
pub bcmr_r: SqlitePool,
// readwrite
pub bcmr_w: SqlitePool,
// readwrite
pub crc20_w: SqlitePool,
2024-10-21 12:48:47 +02:00
// readonly
#[allow(dead_code)]
pub crc20_r: SqlitePool,
// on-chain oracles
pub oracle_w: SqlitePool,
pub oracle_r: SqlitePool,
// moria lending protocol
pub moria_w: SqlitePool,
pub moria_r: SqlitePool,
2026-04-25 20:15:15 +03:00
// ido
pub ido_w: SqlitePool,
pub ido_r: SqlitePool,
2024-03-04 16:40:50 +01:00
}