Skip to content

Commit dcdc78f

Browse files
committed
Bump to ndc-models 0.2.3
1 parent e8e3560 commit dcdc78f

File tree

6 files changed

+89
-34
lines changed

6 files changed

+89
-34
lines changed

Cargo.lock

Lines changed: 32 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ similar_names = "allow"
3131
too_many_lines = "allow"
3232

3333
[workspace.dependencies]
34-
ndc-models = { git = "https://github.com/hasura/ndc-spec.git", tag = "v0.2.0-rc.2" }
35-
ndc-sdk = { git = "https://github.com/hasura/ndc-sdk-rs.git", rev = "643b96b" }
36-
ndc-test = { git = "https://github.com/hasura/ndc-spec.git", tag = "v0.2.0-rc.2" }
34+
ndc-models = { git = "https://github.com/hasura/ndc-spec.git", tag = "v0.2.3" }
35+
ndc-sdk = { git = "https://github.com/hasura/ndc-sdk-rs.git", rev = "e2a1aeb" }
36+
ndc-test = { git = "https://github.com/hasura/ndc-spec.git", tag = "v0.2.3" }
3737

3838
anyhow = "1"
3939
async-trait = "0.1"

crates/connectors/ndc-postgres/src/capabilities.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ pub fn get_capabilities() -> models::Capabilities {
3939
order_by_aggregate: Some(models::LeafCapability {}),
4040
nested: Some(models::NestedRelationshipCapabilities {
4141
array: Some(models::LeafCapability {}),
42+
filtering: None,
43+
ordering: None,
4244
}),
4345
}),
46+
relational_query: None,
47+
relational_mutation: None,
4448
}
4549
}

crates/connectors/ndc-postgres/src/schema/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub fn get_schema(
9090
)
9191
})
9292
.collect(),
93+
extraction_functions: BTreeMap::new(),
9394
comparison_operators: scalar_type_info
9495
.comparison_operators
9596
.iter()
@@ -152,6 +153,7 @@ pub fn get_schema(
152153
description: table.description.clone(),
153154
arguments: BTreeMap::new(),
154155
collection_type: collection_name.as_str().into(),
156+
relational_mutations: None,
155157
uniqueness_constraints: table
156158
.uniqueness_constraints
157159
.0
@@ -178,6 +180,7 @@ pub fn get_schema(
178180
.map(|(name, info)| models::CollectionInfo {
179181
name: name.clone(),
180182
description: info.description.clone(),
183+
relational_mutations: None,
181184
arguments: info
182185
.arguments
183186
.iter()
@@ -412,6 +415,7 @@ pub fn get_schema(
412415
representation: models::TypeRepresentation::Int64,
413416
aggregate_functions: BTreeMap::new(),
414417
comparison_operators: BTreeMap::new(),
418+
extraction_functions: BTreeMap::new(),
415419
});
416420

417421
Ok(models::SchemaResponse {
@@ -423,7 +427,7 @@ pub fn get_schema(
423427
capabilities: Some(models::CapabilitySchemaInfo {
424428
query: Some(models::QueryCapabilitiesSchemaInfo {
425429
aggregates: Some(models::AggregateCapabilitiesSchemaInfo {
426-
count_scalar_type: "int8".to_string(),
430+
count_scalar_type: models::ScalarTypeName::new("int8".into()),
427431
}),
428432
}),
429433
}),

crates/connectors/ndc-postgres/src/schema/mutation/helpers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pub fn make_procedure_type(
3636
representation: models::TypeRepresentation::Int32,
3737
aggregate_functions: BTreeMap::new(),
3838
comparison_operators: BTreeMap::new(),
39+
extraction_functions: BTreeMap::new(),
3940
});
4041

4142
fields.insert(

crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__schema_tests__schema_test__get_schema.snap

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ expression: result
156156
"name": "Phone"
157157
}
158158
}
159-
}
159+
},
160+
"extraction_functions": {}
160161
},
161162
"bool": {
162163
"representation": {
@@ -236,7 +237,8 @@ expression: result
236237
"name": "bool"
237238
}
238239
}
239-
}
240+
},
241+
"extraction_functions": {}
240242
},
241243
"card_suit": {
242244
"representation": {
@@ -298,7 +300,8 @@ expression: result
298300
"name": "card_suit"
299301
}
300302
}
301-
}
303+
},
304+
"extraction_functions": {}
302305
},
303306
"char": {
304307
"representation": {
@@ -452,7 +455,8 @@ expression: result
452455
"name": "char"
453456
}
454457
}
455-
}
458+
},
459+
"extraction_functions": {}
456460
},
457461
"cidr": {
458462
"representation": {
@@ -550,7 +554,8 @@ expression: result
550554
"name": "cidr"
551555
}
552556
}
553-
}
557+
},
558+
"extraction_functions": {}
554559
},
555560
"date": {
556561
"representation": {
@@ -606,7 +611,8 @@ expression: result
606611
"name": "date"
607612
}
608613
}
609-
}
614+
},
615+
"extraction_functions": {}
610616
},
611617
"even_number": {
612618
"representation": {
@@ -766,7 +772,8 @@ expression: result
766772
"name": "even_number"
767773
}
768774
}
769-
}
775+
},
776+
"extraction_functions": {}
770777
},
771778
"float4": {
772779
"representation": {
@@ -896,7 +903,8 @@ expression: result
896903
"name": "float4"
897904
}
898905
}
899-
}
906+
},
907+
"extraction_functions": {}
900908
},
901909
"float8": {
902910
"representation": {
@@ -1020,7 +1028,8 @@ expression: result
10201028
"name": "float8"
10211029
}
10221030
}
1023-
}
1031+
},
1032+
"extraction_functions": {}
10241033
},
10251034
"inet": {
10261035
"representation": {
@@ -1118,7 +1127,8 @@ expression: result
11181127
"name": "inet"
11191128
}
11201129
}
1121-
}
1130+
},
1131+
"extraction_functions": {}
11221132
},
11231133
"int2": {
11241134
"representation": {
@@ -1278,7 +1288,8 @@ expression: result
12781288
"name": "int2"
12791289
}
12801290
}
1281-
}
1291+
},
1292+
"extraction_functions": {}
12821293
},
12831294
"int4": {
12841295
"representation": {
@@ -1438,7 +1449,8 @@ expression: result
14381449
"name": "int4"
14391450
}
14401451
}
1441-
}
1452+
},
1453+
"extraction_functions": {}
14421454
},
14431455
"int8": {
14441456
"representation": {
@@ -1604,7 +1616,8 @@ expression: result
16041616
"name": "int8"
16051617
}
16061618
}
1607-
}
1619+
},
1620+
"extraction_functions": {}
16081621
},
16091622
"interval": {
16101623
"representation": {
@@ -1680,7 +1693,8 @@ expression: result
16801693
"name": "interval"
16811694
}
16821695
}
1683-
}
1696+
},
1697+
"extraction_functions": {}
16841698
},
16851699
"numeric": {
16861700
"representation": {
@@ -1816,7 +1830,8 @@ expression: result
18161830
"name": "numeric"
18171831
}
18181832
}
1819-
}
1833+
},
1834+
"extraction_functions": {}
18201835
},
18211836
"text": {
18221837
"representation": {
@@ -1970,7 +1985,8 @@ expression: result
19701985
"name": "text"
19711986
}
19721987
}
1973-
}
1988+
},
1989+
"extraction_functions": {}
19741990
},
19751991
"time": {
19761992
"representation": {
@@ -2046,7 +2062,8 @@ expression: result
20462062
"name": "time"
20472063
}
20482064
}
2049-
}
2065+
},
2066+
"extraction_functions": {}
20502067
},
20512068
"timestamp": {
20522069
"representation": {
@@ -2102,7 +2119,8 @@ expression: result
21022119
"name": "timestamp"
21032120
}
21042121
}
2105-
}
2122+
},
2123+
"extraction_functions": {}
21062124
},
21072125
"timestamptz": {
21082126
"representation": {
@@ -2158,7 +2176,8 @@ expression: result
21582176
"name": "timestamptz"
21592177
}
21602178
}
2161-
}
2179+
},
2180+
"extraction_functions": {}
21622181
},
21632182
"timetz": {
21642183
"representation": {
@@ -2214,7 +2233,8 @@ expression: result
22142233
"name": "timetz"
22152234
}
22162235
}
2217-
}
2236+
},
2237+
"extraction_functions": {}
22182238
},
22192239
"uuid": {
22202240
"representation": {
@@ -2263,7 +2283,8 @@ expression: result
22632283
"name": "uuid"
22642284
}
22652285
}
2266-
}
2286+
},
2287+
"extraction_functions": {}
22672288
},
22682289
"varchar": {
22692290
"representation": {
@@ -2417,7 +2438,8 @@ expression: result
24172438
"name": "varchar"
24182439
}
24192440
}
2420-
}
2441+
},
2442+
"extraction_functions": {}
24212443
}
24222444
},
24232445
"object_types": {

0 commit comments

Comments
 (0)