Skip to content
Closed
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
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ sqlx-mysql = [
]
sqlx-postgres = [
"sqlx-dep",
"sea-orm-macros/sqlx-postgres",
"sea-query-sqlx/sqlx-postgres",
"postgres-array",
"sea-schema?/sqlx-postgres",
Expand Down Expand Up @@ -238,4 +239,7 @@ with-uuid = ["uuid", "sea-query/with-uuid", "sea-query-sqlx?/with-uuid"]
# This allows us to develop using a local version of sea-query
[patch.crates-io]
# sea-query = { path = "../sea-query" }
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-rusqlite = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
# sea-query = { git = "https://github.com/SeaQL/sea-query", branch = "master" }
4 changes: 4 additions & 0 deletions examples/actix_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
actix-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/axum_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
axum-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/basic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ sea-orm = { path = "../../", features = [
] }
serde_json = { version = "1" }
tokio = { version = "1", features = ["full"] }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/graphql_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
graphql-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/jsonrpsee_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
jsonrpsee-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/parquet_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ features = [
"with-rust_decimal",
]
path = "../../"

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/poem_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
poem-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
2 changes: 2 additions & 0 deletions examples/proxy_cloudflare_worker_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ sea-orm = { path = "../../", default-features = false, features = [
[patch.crates-io]
# https://github.com/cloudflare/workers-rs/pull/591
worker = { git = "https://github.com/cloudflare/workers-rs.git", rev = "ff2e6a0fd58b7e7b4b7651aba46e04067597eb03" }
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/proxy_gluesql_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ sqlparser = "0.40"
[dev-dependencies]
smol = { version = "1.2" }
smol-potat = { version = "1.1" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/quickstart/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ features = [
"schema-sync",
]
path = "../../"

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/rocket_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
rocket-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/rocket_okapi_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ members = [".", "api", "service", "entity", "migration", "dto"]

[dependencies]
rocket-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/salvo_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
salvo-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
6 changes: 6 additions & 0 deletions examples/seaography_example/graphql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ serde_json = { version = "1.0.103" }

[workspace]
members = []

[patch.crates-io]
# sea-query = { path = "../sea-query" }
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-rusqlite = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
5 changes: 5 additions & 0 deletions examples/seaography_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ features = [
]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~2.0.0-rc.37" # sea-orm-migration version

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-rusqlite = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
4 changes: 4 additions & 0 deletions examples/tonic_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ path = "./src/server.rs"
[[bin]]
name = "client"
path = "./src/client.rs"

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
2 changes: 2 additions & 0 deletions sea-orm-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,6 @@ runtime-tokio-rustls = [
# This allows us to develop using an overridden version of sea-query
[patch.crates-io]
# sea-query = { path = "../sea-query" }
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "enum" }
# sea-query = { git = "https://github.com/SeaQL/sea-query", branch = "master" }
22 changes: 7 additions & 15 deletions sea-orm-codegen/src/entity/active_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl ActiveEnum {
} else {
quote! {
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum #copy_derive #serde_derive #extra_derives)]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = #enum_name)]
#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = #enum_name)]
#extra_attributes
pub enum #enum_iden {
#(
Expand Down Expand Up @@ -125,7 +125,7 @@ mod tests {
.to_string(),
quote!(
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy)]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "media_type")]
#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "media_type")]
pub enum MediaType {
#[sea_orm(string_value = "")]
__EmptyString,
Expand Down Expand Up @@ -168,7 +168,7 @@ mod tests {
.to_string(),
quote!(
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy)]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "media_type")]
#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "media_type")]
pub enum MediaType {
#[sea_orm(string_value = "UNKNOWN")]
Unknown,
Expand Down Expand Up @@ -225,7 +225,7 @@ mod tests {
fn build_generated_enum() -> String {
quote!(
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy, specta :: Type, ts_rs :: TS)]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "media_type")]
#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "media_type")]
pub enum MediaType {
#[sea_orm(string_value = "UNKNOWN")]
Unknown,
Expand Down Expand Up @@ -257,11 +257,7 @@ mod tests {
.to_string(),
quote!(
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy)]
#[sea_orm(
rs_type = "String",
db_type = "Enum",
enum_name = "coinflip_result_type"
)]
#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "coinflip_result_type")]
#[serde(rename_all = "camelCase")]
pub enum CoinflipResultType {
#[sea_orm(string_value = "HEADS")]
Expand Down Expand Up @@ -290,11 +286,7 @@ mod tests {
.to_string(),
quote!(
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy)]
#[sea_orm(
rs_type = "String",
db_type = "Enum",
enum_name = "coinflip_result_type"
)]
#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "coinflip_result_type")]
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub enum CoinflipResultType {
Expand Down Expand Up @@ -341,7 +333,7 @@ mod tests {
.to_string(),
quote!(
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy)]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "ty")]
#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "ty")]
pub enum Ty {
#[sea_orm(string_value = "Question")]
Question,
Expand Down
1 change: 1 addition & 0 deletions sea-orm-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ derive = ["bae"]
entity-registry = []
postgres-array = []
seaography = ["proc-macro-crate"]
sqlx-postgres = []
strum = []
with-arrow = []
with-json = []
Loading
Loading