class Cql::PrimaryKey(T)

Overview

Primary key column definition

Example:

schema.table :users do
  primary :id, Int32
  column :name, String
end

Defined in:

primary_key.cr

Constructors

Instance Method Summary

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

expression expression, validate!(value) validate!

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

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

Constructor Detail

def self.new(name : Symbol = :id, type : PrimaryKeyType = Int64.class, 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]