class Cql::PrimaryKey(T)
- Cql::PrimaryKey(T)
- Cql::Column(T)
- Cql::BaseColumn
- Reference
- Object
Overview
Primary key column definition
Example:
schema.table :users do
primary :id, Int32
column :name, String
end
Defined in:
primary_key.crConstructors
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)
#