• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

getdozer / dozer / 5829059745

pending completion
5829059745

Pull #1844

github

supergi01
added comments for downloader.rs
Pull Request #1844: feat/live-reload, download and start react server

735 of 735 new or added lines in 11 files covered. (100.0%)

45536 of 61287 relevant lines covered (74.3%)

51206.91 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/dozer-cli/src/live/helper.rs
1
use dozer_api::grpc::types_helper::field_to_prost_value;
2
use dozer_types::grpc_types::{
3
    types::Record,
4
    types::{Operation, OperationType},
5
};
6

7
pub fn map_operation(endpoint_name: String, op: dozer_types::types::Operation) -> Operation {
×
8
    match op {
×
9
        dozer_types::types::Operation::Delete { old } => map_delete_operation(endpoint_name, old),
×
10
        dozer_types::types::Operation::Insert { new } => map_insert_operation(endpoint_name, new),
×
11
        dozer_types::types::Operation::Update { old, new } => {
×
12
            map_update_operation(endpoint_name, old, new)
×
13
        }
14
    }
15
}
×
16

17
fn map_record(record: dozer_types::types::Record) -> Record {
×
18
    Record {
×
19
        values: record
×
20
            .values
×
21
            .iter()
×
22
            .map(|f| field_to_prost_value(f.clone()))
×
23
            .collect(),
×
24
        version: 1,
×
25
    }
×
26
}
×
27

28
pub fn map_insert_operation(
×
29
    endpoint_name: String,
×
30
    record: dozer_types::types::Record,
×
31
) -> Operation {
×
32
    Operation {
×
33
        typ: OperationType::Insert as i32,
×
34
        old: None,
×
35
        new_id: None,
×
36
        new: Some(map_record(record)),
×
37
        endpoint_name,
×
38
    }
×
39
}
×
40

41
pub fn map_delete_operation(
×
42
    endpoint_name: String,
×
43
    record: dozer_types::types::Record,
×
44
) -> Operation {
×
45
    Operation {
×
46
        typ: OperationType::Delete as i32,
×
47
        old: None,
×
48
        new: Some(map_record(record)),
×
49
        new_id: None,
×
50
        endpoint_name,
×
51
    }
×
52
}
×
53

54
pub fn map_update_operation(
×
55
    endpoint_name: String,
×
56
    old: dozer_types::types::Record,
×
57
    new: dozer_types::types::Record,
×
58
) -> Operation {
×
59
    Operation {
×
60
        typ: OperationType::Update as i32,
×
61
        old: Some(map_record(old)),
×
62
        new: Some(map_record(new)),
×
63
        new_id: None,
×
64
        endpoint_name,
×
65
    }
×
66
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc