class Marten::DB::Management::Column::Enum
Included Modules
- Marten::DB::Management::Column::IsBuiltInColumn
Defined in:
marten/db/management/column.crmarten/db/management/column/enum.cr
Constructors
Instance Method Summary
-
#clone
Returns a copy of the column.
-
#same_config?(other : Base)
Returns true if the other column (which can have a different name) corresponds to the same configuration.
-
#serialize_args : ::String
Returns a serialized version of the column arguments to be used when generating migrations.
-
#sql_quoted_default_value(connection : Connection::Base) : ::String | Nil
Returns the literal quoted value of the default value for a specific database connection.
-
#sql_type(connection : Connection::Base) : ::String
Returns the raw type of the column to use for the column at hand and a specific database connection.
-
#sql_type_suffix(connection : Connection::Base) : ::String | Nil
Returns the raw type suffix of the column to use for the column at hand and a specific database connection.
- #values : Array(String)
Instance methods inherited from class Marten::DB::Management::Column::Base
==(other : self)
==,
clone
clone,
default : Bool | Float32 | Float64 | Int32 | Int64 | Slice(UInt8) | String | Time | Nil
default,
index? : Bool
index?,
name : String
name,
name=(name : ::String)
name=,
null? : Bool
null?,
primary_key=(primary_key : ::Bool)
primary_key=,
primary_key? : Bool
primary_key?,
same_config?(other : Base)
same_config?,
serialize_args : ::String
serialize_args,
sql_quoted_default_value(connection : Connection::Base) : ::String | Nil
sql_quoted_default_value,
sql_type(connection : Connection::Base) : ::String
sql_type,
sql_type_suffix(connection : Connection::Base) : ::String | Nil
sql_type_suffix,
type : ::String
type,
unique? : Bool
unique?
Constructor methods inherited from class Marten::DB::Management::Column::Base
new(name : ::String, primary_key : ::Bool = false, null : ::Bool = false, unique : ::Bool = false, index : ::Bool = false, default : ::DB::Any | Nil = nil)
new
Instance methods inherited from module Marten::DB::CanFormatStringsOrSymbols
format_string_or_symbol(value : String)
format_string_or_symbol
Constructor Detail
Instance Method Detail
Returns a copy of the column.
Returns true if the other column (which can have a different name) corresponds to the same configuration.
Returns a serialized version of the column arguments to be used when generating migrations.
The returned string will be used in the context of add_column
/ column
statements in generated
migrations.
Returns the literal quoted value of the default value for a specific database connection.
Returns the raw type of the column to use for the column at hand and a specific database connection.
Returns the raw type suffix of the column to use for the column at hand and a specific database connection.