Skip to content

Commit cca4479

Browse files
committed
Rebase on 1.1.x
1 parent 9108196 commit cca4479

File tree

12 files changed

+29
-23
lines changed

12 files changed

+29
-23
lines changed

cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ categories = ["database"]
1515
[dependencies]
1616
async-std = { version = "1.12.0", features = [ "attributes", "tokio1" ] }
1717
clap = { version = "4.3.19", features = ["derive"] }
18-
seaography-generator = { version = "~2.0.0-rc.1", path = "../generator" }
18+
seaography-generator = { version = "~2.0.0-rc", path = "../generator" }
1919
url = "2.4.0"

examples/mysql/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tracing-subscriber = { version = "0.3.17" }
1414

1515
[dependencies.seaography]
1616
path = "../../"
17-
version = "~2.0.0-rc.1" # seaography version
17+
version = "~2.0.0-rc" # seaography version
1818
features = ["with-decimal", "with-chrono"]
1919

2020
[dev-dependencies]

examples/postgres/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tracing-subscriber = { version = "0.3.17" }
1414

1515
[dependencies.seaography]
1616
path = "../../"
17-
version = "~2.0.0-rc.1" # seaography version
17+
version = "~2.0.0-rc" # seaography version
1818
features = ["with-decimal", "with-chrono", "with-json", "with-postgres-array", "schema-meta"]
1919

2020
[dev-dependencies]

examples/postgres/tests/entity_metadata_tests.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use async_graphql::{dynamic::*, Response};
22
use sea_orm::Database;
33
use seaography::async_graphql;
44

5-
pub async fn get_schema() -> Schema {
5+
pub async fn schema() -> Schema {
66
let database = Database::connect("postgres://sea:[email protected]/sakila")
77
.await
88
.unwrap();
@@ -20,7 +20,7 @@ pub fn assert_eq(a: Response, b: &str) {
2020

2121
#[tokio::test]
2222
async fn test_entity_metadata() {
23-
let schema = get_schema().await;
23+
let schema = schema().await;
2424

2525
assert_eq(
2626
schema
@@ -244,6 +244,15 @@ async fn test_entity_metadata() {
244244
},
245245
"enumeration": null
246246
}
247+
},
248+
{
249+
"name": "metadata",
250+
"nullable": true,
251+
"type_": {
252+
"primitive": "json",
253+
"array": null,
254+
"enumeration": null
255+
}
247256
}
248257
],
249258
"primary_key": [

examples/postgres/tests/guard_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ async fn entity_guard() {
280280
.execute(
281281
r#"
282282
{
283-
language(orderBy: { languageId: ASC }) {
283+
language(filters: { languageId: { lte: 6 } }, orderBy: { languageId: ASC }) {
284284
nodes {
285285
languageId
286286
name

examples/sea-draw/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ edition = "2024"
77
async-graphql = { version = "7.0", features = ["decimal", "chrono", "dataloader", "dynamic-schema"] }
88
async-graphql-axum = { version = "7" }
99
axum = { version = "0.8.*", features = ["ws"] }
10-
chrono = { version = "0.4.30", default-features = false }
1110
clap = { version = "4.5", features = ["derive", "env"] }
1211
dotenv = "0.15.0"
1312
reqwest = { version = "0.12", features = [
@@ -16,7 +15,7 @@ reqwest = { version = "0.12", features = [
1615
"rustls-tls",
1716
"multipart",
1817
], default-features = false }
19-
sea-orm = { version = "~1.1.14", features = [
18+
sea-orm = { version = "~2.0.0-rc", features = [
2019
"sqlx-sqlite",
2120
"sqlx-postgres",
2221
"runtime-tokio-native-tls",
@@ -31,7 +30,7 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter", "fmt"] }
3130

3231
[dependencies.seaography]
3332
path = "../../"
34-
version = "~1.1.4" # seaography version
33+
version = "~2.0.0-rc" # seaography version
3534
features = [
3635
"macros",
3736
"field-pluralize",

examples/sea-draw/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ pub mod subscriptions;
1414
pub mod types;
1515

1616
pub fn never_condition() -> sea_orm::Condition {
17-
sea_orm::query::Condition::any().add(sea_orm::sea_query::ConditionExpression::SimpleExpr(
18-
sea_orm::sea_query::SimpleExpr::Constant(sea_orm::sea_query::Value::Bool(Some(false))),
19-
))
17+
sea_orm::query::Condition::any().add(sea_orm::sea_query::Expr::val(false))
2018
}
2119

2220
pub fn permission_for_operation_type(op: seaography::OperationType) -> entities::Permission {

examples/sea-draw/src/mutations.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use crate::{
44
types::{Fill, Shape, Stroke},
55
};
66
use async_graphql::Context;
7-
use chrono::Utc;
87
use sea_orm::{
98
ActiveModelTrait, ColumnTrait, EntityTrait, IntoActiveModel, QueryFilter,
10-
entity::prelude::Uuid, sea_query::query::OnConflict,
9+
entity::prelude::{ChronoUtc as Utc, Uuid},
10+
sea_query::query::OnConflict,
1111
};
1212
use seaography::CustomFields;
1313
use tracing::instrument;

examples/sqlite/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ serde_json = { version = "1.0.103" }
1717

1818
[dependencies.seaography]
1919
path = "../../"
20-
version = "~2.0.0-rc.1" # seaography version
20+
version = "~2.0.0-rc" # seaography version
2121
features = ["macros", "with-decimal", "with-chrono"]
2222

2323
[workspace]

macros/src/convert_output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn derive_convert_output_enum_containers(
7777
) -> async_graphql::Result<Option<async_graphql::dynamic::FieldValue<'static>>> {
7878
if let sea_orm::sea_query::value::Value::Json(opt_json) = value {
7979
if let Some(json) = opt_json {
80-
match serde_json::from_value::<#orig_ident>(*json.clone()) {
80+
match serde_json::from_value::<#orig_ident>(json.clone()) {
8181
Ok(obj) => match obj {
8282
#(#variant_matches)*
8383
},

0 commit comments

Comments
 (0)