-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlib.rs
More file actions
52 lines (47 loc) · 1009 Bytes
/
lib.rs
File metadata and controls
52 lines (47 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
mod common;
mod connection_resilience;
mod decrypt;
mod diagnostics;
mod disable_mapping;
mod empty_result;
mod encryption_sanity;
mod eql_regression;
mod extended_protocol_error_messages;
mod insert;
mod map_concat;
mod map_literals;
mod map_match_index;
mod map_nulls;
mod map_ore_index_order;
mod map_ore_index_where;
mod map_params;
mod map_unique_index;
mod migrate;
mod multitenant;
mod ore_order_helpers;
mod passthrough;
mod pipeline;
mod schema_change;
mod select;
mod set_keyset_error;
mod simple_protocol;
mod support;
mod update;
#[macro_export]
macro_rules! value_for_type {
(String, $i:expr) => {
((b'A' + ($i - 1) as u8) as char).to_string()
};
(NaiveDate, $i:expr) => {
NaiveDate::parse_from_str(&format!("2023-01-{}", $i), "%Y-%m-%d").unwrap()
};
(Value, $i:expr) => {
serde_json::json!({"n": $i, "s": format!("{}", $i) })
};
(bool, $i:expr) => {
$i % 2 == 0
};
($type:ident, $i:expr) => {
$i as $type
};
}