Closed hanumanjiblog closed 3 years ago
Keys are sorted in lexicographic order. In \xff:uid3
, the first character (or byte) is greater than the first character of any of your keys (t
) so it will not match anything. Same goes for uid3
: that's u
vs t
.
So please tell me how to find uid3 without using 'type:user:'
If i use "t" it also not working please tell how to find this key.
Yes, also I tried this but it not working, that us very important feature, @vweevers Please try to solve/answer this.
Closing because:
type:user:
doesn't work.
Not able to find specific part of the key "uid3" using createReadStream
const level = require('level') const db = level('my-db') setImmediate(async () => { await db.put('type:user:uid1', 'value') await db.put('type:user:uid2', 'value') await db.put('type:user:uid3', 'value') // not working- db.createReadStream({ gte: '\xff:uid3' }).on('data', function (data) { console.log(data.key, '=', data.value) }) // not working- db.createReadStream({ gte: 'uid3' }).on('data', function (data) { console.log(data.key, '=', data.value) }) });