Module: DbAgile::Contract::Schema::TransactionDriven

Included in:
Utils::Full
Defined in:
lib/dbagile/contract/schema/transaction_driven.rb

Instance Method Summary collapse

Instance Method Details

#add_columns(transaction, table_name, columns) ⇒ Boolean

Adds some columns to a table

Parameters:

  • the current transaction

  • the name of a table

  • column definitions

Returns:

  • true to indicate that everything is fine



45
46
47
# File 'lib/dbagile/contract/schema/transaction_driven.rb', line 45

def add_columns(transaction, table_name, columns)
  Kernel.raise NotImplementedError
end

#create_table(transaction, table_name, columns) ⇒ Hash

Creates a table with some columns.

Parameters:

  • the current transaction

  • the name of a table

  • table heading

Returns:

  • the actual table heading that has been created



16
17
18
# File 'lib/dbagile/contract/schema/transaction_driven.rb', line 16

def create_table(transaction, table_name, columns)
  Kernel.raise NotImplementedError
end

#drop_table(transaction, table_name) ⇒ Boolean

Drops a table

Parameters:

  • the current transaction

  • the name of a table

Returns:

  • true to indicate that everything is fine



29
30
31
# File 'lib/dbagile/contract/schema/transaction_driven.rb', line 29

def drop_table(transaction, table_name)
  Kernel.raise NotImplementedError
end

#key!(transaction, table_name, columns) ⇒ Boolean

Make columns be a candidate key for the table.

Parameters:

  • the current transaction

  • the name of a table

  • column names

Returns:

  • true to indicate that everything is fine



61
62
63
# File 'lib/dbagile/contract/schema/transaction_driven.rb', line 61

def key!(transaction, table_name, columns)
  Kernel.raise NotImplementedError
end