(
c: &Client,
name: &str,
hash_key: &str,
hash_type: ScalarAttributeType,
range_key: Option<&str>,
range_type: Option<ScalarAttributeType>,
gsis: Option<Vec<GlobalSecondary
| 223 | } |
| 224 | |
| 225 | async 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 | |
| 253 | async fn create_table_raw( |
| 254 | c: &Client, |
no test coverage detected