| 1 |
// This macro exists to workaround |
| 2 |
// https://github.com/rust-lang/rust/issues/149845 |
| 3 |
// |
| 4 |
// The underlying problem there is that for sql function |
| 5 |
// diesel generates items in multiple namespaces (type and function) |
| 6 |
// with the same name. We often want only to import from one namespace |
| 7 |
// which can be done by shadowing the relevant items from the other |
| 8 |
// namespace with a private item after the glob import. |
| 9 |
// |
| 10 |
// TODO: Fixme Diesel 3.0, resolve this ambiguity in the macro itself |
| 11 |
macro_rules! make_proxy_mod { |
| 12 |
($name:ident, $path:path) => { |
| 13 |
#[allow(hidden_glob_reexports, non_camel_case_types, dead_code)] |
| 14 |
mod $name { |
| 15 |
#[doc(inline)] |
| 16 |
pub use $path::*; |
| 17 |
|
| 18 |
// Drop unintended types |
| 19 |
type abbrev = (); |
| 20 |
type array_append = (); |
| 21 |
type array_cat = (); |
| 22 |
type array_dims = (); |
| 23 |
type array_fill_with_lower_bound = (); |
| 24 |
type array_fill = (); |
| 25 |
type array_length = (); |
| 26 |
type array_lower = (); |
| 27 |
type array_ndims = (); |
| 28 |
type array_position_with_subscript = (); |
| 29 |
type array_position = (); |
| 30 |
type array_positions = (); |
| 31 |
type array_prepend = (); |
| 32 |
type array_remove = (); |
| 33 |
type array_replace = (); |
| 34 |
type array_sample = (); |
| 35 |
type array_shuffle = (); |
| 36 |
type array_to_json = (); |
| 37 |
type array_to_string_with_null_string = (); |
| 38 |
type array_to_string = (); |
| 39 |
type array_upper = (); |
| 40 |
type avg = (); |
| 41 |
type broadcast = (); |
| 42 |
type cardinality = (); |
| 43 |
type family = (); |
| 44 |
type first_value = (); |
| 45 |
type host = (); |
| 46 |
type hostmask = (); |
| 47 |
type inet_merge = (); |
| 48 |
type inet_same_family = (); |
| 49 |
type isempty = (); |
| 50 |
type json_array_length = (); |
| 51 |
type json_build_array_0 = (); |
| 52 |
type json_build_array_1 = (); |
| 53 |
type json_build_array_2 = (); |
| 54 |
type json_extract_path_1 = (); |
| 55 |
type json_extract_path_2 = (); |
| 56 |
type json_extract_path_text_1 = (); |
| 57 |
type json_extract_path_text_2 = (); |
| 58 |
type json_object_with_keys_and_values = (); |
| 59 |
type json_object = (); |
| 60 |
type json_populate_record = (); |
| 61 |
type json_strip_nulls = (); |
| 62 |
type json_typeof = (); |
| 63 |
type jsonb_array_length = (); |
| 64 |
type jsonb_build_array_0 = (); |
| 65 |
type jsonb_build_array_1 = (); |
| 66 |
type jsonb_build_array_2 = (); |
| 67 |
type jsonb_extract_path_1 = (); |
| 68 |
type jsonb_extract_path_2 = (); |
| 69 |
type jsonb_extract_path_text_1 = (); |
| 70 |
type jsonb_extract_path_text_2 = (); |
| 71 |
type jsonb_insert_with_insert_after = (); |
| 72 |
type jsonb_insert = (); |
| 73 |
type jsonb_object_with_keys_and_values = (); |
| 74 |
type jsonb_object = (); |
| 75 |
type jsonb_populate_record = (); |
| 76 |
type jsonb_pretty = (); |
| 77 |
type jsonb_set_create_if_missing = (); |
| 78 |
type jsonb_set_lax = (); |
| 79 |
type jsonb_set = (); |
| 80 |
type jsonb_strip_nulls = (); |
| 81 |
type jsonb_typeof = (); |
| 82 |
type lag_with_offset_and_default = (); |
| 83 |
type lag_with_offset = (); |
| 84 |
type lag = (); |
| 85 |
type last_value = (); |
| 86 |
type lead_with_offset_and_default = (); |
| 87 |
type lead_with_offset = (); |
| 88 |
type lead = (); |
| 89 |
type lower_inc = (); |
| 90 |
type lower_inf = (); |
| 91 |
type lower = (); |
| 92 |
type masklen = (); |
| 93 |
type max = (); |
| 94 |
type min = (); |
| 95 |
type multirange_merge = (); |
| 96 |
type netmask = (); |
| 97 |
type network = (); |
| 98 |
type nth_value = (); |
| 99 |
type range_merge = (); |
| 100 |
type row_to_json = (); |
| 101 |
type set_masklen = (); |
| 102 |
type sum = (); |
| 103 |
type to_json = (); |
| 104 |
type to_jsonb = (); |
| 105 |
type trim_array = (); |
| 106 |
type upper_inc = (); |
| 107 |
type upper_inf = (); |
| 108 |
type upper = (); |
| 109 |
|
| 110 |
// sqlite |
| 111 |
type json = (); |
| 112 |
type json_array_0 = (); |
| 113 |
type json_array_1 = (); |
| 114 |
type json_array_2 = (); |
| 115 |
type json_array_length_with_path = (); |
| 116 |
type json_error_position = (); |
| 117 |
type json_group_array = (); |
| 118 |
type json_group_object = (); |
| 119 |
type json_object_0 = (); |
| 120 |
type json_object_1 = (); |
| 121 |
type json_object_2 = (); |
| 122 |
type json_patch = (); |
| 123 |
type json_pretty = (); |
| 124 |
type json_pretty_with_indentation = (); |
| 125 |
type json_quote = (); |
| 126 |
type json_remove_0 = (); |
| 127 |
type json_remove_1 = (); |
| 128 |
type json_remove_2 = (); |
| 129 |
type json_type = (); |
| 130 |
type json_type_with_path = (); |
| 131 |
type json_valid = (); |
| 132 |
type json_valid_with_flags = (); |
| 133 |
type jsonb = (); |
| 134 |
type jsonb_array_0 = (); |
| 135 |
type jsonb_array_1 = (); |
| 136 |
type jsonb_array_2 = (); |
| 137 |
type jsonb_group_array = (); |
| 138 |
type jsonb_group_object = (); |
| 139 |
type jsonb_object_0 = (); |
| 140 |
type jsonb_object_1 = (); |
| 141 |
type jsonb_object_2 = (); |
| 142 |
type jsonb_patch = (); |
| 143 |
type jsonb_remove_0 = (); |
| 144 |
type jsonb_remove_1 = (); |
| 145 |
type jsonb_remove_2 = (); |
| 146 |
} |
| 147 |
}; |
| 148 |
} |