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

Function create_table

tests/rust/src/test_base.rs:225–251  ·  view source on GitHub ↗
(
    c: &Client,
    name: &str,
    hash_key: &str,
    hash_type: ScalarAttributeType,
    range_key: Option<&str>,
    range_type: Option<ScalarAttributeType>,
    gsis: Option<Vec<GlobalSecondary

Source from the content-addressed store, hash-verified

223}
224
225async fn create_table(
226 c: &Client,
227 name: &str,
228 hash_key: &str,
229 hash_type: ScalarAttributeType,
230 range_key: Option<&str>,
231 range_type: Option<ScalarAttributeType>,
232 gsis: Option<Vec<GlobalSecondaryIndex>>,
233) {
234 let mut attr_defs = vec![AttributeDefinition::builder()
235 .attribute_name(hash_key)
236 .attribute_type(hash_type)
237 .build()
238 .unwrap()];
239
240 if let (Some(rk), Some(rt)) = (range_key, range_type) {
241 attr_defs.push(
242 AttributeDefinition::builder()
243 .attribute_name(rk)
244 .attribute_type(rt)
245 .build()
246 .unwrap(),
247 );
248 }
249
250 create_table_raw(c, name, hash_key, range_key, attr_defs, gsis).await;
251}
252
253async fn create_table_raw(
254 c: &Client,

Callers 1

tablesFunction · 0.85

Calls 2

create_table_rawFunction · 0.85
buildMethod · 0.45

Tested by

no test coverage detected