Class: Groonga::Command::ColumnCreate

Inherits:
Base
  • Object
show all
Defined in:
lib/groonga/command/column-create.rb

Instance Attribute Summary

Attributes inherited from Base

#arguments, #command_name, #original_format, #original_source, #path_prefix

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, #[], #[]=, #command_format?, #initialize, #key?, #output_type, #request_id, #to_command_format, #to_elasticsearch_format, #to_s, #to_uri_format, #uri_format?

Constructor Details

This class inherits a constructor from Groonga::Command::Base

Class Method Details

.command_nameObject



23
24
25
# File 'lib/groonga/command/column-create.rb', line 23

def command_name
  "column_create"
end

.parameter_namesObject



27
28
29
30
31
32
33
34
35
36
# File 'lib/groonga/command/column-create.rb', line 27

def parameter_names
  [
    :table,
    :name,
    :flags,
    :type,
    :source,
    :path,
  ]
end

Instance Method Details

#column_index?Boolean

Returns true if "COLUMN_INDEX" is specified in #flags, false otherwise.

Returns:

  • (Boolean)

    true if "COLUMN_INDEX" is specified in #flags, false otherwise.

Since:

  • 1.0.3



81
82
83
# File 'lib/groonga/command/column-create.rb', line 81

def column_index?
  flags.include?("COLUMN_INDEX")
end

#column_scalar?Boolean

Returns true if "COLUMN_SCALAR" is specified in #flags, false otherwise.

Returns:

  • (Boolean)

    true if "COLUMN_SCALAR" is specified in #flags, false otherwise.

Since:

  • 1.0.3



67
68
69
# File 'lib/groonga/command/column-create.rb', line 67

def column_scalar?
  flags.include?("COLUMN_SCALAR")
end

#column_vector?Boolean

Returns true if "COLUMN_VECTOR" is specified in #flags, false otherwise.

Returns:

  • (Boolean)

    true if "COLUMN_VECTOR" is specified in #flags, false otherwise.

Since:

  • 1.0.3



74
75
76
# File 'lib/groonga/command/column-create.rb', line 74

def column_vector?
  flags.include?("COLUMN_VECTOR")
end

#flagsObject



54
55
56
# File 'lib/groonga/command/column-create.rb', line 54

def flags
  @flags ||= flags_value(:flags)
end

#nameString

Returns The column name.

Returns:

  • (String)

    The column name.

Since:

  • 1.2.4



50
51
52
# File 'lib/groonga/command/column-create.rb', line 50

def name
  self[:name]
end

#pathString?

Returns Path or nil.

Returns:

  • (String, nil)

    Path or nil

Since:

  • 1.5.0



117
118
119
# File 'lib/groonga/command/column-create.rb', line 117

def path
  self[:path]
end

#sources::Array<String>

An array of index sources. If source parameter value is empty or nil, this method returns an empty array.

Returns:

  • (::Array<String>)

    an array of index sources. If source parameter value is empty or nil, this method returns an empty array.

Since:

  • 1.0.7



111
112
113
# File 'lib/groonga/command/column-create.rb', line 111

def sources
  @sources ||= array_value(:source)
end

#tableString

Returns table name.

Returns:

  • (String)

    table name.

Since:

  • 1.0.7



43
44
45
# File 'lib/groonga/command/column-create.rb', line 43

def table
  self[:table]
end

#typeString

Returns value type name of the column.

Returns:

  • (String)

    value type name of the column.

Since:

  • 1.0.7



60
61
62
# File 'lib/groonga/command/column-create.rb', line 60

def type
  self[:type]
end

#with_position?Boolean

Returns true if "WITH_POSITION" is specified in #flags, false otherwise.

Returns:

  • (Boolean)

    true if "WITH_POSITION" is specified in #flags, false otherwise.

Since:

  • 1.0.3



102
103
104
# File 'lib/groonga/command/column-create.rb', line 102

def with_position?
  flags.include?("WITH_POSITION")
end

#with_section?Boolean

Returns true if "WITH_SECTION" is specified in #flags, false otherwise.

Returns:

  • (Boolean)

    true if "WITH_SECTION" is specified in #flags, false otherwise.

Since:

  • 1.0.3



88
89
90
# File 'lib/groonga/command/column-create.rb', line 88

def with_section?
  flags.include?("WITH_SECTION")
end

#with_weight?Boolean

Returns true if "WITH_WEIGHT" is specified in #flags, false otherwise.

Returns:

  • (Boolean)

    true if "WITH_WEIGHT" is specified in #flags, false otherwise.

Since:

  • 1.0.3



95
96
97
# File 'lib/groonga/command/column-create.rb', line 95

def with_weight?
  flags.include?("WITH_WEIGHT")
end