PHP-如何扫描不存在的DynamoDb
作者:互联网
我正在使用此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 and NOT_NULL only check for the attribute presence not its value
being null
看到:
http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html$model->whereNull('name'); $model->whereNotNull('name');
参考号:laravel-dynamodb
标签:laravel,eloquent,amazon-dynamodb,php 来源: https://codeday.me/bug/20191108/2007973.html