我有一个 DataStax Astra 数据库,我有这个例子来说明如何获取具有特定用户名的用户:
curl --request GET \
--url https://${ASTRA_DB_ID}-${ASTRA_DB_REGION}.apps.astra.datastax.com/api/rest/v2/keyspaces/${ASTRA_DB_KEYSPACE}/user?where=\{"user_username":\{"$eq":"'+*username_value_here*+'"\}\}' \
--header "x-cassandra-token: ${ASTRA_DB_APPLICATION_TOKEN}"
由于 Cassandra,我没有选项允许过滤:
{"description":"Bad request: org.apache.cassandra.stargate.exceptions.InvalidRequestException: Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING","code":400}
我在任何地方都找不到如何在 curl 命令中启用此选项,所以问题是我如何编写这个(如果可能的话)或者有更好的选择。欢迎任何帮助。