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, #name, #original_format, #original_source

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, #[], #[]=, #command_format?, #has_key?, #initialize, #output_type, #to_command_format, #to_uri_format, #uri_format?

Constructor Details

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

Class Method Details

.parameter_namesObject



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

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

Instance Method Details

#flagsObject



39
40
41
# File 'lib/groonga/command/table-create.rb', line 39

def flags
  @flags ||= (self[:flags] || "").split(/\s*\|\s*/)
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



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

def key_with_sis?
  flags.include?("KEY_WITH_SIS")
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



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

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



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

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



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

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



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

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