class Marten::DB::Management::SchemaEditor::SQLite

Included Modules

Defined in:

marten/db/management/schema_editor/sqlite.cr

Instance Method Summary

Instance methods inherited from module Marten::DB::Management::SchemaEditor::Core

add_column(table : TableState, column : Column::Base) : Nil add_column, add_index(table : TableState, index : Management::Index) : Nil add_index, add_unique_constraint(table : TableState, unique_constraint : Management::Constraint::Unique) : Nil add_unique_constraint, change_column(project : ProjectState, table : TableState, old_column : Column::Base, new_column : Column::Base) : Nil change_column, create_table(table : TableState) : Nil create_table, delete_table(name : String) : Nil delete_table, flush_tables(table_names : Array(String)) : Nil flush_tables, remove_column(table : TableState, column : Column::Base) : Nil remove_column, remove_index(table : TableState, index : Management::Index) : Nil remove_index, remove_unique_constraint(table : TableState, unique_constraint : Management::Constraint::Unique) : Nil remove_unique_constraint, rename_column(table : TableState, column : Column::Base, new_name : String) rename_column, rename_table(table : TableState, new_name : String) : Nil rename_table

Instance methods inherited from class Marten::DB::Management::SchemaEditor::Base

add_column(table : TableState, column : Column::Base) : Nil add_column, add_index(table : TableState, index : Management::Index) : Nil add_index, add_unique_constraint(table : TableState, unique_constraint : Management::Constraint::Unique) : Nil add_unique_constraint, change_column(project : ProjectState, table : TableState, old_column : Column::Base, new_column : Column::Base) : Nil change_column, column_type_for_built_in_column(column : Column::Base) : String column_type_for_built_in_column, column_type_suffix_for_built_in_column(column : Column::Base) : String | Nil column_type_suffix_for_built_in_column, create_table(table : TableState) : Nil create_table, ddl_rollbackable? : Bool ddl_rollbackable?, deferred_statements : Array(Marten::DB::Management::Statement) deferred_statements, delete_table(name : String) : Nil
delete_table(table : TableState) : Nil
delete_table
, flush_model_tables : Nil flush_model_tables, flush_tables(table_names : Array(String)) : Nil flush_tables, quoted_default_value_for_built_in_column(value : ::DB::Any) : String quoted_default_value_for_built_in_column, remove_column(table : TableState, column : Column::Base) : Nil remove_column, remove_index(table : TableState, index : Management::Index) : Nil remove_index, remove_unique_constraint(table : TableState, unique_constraint : Management::Constraint::Unique) : Nil remove_unique_constraint, rename_column(table : TableState, column : Column::Base, new_name : String) rename_column, rename_table(table : TableState, new_name : String) : Nil rename_table, sync_models : Nil sync_models

Constructor methods inherited from class Marten::DB::Management::SchemaEditor::Base

new(connection : Connection::Base) new

Instance Method Detail

def add_column(table : TableState, column : Column::Base) : Nil #
Description copied from class Marten::DB::Management::SchemaEditor::Base

Adds a column to a specific table.


[View source]
def add_unique_constraint(table : TableState, unique_constraint : Management::Constraint::Unique) : Nil #
Description copied from class Marten::DB::Management::SchemaEditor::Base

Adds a unique constraint to a specific table.


[View source]
def change_column(project : ProjectState, table : TableState, old_column : Column::Base, new_column : Column::Base) : Nil #
Description copied from class Marten::DB::Management::SchemaEditor::Base

Changes a column on a specific table.


[View source]
def column_type_for_built_in_column(column : Column::Base) : String #
Description copied from class Marten::DB::Management::SchemaEditor::Base

Returns the database type for a specific built-in column implementation.

Note that this method is only used when handling column types of Marten built-in types as custom column implementations must define a #db_type method.


[View source]
def column_type_suffix_for_built_in_column(column : Column::Base) : String | Nil #
Description copied from class Marten::DB::Management::SchemaEditor::Base

Returns the database type suffix for a specific built-in column implementation.

Note that this method is only used when handling column types of Marten built-in types.


[View source]
def ddl_rollbackable? : Bool #
Description copied from class Marten::DB::Management::SchemaEditor::Base

Returns a boolean indicating if the schema editor implementation supports rollbacking DDL statements.


[View source]
def quoted_default_value_for_built_in_column(value : ::DB::Any) : String #
Description copied from class Marten::DB::Management::SchemaEditor::Base

Returns a prepared default value that can be inserted in a column definition.


[View source]
def remove_column(table : TableState, column : Column::Base) : Nil #
Description copied from class Marten::DB::Management::SchemaEditor::Base

Removes a column from a specific table.


[View source]
def remove_unique_constraint(table : TableState, unique_constraint : Management::Constraint::Unique) : Nil #
Description copied from class Marten::DB::Management::SchemaEditor::Base

Removes a unique constraint from a specific table.


[View source]