Class: ForestAdminDatasourceToolkit::Schema::ColumnSchema
- Inherits:
-
Object
- Object
- ForestAdminDatasourceToolkit::Schema::ColumnSchema
- Defined in:
- lib/forest_admin_datasource_toolkit/schema/column_schema.rb
Instance Attribute Summary collapse
-
#column_type ⇒ Object
Returns the value of attribute column_type.
-
#default_value ⇒ Object
readonly
Returns the value of attribute default_value.
-
#enum_values ⇒ Object
readonly
Returns the value of attribute enum_values.
-
#filter_operators ⇒ Object
Returns the value of attribute filter_operators.
-
#is_primary_key ⇒ Object
readonly
Returns the value of attribute is_primary_key.
-
#is_read_only ⇒ Object
Returns the value of attribute is_read_only.
-
#is_sortable ⇒ Object
Returns the value of attribute is_sortable.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#validation ⇒ Object
Returns the value of attribute validation.
Instance Method Summary collapse
-
#initialize(column_type:, filter_operators: [], is_primary_key: false, is_read_only: false, is_sortable: false, default_value: nil, enum_values: [], validation: []) ⇒ ColumnSchema
constructor
A new instance of ColumnSchema.
Constructor Details
#initialize(column_type:, filter_operators: [], is_primary_key: false, is_read_only: false, is_sortable: false, default_value: nil, enum_values: [], validation: []) ⇒ ColumnSchema
Returns a new instance of ColumnSchema.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/forest_admin_datasource_toolkit/schema/column_schema.rb', line 12 def initialize( column_type:, filter_operators: [], is_primary_key: false, is_read_only: false, is_sortable: false, default_value: nil, enum_values: [], validation: [] ) @column_type = column_type @filter_operators = filter_operators @is_primary_key = is_primary_key @is_read_only = is_read_only @is_sortable = is_sortable @default_value = default_value @enum_values = enum_values @validation = validation @type = 'Column' end |
Instance Attribute Details
#column_type ⇒ Object
Returns the value of attribute column_type.
6 7 8 |
# File 'lib/forest_admin_datasource_toolkit/schema/column_schema.rb', line 6 def column_type @column_type end |
#default_value ⇒ Object (readonly)
Returns the value of attribute default_value.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/schema/column_schema.rb', line 4 def default_value @default_value end |
#enum_values ⇒ Object (readonly)
Returns the value of attribute enum_values.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/schema/column_schema.rb', line 4 def enum_values @enum_values end |
#filter_operators ⇒ Object
Returns the value of attribute filter_operators.
6 7 8 |
# File 'lib/forest_admin_datasource_toolkit/schema/column_schema.rb', line 6 def filter_operators @filter_operators end |
#is_primary_key ⇒ Object (readonly)
Returns the value of attribute is_primary_key.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/schema/column_schema.rb', line 4 def is_primary_key @is_primary_key end |
#is_read_only ⇒ Object
Returns the value of attribute is_read_only.
6 7 8 |
# File 'lib/forest_admin_datasource_toolkit/schema/column_schema.rb', line 6 def is_read_only @is_read_only end |
#is_sortable ⇒ Object
Returns the value of attribute is_sortable.
6 7 8 |
# File 'lib/forest_admin_datasource_toolkit/schema/column_schema.rb', line 6 def is_sortable @is_sortable end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/schema/column_schema.rb', line 4 def type @type end |
#validation ⇒ Object
Returns the value of attribute validation.
6 7 8 |
# File 'lib/forest_admin_datasource_toolkit/schema/column_schema.rb', line 6 def validation @validation end |