Module: ViewData::PG::Controls::Commands::Create

Defined in:
lib/view_data/pg/controls/commands.rb

Class Method Summary collapse

Class Method Details

.example(primary_key: nil, column_value: nil, table: nil) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/view_data/pg/controls/commands.rb', line 6

def self.example(primary_key: nil, column_value: nil, table: nil)
  primary_key ||= PrimaryKey::UUID.example
  table ||= Table.name
  data = Data.example(column_value: column_value)

  ViewData::Commands::Controls::Create.example(
    name: table,
    identifier: primary_key,
    data: data
  )
end