Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/postgres/src/models/enums/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// only for PostgreSQL to match a type definition

#[derive(sqlx::Type, Debug, Clone, PartialEq)]
#[derive(welds::WeldsType, Debug, Clone, PartialEq)]
#[sqlx(type_name = "Color")]
pub enum Color {
Red,
Expand Down
2 changes: 2 additions & 0 deletions welds-connections/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ pub mod row;
pub mod sqlite;
pub mod trace;
pub mod transaction;
#[cfg(any(feature = "mysql", feature = "sqlite", feature = "postgres"))]
pub use sqlx::Type as WeldsType;

pub struct Fetch<'s, 'args, 't> {
pub sql: &'s str,
Expand Down
4 changes: 4 additions & 0 deletions welds/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,7 @@ pub use welds_connections::{Client, Row, Syntax, TransactStart};

/// Re-export the Macro used to make models
pub use welds_macros::WeldsModel;

/// Re-export sqlx::Type as WeldsType for using custom types in models
#[cfg(any(feature = "mysql", feature = "sqlite", feature = "postgres"))]
pub use welds_connections::WeldsType;
2 changes: 2 additions & 0 deletions welds/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ pub use crate::TransactStart;
pub use crate::WeldsModel;
pub use crate::exts::{VecRowExt, VecStateExt};
pub use crate::state::DbState;
#[cfg(any(feature = "mysql", feature = "sqlite", feature = "postgres"))]
pub use crate::WeldsType;