nitc :: CmdSearch :: defaultinit
nitc :: commands_http $ CmdSearch :: http_init
Init the command from an HTTPRequestnitc :: commands_parser $ CmdSearch :: parser_init
Initialize the command from the CommandParser datanitc :: CmdEntities :: _sorter
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: DocCommand :: cmd_filter
Return a new filter for that command execution.nitc :: CmdEntities :: defaultinit
nitc :: CmdList :: defaultinit
core :: Object :: defaultinit
nitc :: CmdSearch :: defaultinit
nitc :: DocCommand :: defaultinit
nitc :: DocCommand :: execute
nitc :: DocCommand :: filter=
ModelFilter to apply if anynitc :: DocCommand :: http_init
Init the command from an HTTPRequestcore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: DocCommand :: parser_init
Initialize the command from the CommandParser datanitc :: CmdList :: print_list
nitc :: DocCommand :: to_json
Return a JSON Serializable representation ofself
results
# A free text search command
class CmdSearch
super CmdEntities
# Free text command string
var query: nullable String = null is optional, writable
# Return states:
# * `CmdSuccess`: everything was ok;
# * `ErrorNoQuery`: no `query` provided.
redef fun init_results do
if results != null then return new CmdSuccess
var res = super
if not res isa CmdSuccess then return res
var query = self.query
if query == null then return new ErrorNoQuery
sorter = null
results = model.find(query)
return res
end
end
src/doc/commands/commands_model.nit:259,1--281,3
redef class CmdSearch
redef fun parser_init(mentity_name, options) do
query = mentity_name
return super
end
end
src/doc/commands/commands_parser.nit:333,1--338,3