Class: TreasureData::Schema::Field
- Inherits:
-
Object
- Object
- TreasureData::Schema::Field
- Defined in:
- lib/td/client/model.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#sql_alias ⇒ Object
readonly
Returns the value of attribute sql_alias.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, sql_alias = nil) ⇒ Field
constructor
A new instance of Field.
Constructor Details
#initialize(name, type, sql_alias = nil) ⇒ Field
Returns a new instance of Field.
286 287 288 289 290 291 292 293 294 295 |
# File 'lib/td/client/model.rb', line 286 def initialize(name, type, sql_alias=nil) if name == 'v' || name == 'time' raise ParameterValidationError, "Column name '#{name}' is reserved." end API.validate_column_name(name) API.validate_sql_alias_name(sql_alias) if sql_alias @name = name @type = type @sql_alias = sql_alias end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
299 300 301 |
# File 'lib/td/client/model.rb', line 299 def name @name end |
#sql_alias ⇒ Object (readonly)
Returns the value of attribute sql_alias.
301 302 303 |
# File 'lib/td/client/model.rb', line 301 def sql_alias @sql_alias end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
299 |
# File 'lib/td/client/model.rb', line 299 attr_reader :name |