Class: FlareUp::Command::Copy
Instance Attribute Summary collapse
-
#aws_access_key_id ⇒ Object
readonly
Returns the value of attribute aws_access_key_id.
-
#aws_secret_access_key ⇒ Object
readonly
Returns the value of attribute aws_secret_access_key.
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#data_source ⇒ Object
readonly
Returns the value of attribute data_source.
-
#options ⇒ Object
Returns the value of attribute options.
Attributes inherited from Base
Instance Method Summary collapse
- #get_command ⇒ Object
-
#initialize(table_name, data_source, aws_access_key_id, aws_secret_access_key) ⇒ Copy
constructor
A new instance of Copy.
Methods inherited from Base
Constructor Details
#initialize(table_name, data_source, aws_access_key_id, aws_secret_access_key) ⇒ Copy
Returns a new instance of Copy.
11 12 13 14 15 16 17 18 |
# File 'lib/flare_up/command/copy.rb', line 11 def initialize(table_name, data_source, aws_access_key_id, aws_secret_access_key) @data_source = data_source @aws_access_key_id = aws_access_key_id @aws_secret_access_key = aws_secret_access_key @options = '' @columns = [] super end |
Instance Attribute Details
#aws_access_key_id ⇒ Object (readonly)
Returns the value of attribute aws_access_key_id.
6 7 8 |
# File 'lib/flare_up/command/copy.rb', line 6 def aws_access_key_id @aws_access_key_id end |
#aws_secret_access_key ⇒ Object (readonly)
Returns the value of attribute aws_secret_access_key.
7 8 9 |
# File 'lib/flare_up/command/copy.rb', line 7 def aws_secret_access_key @aws_secret_access_key end |
#columns ⇒ Object
Returns the value of attribute columns.
9 10 11 |
# File 'lib/flare_up/command/copy.rb', line 9 def columns @columns end |
#data_source ⇒ Object (readonly)
Returns the value of attribute data_source.
5 6 7 |
# File 'lib/flare_up/command/copy.rb', line 5 def data_source @data_source end |
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/flare_up/command/copy.rb', line 8 def @options end |
Instance Method Details
#get_command ⇒ Object
21 22 23 |
# File 'lib/flare_up/command/copy.rb', line 21 def get_command "COPY #{@table_name} #{get_columns} FROM '#{@data_source}' CREDENTIALS '#{get_credentials}' #{@options}" end |