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

Conditional updates are not supported #68

Open
CBox opened this issue Apr 5, 2015 · 3 comments
Open

Conditional updates are not supported #68

CBox opened this issue Apr 5, 2015 · 3 comments

Comments

@CBox
Copy link

CBox commented Apr 5, 2015

Is there a way to make Conditional updates supported?

When I'm adding IF NOT EXISTS I'm getting:
Invalid: Conditional updates are not supported by the protocol version in use. You need to upgrade to a driver using the native protocol v2.

Thanks!

@mistercorea
Copy link

It's working on mine. Can you post your whole CQL and table setup?

for mine
$db->beginBatch();
$q = "INSERT INTO sessions (id,data) VALUES (:id,:data) IF NOT EXISTS";
$db->query($q,['id'=>$id,'data'=>$data]);
$db->applyBatch();

make sure your query is valid on cqlsh before you run it on this library

@CBox
Copy link
Author

CBox commented Apr 24, 2015

This right, It's really working when using Batch, if not there is an error.
Good enough for me, Thanks!

@CBox
Copy link
Author

CBox commented Apr 28, 2015

When using IF NOT EXISTS in a batch, even if one row exists the batch will not insert or update anything.
Is there way to get around that? So each statement in a batch will be not related to the other when using if not exists?

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

2 participants