class AlreadyExistsError
Raised when the query attempted to create a keyspace or a table that was already existing.
Inherits
Methods
keyspace
Returns keyspace
table
Returns table or nil
This documentation is no longer maintained. For the latest information, see github.com/datastax/ruby-driver
Raised when the query attempted to create a keyspace or a table that was already existing.
session.execute("USE my_keyspace")
session.execute("CREATE TABLE users (user_id INT PRIMARY KEY)")
begin
session.execute("CREATE TABLE users (user_id INT PRIMARY KEY)")
rescue Cassandra::Errors::AlreadyExistsError => e
p ['already exists', e.keyspace, e.table]
end