문제

I would like to query a range in a TaffyDB (Greater then x but less then y). What I try is:

mydb({myvalue:{gt:2700},myvalue:{lt:3000}})

But for sure that can not work this way. The second myvalue just overrites the first one in the Object.

A work around would be to create the db-record with a cloned myvalue (=> myvalue1, myvalue2) and then query it this way:

mydb({myvalue1:{gt:2700},myvalue2:{lt:3000}})

But it would be a bit dirty.

Anyone got a solution?

도움이 되었습니까?

해결책

That works:

mydb({myvalue:{gt:2700}},{myvalue:{lt:3000}})
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top