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',['fake1@fake1.com', 'fake2@fake2.com']);
result of select * from employees
id | emails | name
----+----------------------------------------+--------
1 | ['fake1@fake1.com', 'fake2@fake2.com'] | shahid
How we can insert list using Astyanax ?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.