This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-zerotierone/ext/librethinkdbxx/test/upstream/sindex/nullsinstrings.yaml
2017-11-02 07:05:11 -07:00

22 lines
807 B
YAML

desc: sindex nulls in strings
table_variable_name: tbl
tests:
- cd: tbl.index_create("key")
ot: ({"created":1})
- cd: tbl.index_wait().pluck("ready")
ot: ([{"ready":true}])
# if nulls aren't escaped properly, these two "key" arrays map to the same sindex btree key
- cd: tbl.insert([{"id":1,"key":["a","b"]},{"id":2,"key":["a\u0000Sb"]}]).pluck("inserted")
ot: ({"inserted":2})
- py: tbl.get_all(["a\u0000Sb"], index="key").pluck("id")
rb: tbl.get_all(["a\u0000Sb"], :index => "key").pluck("id")
js: tbl.get_all(["a\u0000Sb"], {"index":"key"}).pluck("id")
ot: ([{"id":2}])
- py: tbl.get_all(["a","b"], index="key").pluck("id")
rb: tbl.get_all(["a","b"], :index => "key").pluck("id")
js: tbl.get_all(["a","b"], {"index":"key"}).pluck("id")
ot: ([{"id":1}])