Skip to content

Commit

Permalink
minors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraccaman committed Dec 18, 2024
1 parent a094b0c commit 05c0d18
Show file tree
Hide file tree
Showing 6 changed files with 318 additions and 134 deletions.
66 changes: 55 additions & 11 deletions orm/src/schema.rs
Original file line number Diff line number Diff line change
@@ -1,47 +1,91 @@
// @generated automatically by Diesel CLI.

pub mod sql_types {
#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "crawler_name"))]
pub struct CrawlerName;

#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "governance_kind"))]
pub struct GovernanceKind;

#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "governance_result"))]
pub struct GovernanceResult;

#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "governance_tally_type"))]
pub struct GovernanceTallyType;

#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "history_kind"))]
pub struct HistoryKind;

#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "ibc_status"))]
pub struct IbcStatus;

#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "token_type"))]
pub struct TokenType;

#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "transaction_kind"))]
pub struct TransactionKind;

#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "transaction_result"))]
pub struct TransactionResult;

#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "validator_state"))]
pub struct ValidatorState;

#[derive(diesel::query_builder::QueryId, std::fmt::Debug, diesel::sql_types::SqlType)]
#[derive(
diesel::query_builder::QueryId,
std::fmt::Debug,
diesel::sql_types::SqlType,
)]
#[diesel(postgres_type(name = "vote_kind"))]
pub struct VoteKind;
}
Expand Down
4 changes: 2 additions & 2 deletions orm/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl InnerTransactionInsertDb {
#[derive(Serialize, Queryable, Selectable, Insertable, Clone)]
#[diesel(table_name = wrapper_transactions)]
#[diesel(check_for_backend(diesel::pg::Pg))]
pub struct WrapperTransactionInsertDb {
pub struct WrapperTransactionDb {
pub id: String,
pub fee_payer: String,
pub fee_token: String,
Expand All @@ -122,7 +122,7 @@ pub struct WrapperTransactionInsertDb {
pub atomic: bool,
}

pub type WrapperTransactionDb = WrapperTransactionInsertDb;
pub type WrapperTransactionInsertDb = WrapperTransactionDb;

impl WrapperTransactionInsertDb {
pub fn from(tx: WrapperTransaction) -> Self {
Expand Down
Loading

0 comments on commit 05c0d18

Please sign in to comment.