MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / query

Function query

libatomic/tests/schema5_service_test.rs:41–64  ·  view source on GitHub ↗
(
    service: &LocalService,
    repository: &proto::RepositoryRef,
    hash: &atomic_core::Hash,
)

Source from the content-addressed store, hash-verified

39}
40
41async fn query(
42 service: &LocalService,
43 repository: &proto::RepositoryRef,
44 hash: &atomic_core::Hash,
45) -> proto::GetChangeResponse {
46 invoke(
47 service,
48 "/atomic.RepositoryQueryService/GetChange",
49 proto::GetChangeRequest {
50 repository: Some(repository.clone()),
51 r#ref: Some(proto::ChangeRef {
52 kind: Some(proto::change_ref::Kind::Hash(
53 libatomic::daemon::convert::hash_proto(hash),
54 )),
55 }),
56 includes: Some(proto::ChangeIncludes {
57 metadata: true,
58 ..Default::default()
59 }),
60 ..Default::default()
61 },
62 )
63 .await
64}
65
66fn text() -> String {
67 (0..2048)

Calls 3

invokeFunction · 0.70
hash_protoFunction · 0.50
cloneMethod · 0.45

Tested by

no test coverage detected