Skip to content

Commit

Permalink
Merge branch 'master' into fix_boxed_expression_for_having
Browse files Browse the repository at this point in the history
  • Loading branch information
obsoleszenz authored Jan 2, 2024
2 parents 2aa169d + bb3bd2a commit b0e938b
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 27 deletions.
2 changes: 1 addition & 1 deletion diesel_cli/src/default_files/diesel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[print_schema]
file = "src/schema.rs"
custom_type_derives = ["diesel::query_builder::QueryId"]
custom_type_derives = ["diesel::query_builder::QueryId", "Clone"]

[migrations_directory]
dir = "migrations"
2 changes: 2 additions & 0 deletions diesel_cli/tests/print_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ fn print_schema_with_enum_set_types() {
"--with-docs",
"--custom-type-derives",
"diesel::query_builder::QueryId",
"--custom-type-derives",
"Clone",
],
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[print_schema]
file = "src/schema.rs"
with_docs = true
custom_type_derives = ["diesel::query_builder::QueryId"]
custom_type_derives = ["diesel::query_builder::QueryId", "Clone"]
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ pub mod sql_types {
/// The `my_type` SQL type
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "my_type"))]
pub struct MyType;

/// The `my_type2` SQL type
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "my_type2"))]
pub struct MyType2;
}
Expand Down Expand Up @@ -58,4 +58,3 @@ diesel::table! {
custom_enum2 -> MyType2,
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[print_schema]
file = "src/schema.rs"
with_docs = true
custom_type_derives = ["diesel::query_builder::QueryId"]
custom_type_derives = ["diesel::query_builder::QueryId", "Clone"]
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ pub mod sql_types {
/// The `my_type` SQL type
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "my_type"))]
pub struct MyType;

/// The `my_type2` SQL type
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "my_type2"))]
pub struct MyType2;
}
Expand Down Expand Up @@ -58,4 +58,3 @@ diesel::table! {
custom_enum2 -> MyType2,
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[print_schema]
file = "src/schema.rs"
with_docs = true
custom_type_derives = ["diesel::query_builder::QueryId"]
custom_type_derives = ["diesel::query_builder::QueryId", "Clone"]
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ pub mod sql_types {
/// The `MyType` SQL type
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "MyType"))]
pub struct MyType;

/// The `MyType2` SQL type
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "MyType2"))]
pub struct MyType2;
}
Expand Down Expand Up @@ -58,4 +58,3 @@ diesel::table! {
custom_enum2 -> MyType2,
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
file = "src/schema.rs"
with_docs = true
schema = "custom_schema"
custom_type_derives = ["diesel::query_builder::QueryId"]
custom_type_derives = ["diesel::query_builder::QueryId", "Clone"]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub mod custom_schema {
/// The `custom_schema.my_enum` SQL type
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "my_enum", schema = "custom_schema"))]
pub struct MyEnum;
}
Expand Down Expand Up @@ -40,4 +40,3 @@ pub mod custom_schema {
}
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[print_schema]
file = "src/schema.rs"
with_docs = true
custom_type_derives = ["diesel::query_builder::QueryId"]
custom_type_derives = ["diesel::query_builder::QueryId", "Clone"]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub mod sql_types {
/// The `user_job` SQL type
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "user_job"))]
pub struct UserJob;
}
Expand All @@ -38,4 +38,3 @@ diesel::table! {
job -> UserJob,
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[print_schema]
file = "src/schema.rs"
with_docs = true
custom_type_derives = ["diesel::query_builder::QueryId"]
custom_type_derives = ["diesel::query_builder::QueryId", "Clone"]
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ pub mod sql_types {
/// [`users1::enabled_features`](super::users1::enabled_features)) column
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(mysql_type(name = "Set"))]
pub struct Users1EnabledFeaturesSet;

/// The `enum` SQL type for the
/// [`users1::user_state`](super::users1::user_state)) column
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(mysql_type(name = "Enum"))]
pub struct Users1UserStateEnum;
}
Expand Down Expand Up @@ -56,4 +56,3 @@ diesel::table! {
enabled_features -> Users1EnabledFeaturesSet,
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ pub mod sql_types {
/// The `some_enum` SQL type
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "some_enum"))]
pub struct SomeEnum;

/// The `some_enum_2` SQL type
///
/// (Automatically generated by Diesel.)
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[derive(diesel::query_builder::QueryId, Clone, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "some_enum_2"))]
pub struct SomeEnum2;
}
Expand Down Expand Up @@ -52,4 +52,3 @@ diesel::table! {
some_field_2 -> SomeEnum2,
}
}

2 changes: 1 addition & 1 deletion examples/postgres/composite_types/diesel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[print_schema]
file = "src/schema.rs"
custom_type_derives = ["diesel::query_builder::QueryId"]
custom_type_derives = ["diesel::query_builder::QueryId", "Clone"]

[migrations_directory]
dir = "migrations"

0 comments on commit b0e938b

Please sign in to comment.