Skip to content
This repository was archived by the owner on Dec 30, 2020. It is now read-only.

True on CassandraStatement#execute when inserting #24

Open
benyaa opened this issue Dec 11, 2018 · 0 comments
Open

True on CassandraStatement#execute when inserting #24

benyaa opened this issue Dec 11, 2018 · 0 comments

Comments

@benyaa
Copy link

benyaa commented Dec 11, 2018

Hey,
I was trying to use the jdbc wrapper to batch insert(using batch update of Spring's JdbcTemplate).
It is basically an array of sql insert statements(strings)..
Now, what happens, is that the check that is done to see if these update statements are valid is if the CassandraStatement#execute function returns true.. Now this happens because the only check that is done this is "this.currentResultSet != null" while it is not null(but the "this.currentResultSet.hasMoreRows()" immediately returns false(so there are no rows returned in this result set..
When it returns true, the JdbcTemplate of Spring throws an exception of it being an invalid batch SQL statement..
The only thing needed is turn this row into "this.currentResultSet != null && this.currentResultSet.hasMoreRows()" or any equivalent ..
Thanks :)

EDIT:
Also, when opening a connection, it prints "Datacenter: %s; Host: %s; Rack: %s"(forgotten String.fomrat())..

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

No branches or pull requests

1 participant