abstract class Marten::DB::Management::Column::Base
- Marten::DB::Management::Column::Base
- Reference
- Object
Overview
Abstract base migration column implementation.
Included Modules
Direct Known Subclasses
- Marten::DB::Management::Column::BigInt
- Marten::DB::Management::Column::Bool
- Marten::DB::Management::Column::Date
- Marten::DB::Management::Column::DateTime
- Marten::DB::Management::Column::Enum
- Marten::DB::Management::Column::Float
- Marten::DB::Management::Column::Int
- Marten::DB::Management::Column::JSON
- Marten::DB::Management::Column::Reference
- Marten::DB::Management::Column::String
- Marten::DB::Management::Column::Text
- Marten::DB::Management::Column::UUID
Defined in:
marten/db/management/column/base.crConstructors
Instance Method Summary
-
#==(other : self)
Returns true if the other column corresponds to the same column configuration.
-
#clone
Returns a copy of the column.
- #default : Bool | Float32 | Float64 | Int32 | Int64 | Slice(UInt8) | String | Time | Nil
-
#index? : Bool
Returns true if an index should be created at the database level for the column.
- #name : String
- #name=(name : ::String)
-
#null? : Bool
Returns a boolean indicating whether the column can be null or not.
- #primary_key=(primary_key : ::Bool)
-
#primary_key? : Bool
Returns a boolean indicating whether the column is a primary key.
-
#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.
-
#type : ::String
Returns the column type identifier.
-
#unique? : Bool
Returns a boolean indicating whether the column value should be unique throughout the associated table.
Instance methods inherited from module Marten::DB::CanFormatStringsOrSymbols
format_string_or_symbol(value : String)
format_string_or_symbol
Constructor Detail
Instance Method Detail
Returns true if the other column corresponds to the same column configuration.
Returns true if an index should be created at the database level for 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.
Returns a boolean indicating whether the column value should be unique throughout the associated table.