[英]How to Scan DynamoDb Not Exists
我正在使用这个git Repo使用Laravel DynamoDB
https://github.com/baopham/laravel-dynamodb
我想查询不存在
试过这个没用
$logs = $ShopperLogs->where('date', '>=', $from)->where('date', '<=', $to)->where('op_city_id', 'Not Exists')->get();
并试过这个,也没用
$logs = $ShopperLogs->where('date', '>=', $from)->where('date', '<=', $to)->where('op_city_id', null)->get();
whereNull()和whereNotNull()
NULL和NOT_NULL仅检查属性是否存在而不是其值为null
请参阅: http : //docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html
$model->whereNull('name');
$model->whereNotNull('name');
参考: laravel-dynamodb
try ->whereNull('op_city_id')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.