Skip to content

Commit 29c6d02

Browse files
Bump to ndc-models 0.2.3 (#771)
<!-- The PR description should answer 2 (maybe 3) important questions: --> ### What Routine stuff really. ### How <!-- How is it trying to accomplish it (what are the implementation steps)? -->
1 parent e8e3560 commit 29c6d02

File tree

8 files changed

+165
-74
lines changed

8 files changed

+165
-74
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/citus/snapshots/databases_tests__citus__schema_tests__schema_test__get_schema.snap

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
source: crates/tests/databases-tests/src/citus/schema_tests.rs
33
expression: result
4-
snapshot_kind: text
54
---
65
{
76
"scalar_types": {
@@ -129,7 +128,8 @@ snapshot_kind: text
129128
"name": "Phone"
130129
}
131130
}
132-
}
131+
},
132+
"extraction_functions": {}
133133
},
134134
"bool": {
135135
"representation": {
@@ -209,7 +209,8 @@ snapshot_kind: text
209209
"name": "bool"
210210
}
211211
}
212-
}
212+
},
213+
"extraction_functions": {}
213214
},
214215
"card_suit": {
215216
"representation": {
@@ -271,7 +272,8 @@ snapshot_kind: text
271272
"name": "card_suit"
272273
}
273274
}
274-
}
275+
},
276+
"extraction_functions": {}
275277
},
276278
"char": {
277279
"representation": {
@@ -397,7 +399,8 @@ snapshot_kind: text
397399
"name": "char"
398400
}
399401
}
400-
}
402+
},
403+
"extraction_functions": {}
401404
},
402405
"date": {
403406
"representation": {
@@ -453,7 +456,8 @@ snapshot_kind: text
453456
"name": "date"
454457
}
455458
}
456-
}
459+
},
460+
"extraction_functions": {}
457461
},
458462
"even_number": {
459463
"representation": {
@@ -613,7 +617,8 @@ snapshot_kind: text
613617
"name": "even_number"
614618
}
615619
}
616-
}
620+
},
621+
"extraction_functions": {}
617622
},
618623
"float4": {
619624
"representation": {
@@ -743,7 +748,8 @@ snapshot_kind: text
743748
"name": "float4"
744749
}
745750
}
746-
}
751+
},
752+
"extraction_functions": {}
747753
},
748754
"float8": {
749755
"representation": {
@@ -867,7 +873,8 @@ snapshot_kind: text
867873
"name": "float8"
868874
}
869875
}
870-
}
876+
},
877+
"extraction_functions": {}
871878
},
872879
"int2": {
873880
"representation": {
@@ -1027,7 +1034,8 @@ snapshot_kind: text
10271034
"name": "int2"
10281035
}
10291036
}
1030-
}
1037+
},
1038+
"extraction_functions": {}
10311039
},
10321040
"int4": {
10331041
"representation": {
@@ -1187,7 +1195,8 @@ snapshot_kind: text
11871195
"name": "int4"
11881196
}
11891197
}
1190-
}
1198+
},
1199+
"extraction_functions": {}
11911200
},
11921201
"int8": {
11931202
"representation": {
@@ -1353,7 +1362,8 @@ snapshot_kind: text
13531362
"name": "int8"
13541363
}
13551364
}
1356-
}
1365+
},
1366+
"extraction_functions": {}
13571367
},
13581368
"interval": {
13591369
"representation": {
@@ -1429,7 +1439,8 @@ snapshot_kind: text
14291439
"name": "interval"
14301440
}
14311441
}
1432-
}
1442+
},
1443+
"extraction_functions": {}
14331444
},
14341445
"numeric": {
14351446
"representation": {
@@ -1565,7 +1576,8 @@ snapshot_kind: text
15651576
"name": "numeric"
15661577
}
15671578
}
1568-
}
1579+
},
1580+
"extraction_functions": {}
15691581
},
15701582
"text": {
15711583
"representation": {
@@ -1691,7 +1703,8 @@ snapshot_kind: text
16911703
"name": "text"
16921704
}
16931705
}
1694-
}
1706+
},
1707+
"extraction_functions": {}
16951708
},
16961709
"time": {
16971710
"representation": {
@@ -1767,7 +1780,8 @@ snapshot_kind: text
17671780
"name": "time"
17681781
}
17691782
}
1770-
}
1783+
},
1784+
"extraction_functions": {}
17711785
},
17721786
"timestamp": {
17731787
"representation": {
@@ -1823,7 +1837,8 @@ snapshot_kind: text
18231837
"name": "timestamp"
18241838
}
18251839
}
1826-
}
1840+
},
1841+
"extraction_functions": {}
18271842
},
18281843
"timestamptz": {
18291844
"representation": {
@@ -1879,7 +1894,8 @@ snapshot_kind: text
18791894
"name": "timestamptz"
18801895
}
18811896
}
1882-
}
1897+
},
1898+
"extraction_functions": {}
18831899
},
18841900
"timetz": {
18851901
"representation": {
@@ -1935,7 +1951,8 @@ snapshot_kind: text
19351951
"name": "timetz"
19361952
}
19371953
}
1938-
}
1954+
},
1955+
"extraction_functions": {}
19391956
},
19401957
"uuid": {
19411958
"representation": {
@@ -1984,7 +2001,8 @@ snapshot_kind: text
19842001
"name": "uuid"
19852002
}
19862003
}
1987-
}
2004+
},
2005+
"extraction_functions": {}
19882006
},
19892007
"varchar": {
19902008
"representation": {
@@ -2110,7 +2128,8 @@ snapshot_kind: text
21102128
"name": "varchar"
21112129
}
21122130
}
2113-
}
2131+
},
2132+
"extraction_functions": {}
21142133
}
21152134
},
21162135
"object_types": {

0 commit comments

Comments
 (0)