我的架构中有这些类:
gem pristine --all
当我从'hour'linkmap查询单个值时,我获得的不同'分钟'记录比查询范围时更多:
create class hour extends V
create class minute extends V
create class tdindex extends V
create property hour.hour integer
create property hour.minute linkmap minute
create property minute.index linkset tdindex
这不是一个错误吗?或者我误解了范围查询应该如何工作?
当我查看记录时,#13:449和#13:450确实是我对最后一次查询所期望的正确结果。
这是另一个查询结果:
orientdb {db=rawxp}> select expand(minute[29]) from hour where hour=7
----+-------+------+-----
# |@RID |@CLASS|index
----+-------+------+-----
0 |#13:449|minute|[281]
----+-------+------+-----
1 item(s) found. Query executed in 0.002 sec(s).
orientdb {db=rawxp}> select expand(minute[30]) from hour where hour=7
----+-------+------+-----
# |@RID |@CLASS|index
----+-------+------+-----
0 |#13:450|minute|[289]
----+-------+------+-----
1 item(s) found. Query executed in 0.002 sec(s).
orientdb {db=rawxp}> select expand(minute[29-30]) from hour where hour=7
----+-------+------+-----
# |@RID |@CLASS|index
----+-------+------+-----
0 |#13:448|minute|[287]
1 |#13:451|minute|[283]
----+-------+------+-----
2 item(s) found. Query executed in 0.002 sec(s).
看起来是正确的,因此逗号运算符似乎正常工作。
以下是显示此问题的数据库的链接(使用bz2或gzip压缩):https://drive.google.com/folderview?id=0B7gmW6cqkVoHWnNVMnhLaGJkYzA&usp=sharing
答案 0 :(得分:0)
您可以使用以下查询
select expand(minute[29,30]) from hour where hour=7
修改
您可以使用此查询
SELECT expand(minute["29-35"]) FROM hour where hour=7