module Marten::DB::Management::SchemaEditor
Defined in:
marten/db/management/schema_editor.crmarten/db/management/schema_editor/base.cr
marten/db/management/schema_editor/concerns/core.cr
marten/db/management/schema_editor/mysql.cr
marten/db/management/schema_editor/postgresql.cr
marten/db/management/schema_editor/sqlite.cr
Constant Summary
-
IMPLEMENTATIONS =
{Connection::MYSQL_ID => SchemaEditor::MySQL, Connection::POSTGRESQL_ID => SchemaEditor::PostgreSQL, Connection::SQLITE_ID => SchemaEditor::SQLite}
Class Method Summary
-
.for(connection : Connection::Base) : SchemaEditor::Base
Returns a schema editor for the passed connection.
-
.run_for(connection : Connection::Base, atomic = true, &)
Returns a schema editor instance whose SQL operations can be enclosed in a single transaction.
Class Method Detail
Returns a schema editor for the passed connection.
Returns a schema editor instance whose SQL operations can be enclosed in a single transaction.
By default all operations performed with the yielded schema editor object will be done inside a single
transaction, unless atomic
is set to false
. Note that some database backends (such as MySQL) may not
support transactions for DDL statements ; in those case the use of atomic
will be ignored.