Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add internal_updated_at field to query #77

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ crate-type = ["cdylib", "rlib", "staticlib"]


[dependencies]
dojo-world = { git = "https://github.com/dojoengine/dojo", rev = "180c6d2" }
dojo-types = { git = "https://github.com/dojoengine/dojo", rev = "180c6d2" }
torii-client = { git = "https://github.com/dojoengine/dojo", rev = "180c6d2" }
dojo-world = { git = "https://github.com/dojoengine/dojo", rev = "85df91a80b2a63c0bed98a209be2744581859449" }
dojo-types = { git = "https://github.com/dojoengine/dojo", rev = "85df91a80b2a63c0bed98a209be2744581859449" }
torii-client = { git = "https://github.com/dojoengine/dojo", rev = "85df91a80b2a63c0bed98a209be2744581859449" }
torii-grpc = { git = "https://github.com/dojoengine/dojo", features = [
"client",
], rev = "180c6d2" }
torii-relay = { git = "https://github.com/dojoengine/dojo", rev = "180c6d2" }
], rev = "85df91a80b2a63c0bed98a209be2744581859449" }
torii-relay = { git = "https://github.com/dojoengine/dojo", rev = "85df91a80b2a63c0bed98a209be2744581859449" }

starknet = "0.12.0"
starknet-crypto = "0.7.2"
Expand Down
1 change: 1 addition & 0 deletions dojo.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ typedef struct Query {
bool dont_include_hashed_keys;
struct CArrayOrderBy order_by;
struct CArrayc_char entity_models;
uint64_t internal_updated_at;
} Query;

typedef struct CArrayFieldElement {
Expand Down
1 change: 1 addition & 0 deletions dojo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ struct Query {
bool dont_include_hashed_keys;
CArray<OrderBy> order_by;
CArray<const char*> entity_models;
uint64_t internal_updated_at;
};

struct ModelMetadata {
Expand Down
1 change: 1 addition & 0 deletions dojo.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ cdef extern from *:
bool dont_include_hashed_keys;
CArrayOrderBy order_by;
CArrayc_char entity_models;
uint64_t internal_updated_at;

cdef struct CArrayFieldElement:
FieldElement *data;
Expand Down
5 changes: 5 additions & 0 deletions src/c/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ pub struct Query {
pub dont_include_hashed_keys: bool,
pub order_by: CArray<OrderBy>,
pub entity_models: CArray<*const c_char>,
pub internal_updated_at: u64,
}

#[derive(Clone, Debug)]
Expand Down Expand Up @@ -895,6 +896,7 @@ impl From<&Query> for torii_grpc::types::Query {
dont_include_hashed_keys: val.dont_include_hashed_keys,
order_by,
entity_models,
internal_updated_at: val.internal_updated_at,
}
}
COption::None => torii_grpc::types::Query {
Expand All @@ -904,6 +906,7 @@ impl From<&Query> for torii_grpc::types::Query {
dont_include_hashed_keys: val.dont_include_hashed_keys,
order_by,
entity_models,
internal_updated_at: val.internal_updated_at,
},
}
}
Expand All @@ -924,6 +927,7 @@ impl From<&torii_grpc::types::Query> for Query {
dont_include_hashed_keys: val.dont_include_hashed_keys,
order_by: order_by.into(),
entity_models,
internal_updated_at: val.internal_updated_at,
}
}
Option::None => Query {
Expand All @@ -933,6 +937,7 @@ impl From<&torii_grpc::types::Query> for Query {
dont_include_hashed_keys: val.dont_include_hashed_keys,
order_by: order_by.into(),
entity_models,
internal_updated_at: val.internal_updated_at,
},
}
}
Expand Down
1 change: 1 addition & 0 deletions src/wasm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ impl ToriiClient {
dont_include_hashed_keys: false,
order_by: vec![],
entity_models: vec![],
internal_updated_at: 0,
})
.await;

Expand Down
2 changes: 2 additions & 0 deletions src/wasm/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ pub struct Query {
pub dont_include_hashed_keys: bool,
pub order_by: Vec<OrderBy>,
pub entity_models: Vec<String>,
pub internal_updated_at: u64,
}

#[derive(Tsify, Serialize, Deserialize, Debug)]
Expand Down Expand Up @@ -347,6 +348,7 @@ impl From<&Query> for torii_grpc::types::Query {
dont_include_hashed_keys: value.dont_include_hashed_keys,
order_by: value.order_by.iter().map(|o| o.into()).collect(),
entity_models: value.entity_models.iter().map(|m| m.to_string()).collect(),
internal_updated_at: value.internal_updated_at,
}
}
}
Expand Down
Loading