Class: PgPartitioning::InputMaster

Inherits:
Object
  • Object
show all
Includes:
Printer
Defined in:
lib/pg_partitioning/input_master.rb

Constant Summary

Constants included from Printer

Printer::COLORS

Instance Method Summary collapse

Methods included from Printer

#alert, #info, #message, #print_row, #text_color

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



25
26
27
# File 'lib/pg_partitioning/input_master.rb', line 25

def method_missing(name, *args)
  valid?(*args) if name.to_s.include?('_valid?')
end

Instance Method Details

#introObject



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/pg_partitioning/input_master.rb', line 29

def intro
  info "  Hi! It's time to do partitioning)\n  I can do it in different ways:\n  \n  by EQUALity\n      - partition will be created by value of column,\n      - in this case you should only set column name;\n  \n  by STEP\n      - partition will be created by value of column divided by the step and rounded,\n      - in this case you should else set number of the step,\n      - a type of the column should be a numeric;\n  \n  by DATE\n      - partition will be created by pattern from date,\n      - in this case you should else set pattern for parsing the date,\n      - acceptable (itself or in combination): Y, YY, YYY, YYYY, MM, D, DD, DDD, W, WW, HH24 \n      - a type of the column should be a date/timestamp.\n  INTRO\nend\n"