Sha256: 9d037872152bb17a7e4bae48567153f07ef3196805db843b4dd958835752bfe1

Contents?: true

Size: 1 KB

Versions: 5

Compression:

Stored size: 1 KB

Contents

require "securerandom"

class Cassie::TypeTester
  include Cassie::Model

  self.table_name = "type_testers"
  self.keyspace = "test"
  self.primary_key = [:id]

  column :id, :varchar
  column :int_value, :int
  column :varint_value, :varint
  column :bigint_value, :bigint
  column :float_value, :float
  column :double_value, :double
  column :decimal_value, :decimal
  column :ascii_value, :ascii
  column :varchar_value, :varchar
  column :text_value, :text
  column :blob_value, :blob
  column :boolean_value, :boolean
  column :timestamp_value, :timestamp
  column :uuid_value, :uuid
  column :timeuuid_value, :timeuuid
  column :inet_value, :inet
  column :list_value, :list
  column :set_value, :set
  column :map_value, :map

  before_create { self.id = SecureRandom.uuid }
end

class Cassie::TypeTesterCounter
  include Cassie::Model

  self.table_name = "type_tester_counters"
  self.keyspace = "test"
  self.primary_key = [:id]

  column :id, :varchar
  column :counter_value, :counter, as: :counter_column
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
whi-cassie-1.3.4 spec/models/type_tester.rb
whi-cassie-1.3.2 spec/models/type_tester.rb
whi-cassie-1.3.1 spec/models/type_tester.rb
whi-cassie-1.3.0 spec/models/type_tester.rb
whi-cassie-1.2.0 spec/models/type_tester.rb