class CQL::PrimaryKey(T)

Overview

Primary key column definition

Example:

schema.table :members do
  primary :id, Int64
  column :name, String
end

Defined in:

primary_key.cr

Constructors

Instance Method Summary

Instance methods inherited from class CQL::Column(T)

copy_to(table : Table) : BaseColumn copy_to, expression(table_alias : String | Nil) : Expression::BaseColumn
expression : Expression::BaseColumn
expression
, size : Int32 | Nil size, strict_type strict_type, type type

Constructor methods inherited from class CQL::Column(T)

new(name : Symbol, as_name : String | Nil = nil, null : Bool = false, default : DB::Any = nil, unique : Bool = false, size : Int32 | Nil = nil, index : Index | Nil = nil, version_number : Bool = false) new

Instance methods inherited from class CQL::BaseColumn

copy_to(table : Table) : BaseColumn copy_to

Constructor Detail

def self.new(name : Symbol = :id, as_name : String | Nil = nil, auto_increment : Bool = true, unique : Bool = true, default : DB::Any = nil) #

[View source]

Instance Method Detail

def as_name #

[View source]
def auto_increment? : Bool #

[View source]
def unique? : Bool #
Description copied from class CQL::Column(T)

:nodoc:


[View source]