Class: Groonga::Command::QueryExpand

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

Overview

A command class that represents query_expand command.

Since:

  • 1.2.1

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?, #name, #output_type, #request_id, #to_command_format, #to_uri_format, #uri_format?

Constructor Details

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

Class Method Details

.command_nameObject

Since:

  • 1.2.1



26
27
28
# File 'lib/groonga/command/query-expand.rb', line 26

def command_name
  "query_expand"
end

.parameter_namesObject

Since:

  • 1.2.1



30
31
32
33
34
35
36
# File 'lib/groonga/command/query-expand.rb', line 30

def parameter_names
  [
    :expander,
    :query,
    :flags,
  ]
end

Instance Method Details

#allow_column?Boolean

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

Returns:

  • (Boolean)

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

Since:

  • 1.2.1



74
75
76
# File 'lib/groonga/command/query-expand.rb', line 74

def allow_column?
  flags.include?("ALLOW_COLUMN")
end

#allow_leading_not?Boolean

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

Returns:

  • (Boolean)

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

Since:

  • 1.2.1



90
91
92
# File 'lib/groonga/command/query-expand.rb', line 90

def allow_leading_not?
  flags.include?("ALLOW_LEADING_NOT")
end

#allow_pragma?Boolean

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

Returns:

  • (Boolean)

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

Since:

  • 1.2.1



66
67
68
# File 'lib/groonga/command/query-expand.rb', line 66

def allow_pragma?
  flags.include?("ALLOW_PRAGMA")
end

#allow_update?Boolean

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

Returns:

  • (Boolean)

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

Since:

  • 1.2.1



82
83
84
# File 'lib/groonga/command/query-expand.rb', line 82

def allow_update?
  flags.include?("ALLOW_UPDATE")
end

#expanderString

Returns expander parameter value.

Returns:

  • (String)

    expander parameter value.

Since:

  • 1.2.1



44
45
46
# File 'lib/groonga/command/query-expand.rb', line 44

def expander
  self[:expander]
end

#flagsArray<String>

Returns flags parameter value.

Returns:

  • (Array<String>)

    flags parameter value.

Since:

  • 1.2.1



58
59
60
# File 'lib/groonga/command/query-expand.rb', line 58

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

#none?Boolean

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

Returns:

  • (Boolean)

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

Since:

  • 1.2.1



98
99
100
# File 'lib/groonga/command/query-expand.rb', line 98

def none?
  flags.include?("NONE")
end

#queryString

Returns query parameter value.

Returns:

  • (String)

    query parameter value.

Since:

  • 1.2.1



51
52
53
# File 'lib/groonga/command/query-expand.rb', line 51

def query
  self[:query]
end