我正在尝试将 boto3 dynamodb 条件表达式(使用 boto3.dynamodb.conditions 中的类型)转换为其字符串表示形式。当然,这可以手动编码,但我自然更希望能够找到 AWS 自己开发的东西。
Key("name").eq("new_name") & Attr("description").begins_with("new")
Run Code Online (Sandbox Code Playgroud)
会成为
"name = 'new_name' and begins_with(description, 'new')"
Run Code Online (Sandbox Code Playgroud)
我一直在检查 boto3 和 boto 核心代码,但到目前为止没有成功,但我认为它一定存在于代码库中的某个地方......