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

Using image blob in native queries (Cassandra) #1032

Open
sohelmk opened this issue Nov 24, 2018 · 2 comments
Open

Using image blob in native queries (Cassandra) #1032

sohelmk opened this issue Nov 24, 2018 · 2 comments

Comments

@sohelmk
Copy link

sohelmk commented Nov 24, 2018

Hi,
I am unable to insert image (byte array in scala) into a blob column in cassandra. Please help or let me know if its a limitation and if any other options.

Thanks,
Sohel

@devender-yadav
Copy link
Contributor

Check ByteDataTest.java

@sohelmk
Copy link
Author

sohelmk commented Nov 28, 2018

Thanks a lot Devender,
but these examples are not for native queries. Can you please redirect to an example with native query?

for eg : code looks as follows:
var cql = "UPDATE groups SET created_by = " + grup.creator + ",access_type='" + grup.gtype + "',labels=" + grup.getLabelString() + ",updated_timestamp='" + grup.utime + "', created_timestamp='" + grup.ctime + "',updated_by=" + grup.updator + ", description='" + grup.descr + "',group_account='" + grup.grouAccount + "',group_name='" + grup.gname + "' WHERE group_id=" + grup.gid
logger.debug("Update Group native cql" + cql)

  var query = em.createNativeQuery(cql).executeUpdate()

How do i add byte array in above query?

Thanks,
Sohel

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