Class: Groonga::Command::TableCreate

Inherits:
Base
  • Object
show all
Defined in:
lib/groonga/command/table-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/table-create.rb', line 23

def command_name
  "table_create"
end

.parameter_namesObject



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

def parameter_names
  [
    :name,
    :flags,
    :key_type,
    :value_type,
    :default_tokenizer,
    :normalizer,
    :token_filters,
    :path,
  ]
end

Instance Method Details

#default_tokenizerString?

Returns Default tokenizer name or nil.

Returns:

  • (String, nil)

    Default tokenizer name or nil.

Since:

  • 1.0.7



106
107
108
# File 'lib/groonga/command/table-create.rb', line 106

def default_tokenizer
  self[:default_tokenizer]
end

#flagsObject



65
66
67
# File 'lib/groonga/command/table-create.rb', line 65

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

#key_typeString?

Returns Key type name, nil for array no key table.

Returns:

  • (String, nil)

    Key type name, nil for array no key table.

Since:

  • 1.0.7



52
53
54
# File 'lib/groonga/command/table-create.rb', line 52

def key_type
  self[:key_type]
end

#key_with_sis?Boolean

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

Returns:

  • (Boolean)

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

Since:

  • 1.0.3



100
101
102
# File 'lib/groonga/command/table-create.rb', line 100

def key_with_sis?
  flags.include?("KEY_WITH_SIS")
end

#nameString

Returns The table name.

Returns:

  • (String)

    The table name.

Since:

  • 1.2.4



46
47
48
# File 'lib/groonga/command/table-create.rb', line 46

def name
  self[:name]
end

#normalizerString?

Returns Normalizer name or nil.

Returns:

  • (String, nil)

    Normalizer name or nil.

Since:

  • 1.0.7



112
113
114
# File 'lib/groonga/command/table-create.rb', line 112

def normalizer
  self[:normalizer]
end

#pathString?

Returns Path or nil.

Returns:

  • (String, nil)

    Path or nil

Since:

  • 1.5.0



124
125
126
# File 'lib/groonga/command/table-create.rb', line 124

def path
  self[:path]
end

#table_dat_key?Boolean

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

Returns:

  • (Boolean)

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

Since:

  • 1.0.3



93
94
95
# File 'lib/groonga/command/table-create.rb', line 93

def table_dat_key?
  flags.include?("TABLE_DAT_KEY")
end

#table_hash_key?Boolean

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

Returns:

  • (Boolean)

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

Since:

  • 1.0.3



79
80
81
# File 'lib/groonga/command/table-create.rb', line 79

def table_hash_key?
  flags.include?("TABLE_HASH_KEY")
end

#table_no_key?Boolean

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

Returns:

  • (Boolean)

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

Since:

  • 1.0.3



72
73
74
# File 'lib/groonga/command/table-create.rb', line 72

def table_no_key?
  flags.include?("TABLE_NO_KEY")
end

#table_pat_key?Boolean

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

Returns:

  • (Boolean)

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

Since:

  • 1.0.3



86
87
88
# File 'lib/groonga/command/table-create.rb', line 86

def table_pat_key?
  flags.include?("TABLE_PAT_KEY")
end

#token_filters::Array<String>

Returns Token filter names.

Returns:

  • (::Array<String>)

    Token filter names.

Since:

  • 1.2.1



118
119
120
# File 'lib/groonga/command/table-create.rb', line 118

def token_filters
  @token_filters ||= array_value(:token_filters)
end

#value_typeString?

Returns Value type name, nil for no value table. Double array trie table always returns nil because double array trie table doesn't support value.

Returns:

  • (String, nil)

    Value type name, nil for no value table. Double array trie table always returns nil because double array trie table doesn't support value.

Since:

  • 1.2.2



61
62
63
# File 'lib/groonga/command/table-create.rb', line 61

def value_type
  self[:value_type]
end