Skip to content

Commit 1f2b51e

Browse files
authored
add internal_updated_at field to query (#77)
1 parent d67776b commit 1f2b51e

File tree

8 files changed

+23
-12
lines changed

8 files changed

+23
-12
lines changed

Cargo.lock

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ crate-type = ["cdylib", "rlib", "staticlib"]
88

99

1010
[dependencies]
11-
dojo-world = { git = "https://github.com/dojoengine/dojo", rev = "180c6d2" }
12-
dojo-types = { git = "https://github.com/dojoengine/dojo", rev = "180c6d2" }
13-
torii-client = { git = "https://github.com/dojoengine/dojo", rev = "180c6d2" }
11+
dojo-world = { git = "https://github.com/dojoengine/dojo", rev = "85df91a80b2a63c0bed98a209be2744581859449" }
12+
dojo-types = { git = "https://github.com/dojoengine/dojo", rev = "85df91a80b2a63c0bed98a209be2744581859449" }
13+
torii-client = { git = "https://github.com/dojoengine/dojo", rev = "85df91a80b2a63c0bed98a209be2744581859449" }
1414
torii-grpc = { git = "https://github.com/dojoengine/dojo", features = [
1515
"client",
16-
], rev = "180c6d2" }
17-
torii-relay = { git = "https://github.com/dojoengine/dojo", rev = "180c6d2" }
16+
], rev = "85df91a80b2a63c0bed98a209be2744581859449" }
17+
torii-relay = { git = "https://github.com/dojoengine/dojo", rev = "85df91a80b2a63c0bed98a209be2744581859449" }
1818

1919
starknet = "0.12.0"
2020
starknet-crypto = "0.7.2"

dojo.h

+1
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ typedef struct Query {
387387
bool dont_include_hashed_keys;
388388
struct CArrayOrderBy order_by;
389389
struct CArrayc_char entity_models;
390+
uint64_t internal_updated_at;
390391
} Query;
391392

392393
typedef struct CArrayFieldElement {

dojo.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ struct Query {
725725
bool dont_include_hashed_keys;
726726
CArray<OrderBy> order_by;
727727
CArray<const char*> entity_models;
728+
uint64_t internal_updated_at;
728729
};
729730

730731
struct ModelMetadata {

dojo.pyx

+1
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ cdef extern from *:
256256
bool dont_include_hashed_keys;
257257
CArrayOrderBy order_by;
258258
CArrayc_char entity_models;
259+
uint64_t internal_updated_at;
259260

260261
cdef struct CArrayFieldElement:
261262
FieldElement *data;

src/c/types.rs

+5
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ pub struct Query {
326326
pub dont_include_hashed_keys: bool,
327327
pub order_by: CArray<OrderBy>,
328328
pub entity_models: CArray<*const c_char>,
329+
pub internal_updated_at: u64,
329330
}
330331

331332
#[derive(Clone, Debug)]
@@ -895,6 +896,7 @@ impl From<&Query> for torii_grpc::types::Query {
895896
dont_include_hashed_keys: val.dont_include_hashed_keys,
896897
order_by,
897898
entity_models,
899+
internal_updated_at: val.internal_updated_at,
898900
}
899901
}
900902
COption::None => torii_grpc::types::Query {
@@ -904,6 +906,7 @@ impl From<&Query> for torii_grpc::types::Query {
904906
dont_include_hashed_keys: val.dont_include_hashed_keys,
905907
order_by,
906908
entity_models,
909+
internal_updated_at: val.internal_updated_at,
907910
},
908911
}
909912
}
@@ -924,6 +927,7 @@ impl From<&torii_grpc::types::Query> for Query {
924927
dont_include_hashed_keys: val.dont_include_hashed_keys,
925928
order_by: order_by.into(),
926929
entity_models,
930+
internal_updated_at: val.internal_updated_at,
927931
}
928932
}
929933
Option::None => Query {
@@ -933,6 +937,7 @@ impl From<&torii_grpc::types::Query> for Query {
933937
dont_include_hashed_keys: val.dont_include_hashed_keys,
934938
order_by: order_by.into(),
935939
entity_models,
940+
internal_updated_at: val.internal_updated_at,
936941
},
937942
}
938943
}

src/wasm/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ impl ToriiClient {
689689
dont_include_hashed_keys: false,
690690
order_by: vec![],
691691
entity_models: vec![],
692+
internal_updated_at: 0,
692693
})
693694
.await;
694695

src/wasm/types.rs

+2
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ pub struct Query {
302302
pub dont_include_hashed_keys: bool,
303303
pub order_by: Vec<OrderBy>,
304304
pub entity_models: Vec<String>,
305+
pub internal_updated_at: u64,
305306
}
306307

307308
#[derive(Tsify, Serialize, Deserialize, Debug)]
@@ -347,6 +348,7 @@ impl From<&Query> for torii_grpc::types::Query {
347348
dont_include_hashed_keys: value.dont_include_hashed_keys,
348349
order_by: value.order_by.iter().map(|o| o.into()).collect(),
349350
entity_models: value.entity_models.iter().map(|m| m.to_string()).collect(),
351+
internal_updated_at: value.internal_updated_at,
350352
}
351353
}
352354
}

0 commit comments

Comments
 (0)