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.
285 286 287 288 289 290 291 292 293 294 |
# File 'lib/td/client/model.rb', line 285 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.
298 299 300 |
# File 'lib/td/client/model.rb', line 298 def name @name end |
#sql_alias ⇒ Object (readonly)
Returns the value of attribute sql_alias.
300 301 302 |
# File 'lib/td/client/model.rb', line 300 def sql_alias @sql_alias end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
298 |
# File 'lib/td/client/model.rb', line 298 attr_reader :name |