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

getdozer / dozer / 4423198119

pending completion
4423198119

push

github

GitHub
Bump geo from 0.23.1 to 0.24.0 (#1207)

28601 of 39109 relevant lines covered (73.13%)

51246.35 hits per line

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

88.52
/dozer-cache/src/cache/lmdb/tests/utils.rs
1
use dozer_types::types::{Field, IndexDefinition, Record, Schema, SchemaWithIndex};
2

3
use crate::cache::{
4
    lmdb::{
5
        cache::{LmdbCache, LmdbRwCache, SecondaryEnvironment},
6
        indexing::IndexingThreadPool,
7
    },
8
    RoCache, RwCache,
×
9
};
×
10

×
11
pub fn create_cache(
11✔
12
    schema_gen: impl FnOnce() -> SchemaWithIndex,
11✔
13
) -> (
11✔
14
    LmdbRwCache,
11✔
15
    IndexingThreadPool,
11✔
16
    Schema,
11✔
17
    Vec<IndexDefinition>,
11✔
18
) {
11✔
19
    let schema = schema_gen();
11✔
20
    let mut indexing_thread_pool = IndexingThreadPool::new(1);
11✔
21
    let cache = LmdbRwCache::new(
11✔
22
        Some(&schema),
11✔
23
        &Default::default(),
11✔
24
        &mut indexing_thread_pool,
11✔
25
    )
11✔
26
    .unwrap();
11✔
27
    (cache, indexing_thread_pool, schema.0, schema.1)
11✔
28
}
11✔
29

×
30
pub fn insert_rec_1(
16✔
31
    cache: &LmdbRwCache,
16✔
32
    schema: &Schema,
16✔
33
    (a, b, c): (i64, Option<String>, Option<i64>),
16✔
34
) {
16✔
35
    let mut record = Record::new(
16✔
36
        schema.identifier,
16✔
37
        vec![
16✔
38
            Field::Int(a),
16✔
39
            b.map_or(Field::Null, Field::String),
16✔
40
            c.map_or(Field::Null, Field::Int),
16✔
41
        ],
16✔
42
        None,
16✔
43
    );
16✔
44
    cache.insert(&mut record).unwrap();
16✔
45
}
16✔
46

×
47
pub fn insert_full_text(
1✔
48
    cache: &LmdbRwCache,
1✔
49
    schema: &Schema,
1✔
50
    (a, b): (Option<String>, Option<String>),
1✔
51
) {
1✔
52
    let mut record = Record::new(
1✔
53
        schema.identifier,
1✔
54
        vec![
1✔
55
            a.map_or(Field::Null, Field::String),
1✔
56
            b.map_or(Field::Null, Field::Text),
1✔
57
        ],
1✔
58
        None,
1✔
59
    );
1✔
60
    cache.insert(&mut record).unwrap();
1✔
61
}
1✔
62

×
63
pub fn get_index_counts<C: LmdbCache>(cache: &C) -> Vec<usize> {
3✔
64
    (0..cache.get_schema().1.len())
3✔
65
        .map(|index| cache.secondary_env(index).count_data().unwrap())
10✔
66
        .collect()
3✔
67
}
3✔
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