Class: AxHub::Data::DataColumn

Inherits:
Struct
  • Object
show all
Defined in:
lib/axhub_sdk/data/dsl/schema.rb

Overview

Schema definitions and define_schema (mirrors node/python dsl/schema).

Column defs are either a primitive type string (“uuid” | “string” | “number” | “integer” | “boolean” | “timestamp” | “json”) or an enum descriptor { type: “enum”, values: […] }. define_schema builds the ‘cols` accessor map used by the where(schema.cols) typed DSL path.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table:, name:, definition:) ⇒ DataColumn

Returns a new instance of DataColumn.



12
13
14
# File 'lib/axhub_sdk/data/dsl/schema.rb', line 12

def initialize(table:, name:, definition:)
  super(table, name, definition)
end

Instance Attribute Details

#definitionObject

Returns the value of attribute definition

Returns:

  • (Object)

    the current value of definition



11
12
13
# File 'lib/axhub_sdk/data/dsl/schema.rb', line 11

def definition
  @definition
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



11
12
13
# File 'lib/axhub_sdk/data/dsl/schema.rb', line 11

def name
  @name
end

#tableObject

Returns the value of attribute table

Returns:

  • (Object)

    the current value of table



11
12
13
# File 'lib/axhub_sdk/data/dsl/schema.rb', line 11

def table
  @table
end