Skip to content

Commit a9b503f

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

File tree

11 files changed

+27
-20
lines changed

11 files changed

+27
-20
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ reqwest = { version = "0.12", features = [
1616
"rustls-tls",
1717
"multipart",
1818
], default-features = false }
19-
sea-orm = { version = "~1.1.14", features = [
19+
sea-orm = { version = "~2.0.0-rc", features = [
2020
"sqlx-sqlite",
2121
"sqlx-postgres",
2222
"runtime-tokio-native-tls",
@@ -31,7 +31,7 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter", "fmt"] }
3131

3232
[dependencies.seaography]
3333
path = "../../"
34-
version = "~1.1.4" # seaography version
34+
version = "~2.0.0-rc" # seaography version
3535
features = [
3636
"macros",
3737
"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/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
},

src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ impl Builder {
385385
self.register_custom_output::<schema::Array>();
386386
self.register_custom_output::<schema::Enumeration>();
387387

388-
use crate::GqlOutputModelType;
388+
use crate::CustomOutputType;
389389
use async_graphql::dynamic::FieldValue;
390390

391391
const TABLE_NAME: &str = "table_name";

0 commit comments

Comments
 (0)