-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use 'prefix' and 'start' together #278
Comments
This is weird. If you instead try the repro code using this mutation it will give you this result:
bt.table('test4').mutate([
{
key: 'a1',
method: 'insert',
data: { c: { test: 1 } }
},
{
key: 'a2',
method: 'insert',
data: { c: { test: 2 } }
},
{
key: 'a3',
method: 'insert',
data: { c: { test: 3 } }
},
{
key: 'b1',
method: 'insert',
data: { c: { test: 4 } }
},
{
key: 'b2',
method: 'insert',
data: { c: { test: 5 } }
},
{
key: 'b3',
method: 'insert',
data: { c: { test: 6 } }
},
{
key: 'c1',
method: 'insert',
data: { c: { test: 4 } }
},
{
key: 'c2',
method: 'insert',
data: { c: { test: 5 } }
},
{
key: 'c3',
method: 'insert',
data: { c: { test: 6 } }
},
]) |
can you try below? This should give you all row with prefix b starting from b2.
|
@ajaaym that gives me the following error:
|
Sorry there was a typo. Use end: ‘c’ instead of end: ‘b’. |
That won't help because I don't know the end in my actual code. I only know the prefix and the start key. |
In that case you can use below.
|
I like ajaaym's solution. This also seems to work as intended. I don't think that we'll be doing more on this issue, unless there's a clear way forward. |
I disagree. The work around is fine but the implications here are huge. Lets say you always use |
Perhaps we can throw an exception if both are set. WDYT? |
I can't use this library knowing you ignore reported security issues |
@moander, why do you think this is a security issue? |
For Cloud Bigtable clients, |
There are four conflicting conditions that need to be exclusive:
There needs to be an exception if more than one of those conditions exist in the options, since there's no intuitive way to evaluate 2+ conditions. |
The exceptions were added in #315 |
When prefix and start is used as read options only prefix is considered.
Expected result is to get rows b2 and b3.
Environment details
@google-cloud/bigtable
version: 0.15.0Steps to reproduce
The text was updated successfully, but these errors were encountered: