Skip to content
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

Better support for CAS primitives (e.g. INSERT ... IF NOT EXISTS) #16

Open
kilograham opened this issue Mar 11, 2015 · 0 comments
Open

Comments

@kilograham
Copy link

This seems to require v2 of the protocol just from looking at the C* side code.

I'd suggest that all update queries return a boolean, which is always true for non conditional updates.

Using prepared statements currently throws an assertion failure, because a result is given but not expected

here is the code from the server side for the result

    ColumnSpecification spec = new ColumnSpecification(ksName, cfName, CAS_RESULT_COLUMN, BooleanType.instance);
    ResultSet.Metadata metadata = new ResultSet.Metadata(Collections.singletonList(spec));
    List<List<ByteBuffer>> rows = Collections.singletonList(Collections.singletonList(BooleanType.instance.decompose(success)));

where CAS_RESULT_COLUMN is "[applied]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant