Firebase中的查询无效

时间:2017-10-12 05:12:01

标签: swift firebase

我试图获得价值" 1507783288.001401"来自我的Swift App中的Firebase。以下代码不会返回任何结果:

fireBase.child("metrics")
    .queryOrdered(byChild: "timestamp")
    .queryStarting(atValue: 1507705200.0)
    .queryEnding(atValue: 1507791599)

但是,如果我更改" queryEnding"至1507791598它将返回" 1507783288.001401"。

我作为时间戳记存储的值是Swift" timeIntervalSince1970"。

我发现了这一点,但我不确定这是否意味着我是否可以将这些时间戳存储在Firebase中:

  

数值优先级以IEEE 754双精度存储和排序   浮点数字。密钥始终存储为字符串   仅当它们可以解析为32位整数时才被视为数字。

(来自https://firebase.google.com/docs/database/rest/retrieve-data

0 个答案:

没有答案
相关问题