alias Cassandra::DBApi::Type

Overview

All supported Cassandra types.

Items of collections are wrapped with Cassandra::DBApi::Any. A query parameter example:

db.exec("insert into posts (id, authors) values (?, ?)",
        1,
        Any.new([Any.new("A Post")]))

A query result example:

db.query("select id, authors from posts") do |rs|
  rs.each do
    puts rs.read(Int32), rs.read(Array(Any)).map(&.as_s)
  end
end

Alias Definition

Array(Cassandra::DBApi::Any) | Bool | Cassandra::DBApi::Date | Cassandra::DBApi::Time | Cassandra::DBApi::TimeUuid | Cassandra::DBApi::Uuid | Float32 | Float64 | Hash(Cassandra::DBApi::Any, Cassandra::DBApi::Any) | Int16 | Int32 | Int64 | Int8 | Set(Cassandra::DBApi::Any) | Slice(UInt8) | String | Time | Nil

Defined in:

cassandra/dbapi.cr