Class: Aq::Schema
- Inherits:
-
Object
- Object
- Aq::Schema
- Defined in:
- lib/aq/schema.rb
Instance Method Summary collapse
- #append_column(name, type, mode = nil) ⇒ Object
- #get_all ⇒ Object
-
#initialize ⇒ Schema
constructor
A new instance of Schema.
Constructor Details
#initialize ⇒ Schema
Returns a new instance of Schema.
8 9 10 |
# File 'lib/aq/schema.rb', line 8 def initialize @schema = [] end |
Instance Method Details
#append_column(name, type, mode = nil) ⇒ Object
12 13 14 15 16 |
# File 'lib/aq/schema.rb', line 12 def append_column(name, type, mode=nil) nullable = mode != 'required' column = {name: name, type: convert_type_from_bq_to_athena(type), nullable: nullable} @schema.push column end |
#get_all ⇒ Object
18 19 20 |
# File 'lib/aq/schema.rb', line 18 def get_all @schema end |