Couchbase Lite 复合键范围为空值
Couchbase lite compound key range with nulls
我可以使用
格式的复合键查看我的天气数据
[ "District", "2018", "05", "23", "06", "00", "00" ]
在服务器上,我可以使用开始键和结束键查询一天的天气
startkey=[ "District","2018","05","23",null,null,null]
endkey=[ "District","2018","05","23","\u0fff","\u0fff","\u0fff"]
这为我提供了 2018-05-23 地区的所有天气。现在,在 android 上将文档同步到 couchbase lite 后,我正在尝试复制键范围。
我试过了
startkey=arrayListOf("District","2018","05","23",null,null,null)
endkey=arrayListOf("District","2018","05","23","\u0fff","\u0fff","\u0fff")
但是这个 returns 是一个空数据集。我如何格式化我的密钥以复制我在服务器上所做的事情。
Couchbase Server 和 Couchbase Lite 的查询语法不同,因为它清楚地描述了我们在服务器上构建复合键数组的方式null 已被解析以获得要输出的字典序正确值,并且 endKey 中提供的 Unicode 也会发生同样的情况
假设您的复合键
[ "District", "2018", "05", "23", "06", "00", "00" ]
[ "DistrictName","year","month","day","hour,"minute","second"]
mobileside(Couchbase Lite) 上可能有两个选项来查询不提供 hour/min/second 值的复合键
要么
null 和 Unicode 的更多值表示:
发件人:
startkey=arrayListOf("District","2018","05","23",null,null,null)
endkey=arrayListOf("District","2018","05","23","\u0fff","\u0fff","\u0fff")
收件人:
startkey=arrayListOf("District","2018","05","23","00","00","01")
endkey=arrayListOf("District","2018","05","23","23","59","59")
我可以使用
格式的复合键查看我的天气数据[ "District", "2018", "05", "23", "06", "00", "00" ]
在服务器上,我可以使用开始键和结束键查询一天的天气
startkey=[ "District","2018","05","23",null,null,null]
endkey=[ "District","2018","05","23","\u0fff","\u0fff","\u0fff"]
这为我提供了 2018-05-23 地区的所有天气。现在,在 android 上将文档同步到 couchbase lite 后,我正在尝试复制键范围。 我试过了
startkey=arrayListOf("District","2018","05","23",null,null,null)
endkey=arrayListOf("District","2018","05","23","\u0fff","\u0fff","\u0fff")
但是这个 returns 是一个空数据集。我如何格式化我的密钥以复制我在服务器上所做的事情。
Couchbase Server 和 Couchbase Lite 的查询语法不同,因为它清楚地描述了我们在服务器上构建复合键数组的方式null 已被解析以获得要输出的字典序正确值,并且 endKey 中提供的 Unicode 也会发生同样的情况 假设您的复合键
[ "District", "2018", "05", "23", "06", "00", "00" ]
[ "DistrictName","year","month","day","hour,"minute","second"]
mobileside(Couchbase Lite) 上可能有两个选项来查询不提供 hour/min/second 值的复合键 要么 null 和 Unicode 的更多值表示:
发件人:
startkey=arrayListOf("District","2018","05","23",null,null,null)
endkey=arrayListOf("District","2018","05","23","\u0fff","\u0fff","\u0fff")
收件人:
startkey=arrayListOf("District","2018","05","23","00","00","01")
endkey=arrayListOf("District","2018","05","23","23","59","59")