flesh out the query stuff
This commit is contained in:
@@ -253,6 +253,18 @@ table_status_to_string :: proc(status: Table_Status) -> string {
|
||||
return "ACTIVE"
|
||||
}
|
||||
|
||||
table_status_from_string :: proc(s: string) -> Table_Status {
|
||||
switch s {
|
||||
case "CREATING": return .CREATING
|
||||
case "UPDATING": return .UPDATING
|
||||
case "DELETING": return .DELETING
|
||||
case "ACTIVE": return .ACTIVE
|
||||
case "ARCHIVING": return .ARCHIVING
|
||||
case "ARCHIVED": return .ARCHIVED
|
||||
}
|
||||
return .ACTIVE
|
||||
}
|
||||
|
||||
// Table description
|
||||
Table_Description :: struct {
|
||||
table_name: string,
|
||||
@@ -352,6 +364,17 @@ error_to_response :: proc(err_type: DynamoDB_Error_Type, message: string) -> str
|
||||
return fmt.aprintf(`{{"__type":"%s","message":"%s"}}`, type_str, message)
|
||||
}
|
||||
|
||||
// Build an Attribute_Value with the correct scalar type from raw bytes
|
||||
build_attribute_value_with_type :: proc(raw_bytes: []byte, attr_type: Scalar_Attribute_Type) -> Attribute_Value {
|
||||
owned := strings.clone(string(raw_bytes))
|
||||
switch attr_type {
|
||||
case .S: return String(owned)
|
||||
case .N: return Number(owned)
|
||||
case .B: return Binary(owned)
|
||||
}
|
||||
return String(owned)
|
||||
}
|
||||
|
||||
// Deep copy an attribute value
|
||||
attr_value_deep_copy :: proc(attr: Attribute_Value) -> Attribute_Value {
|
||||
switch v in attr {
|
||||
|
||||
Reference in New Issue
Block a user