MCPcopy Create free account
hub / github.com/ExtendDB/extenddb / tables

Function tables

tests/rust/src/test_base.rs:139–223  ·  view source on GitHub ↗

Get or initialize the shared test tables.

()

Source from the content-addressed store, hash-verified

137
138/// Get or initialize the shared test tables.
139pub async fn tables() -> &'static TestTables {
140 TEST_TABLES
141 .get_or_init(|| async {
142 let c = client();
143 let suffix = format!(
144 "_{}_{}",
145 std::time::SystemTime::now()
146 .duration_since(std::time::UNIX_EPOCH)
147 .unwrap()
148 .as_millis(),
149 COUNTER.fetch_add(1, Ordering::SeqCst)
150 );
151
152 let t = TestTables {
153 simple_key_string: format!("SimpleKeyString{suffix}"),
154 comp_key_string_number: format!("CompKeyStringNumber{suffix}"),
155 comp_key_blob_number: format!("CompKeyBlobNumber{suffix}"),
156 comp_key_number_string: format!("CompKeyNumberString{suffix}"),
157 simple_key_string_gsi: format!("SimpleKeyStringGSI{suffix}"),
158 comp_key_string_string_gsi: format!("CompKeyStringStringGSI{suffix}"),
159 };
160
161 create_table(
162 c,
163 &t.simple_key_string,
164 HASH_KEY_S,
165 ScalarAttributeType::S,
166 None,
167 None,
168 None,
169 )
170 .await;
171 create_table(
172 c,
173 &t.comp_key_string_number,
174 HASH_KEY_S,
175 ScalarAttributeType::S,
176 Some(RANGE_KEY_N),
177 Some(ScalarAttributeType::N),
178 None,
179 )
180 .await;
181 create_table(
182 c,
183 &t.comp_key_blob_number,
184 HASH_KEY_B,
185 ScalarAttributeType::B,
186 Some(RANGE_KEY_N),
187 Some(ScalarAttributeType::N),
188 None,
189 )
190 .await;
191 create_table(
192 c,
193 &t.comp_key_number_string,
194 HASH_KEY_N,
195 ScalarAttributeType::N,
196 Some(RANGE_KEY_S),

Callers 15

query_gsi_basicFunction · 0.85
query_gsi_multiple_itemsFunction · 0.85
query_gsi_with_filterFunction · 0.85
query_gsi_empty_resultFunction · 0.85
query_non_existent_gsiFunction · 0.85
set_arithmetic_decrementFunction · 0.85
set_list_appendFunction · 0.85
set_list_prependFunction · 0.85

Calls 3

clientFunction · 0.85
create_tableFunction · 0.85
create_table_with_gsiFunction · 0.70

Tested by

no test coverage detected