@@ -14,7 +14,7 @@ fn create_item(
14
14
batch. insert ( table, & id, format ! ( "{name} [{year}]" ) ) ;
15
15
16
16
let ts_bytes = year. to_be_bytes ( ) ;
17
- let key = format_bytes ! ( b"{}# {}" , ts_bytes, id. as_bytes( ) ) ;
17
+ let key = format_bytes ! ( b"{}\0 {}" , ts_bytes, id. as_bytes( ) ) ;
18
18
19
19
batch. insert ( index, & key, "" ) ;
20
20
@@ -30,6 +30,7 @@ fn main() -> fjall::Result<()> {
30
30
31
31
let mut batch = keyspace. batch ( ) ;
32
32
create_item ( & mut batch, & items, & sec, "Remain in Light" , 1_980 ) ?;
33
+ create_item ( & mut batch, & items, & sec, "Seventeen Seconds" , 1_980 ) ?;
33
34
create_item ( & mut batch, & items, & sec, "Power, Corruption & Lies" , 1_983 ) ?;
34
35
create_item ( & mut batch, & items, & sec, "Hounds of Love" , 1_985 ) ?;
35
36
create_item ( & mut batch, & items, & sec, "Black Celebration" , 1_986 ) ?;
@@ -47,7 +48,7 @@ fn main() -> fjall::Result<()> {
47
48
48
49
// Get items from 1990 to 2000 (exclusive)
49
50
let lo = 1_990_u64 ;
50
- let hi = 1_999_u64 ;
51
+ let hi = 1_999_u64 ; #
51
52
52
53
println ! ( "Searching for [{lo} - {hi}]" ) ;
53
54
@@ -57,7 +58,7 @@ fn main() -> fjall::Result<()> {
57
58
let ( k, _) = kv?;
58
59
59
60
// Get ID
60
- let primary_key = k. split ( |& c| c == b'# ' ) . nth ( 1 ) . unwrap ( ) ;
61
+ let primary_key = k. split ( |& c| c == b'\0 ' ) . nth ( 1 ) . unwrap ( ) ;
61
62
62
63
// Get from primary index
63
64
let item = items. get ( primary_key) ?. unwrap ( ) ;
0 commit comments