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

Function create_simple_table

tests/rust/src/unicode.rs:13–37  ·  view source on GitHub ↗
(c: &aws_sdk_dynamodb::Client)

Source from the content-addressed store, hash-verified

11use std::collections::HashMap;
12
13async fn create_simple_table(c: &aws_sdk_dynamodb::Client) -> String {
14 let name = format!("test_unicode_{}", ts());
15 c.create_table()
16 .table_name(&name)
17 .key_schema(
18 KeySchemaElement::builder()
19 .attribute_name("pk")
20 .key_type(KeyType::Hash)
21 .build()
22 .unwrap(),
23 )
24 .attribute_definitions(
25 AttributeDefinition::builder()
26 .attribute_name("pk")
27 .attribute_type(ScalarAttributeType::S)
28 .build()
29 .unwrap(),
30 )
31 .billing_mode(BillingMode::PayPerRequest)
32 .send()
33 .await
34 .unwrap();
35 wait_for_active(c, &name).await;
36 name
37}
38
39async fn create_composite_table(c: &aws_sdk_dynamodb::Client) -> String {
40 let name = format!("test_unicode_comp_{}", ts());

Callers 7

unicode_string_valuesFunction · 0.70
emojiFunction · 0.70
single_quote_in_valuesFunction · 0.70
long_unicode_stringFunction · 0.70
unicode_in_hash_keyFunction · 0.70

Calls 4

table_nameMethod · 0.80
create_tableMethod · 0.80
wait_for_activeFunction · 0.70
buildMethod · 0.45

Tested by

no test coverage detected