Shahid Ghafoor
Shahid Ghafoor

Reputation: 3103

Insert List In cassandra using astyanax

I am facing a problem in Cassandra to insert list

create table employees(
id int PRIMARY KEY,
name varchar,
emails list <varchar>
);

CQL query

insert into employees (id, name, emails) values (1,'fake_name',['[email protected]', '[email protected]']);

result of select * from employees

 id | emails                                | name
----+----------------------------------------+--------
 1 | ['[email protected]', '[email protected]'] | shahid

How we can insert list using Astyanax ?

Upvotes: 1

Views: 1595

Answers (1)

jbellis
jbellis

Reputation: 19377

Astayanax is still based on the old Thrift API, so it is missing the underlying abstractions to support CQL collections like Lists. You should use the CQL Java Driver instead: https://github.com/datastax/java-driver

Upvotes: 1

Related Questions