2024-03-04 16:40:50 +01:00
|
|
|
// Copyright (C) 2024 Riften Labs AS
|
|
|
|
|
//
|
|
|
|
|
// 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
|
|
|
|
|
|
2024-03-14 12:14:13 +01:00
|
|
|
use std::sync::Arc;
|
|
|
|
|
|
2024-05-09 11:25:27 +02:00
|
|
|
pub mod bcmr;
|
|
|
|
|
pub mod cauldron;
|
2024-10-21 12:48:47 +02:00
|
|
|
pub mod crc20;
|
2026-01-05 15:40:01 +01:00
|
|
|
pub mod init;
|
2025-05-20 16:17:32 +02:00
|
|
|
pub mod oracle;
|
2024-10-31 10:55:29 +00:00
|
|
|
pub mod search;
|
2024-03-04 16:40:50 +01:00
|
|
|
|
2024-03-14 12:14:13 +01:00
|
|
|
pub type DBPool = Arc<r2d2::Pool<r2d2_sqlite::SqliteConnectionManager>>;
|
|
|
|
|
|
2024-05-09 11:25:27 +02:00
|
|
|
#[derive(Clone)]
|
|
|
|
|
pub struct DB {
|
|
|
|
|
// readwrite
|
|
|
|
|
pub cauldron_w: DBPool,
|
|
|
|
|
// readonly
|
|
|
|
|
pub cauldron_r: DBPool,
|
|
|
|
|
// readonly
|
|
|
|
|
pub bcmr_r: DBPool,
|
|
|
|
|
// readwrite
|
|
|
|
|
pub bcmr_w: DBPool,
|
2024-10-21 12:48:47 +02:00
|
|
|
// rewadwrite
|
|
|
|
|
pub crc20_w: DBPool,
|
|
|
|
|
// readonly
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
|
pub crc20_r: DBPool,
|
2025-05-20 16:17:32 +02:00
|
|
|
// on-chain oracles
|
|
|
|
|
pub oracle_w: DBPool,
|
|
|
|
|
pub oracle_r: DBPool,
|
2024-03-04 16:40:50 +01:00
|
|
|
}
|