![]() |
![]() |
![]() |
Groonga GObject Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
struct GGrnCommand; struct GGrnCommandClass; GGrnCommand * ggrn_command_new (GGrnContext *context
,const gchar *name
); void ggrn_command_add_argument (GGrnCommand *command
,const gchar *name
,const gchar *value
); gchar * ggrn_command_execute (GGrnCommand *command
); gchar * ggrn_command_to_path (GGrnCommand *command
); gchar * ggrn_command_to_command_line (GGrnCommand *command
);
"context" GGrnContext* : Read / Write / Construct Only "name" gchar* : Read / Write / Construct Only
struct GGrnCommand;
A GGrnCommand is an object to create a Groonga command string. It
is executable by ggrn_context_execute_command()
.
GGrnCommand * ggrn_command_new (GGrnContext *context
,const gchar *name
);
Allocates a new GGrnCommand.
Returns : |
a new GGrnCommand. |
Since 1.0.0
void ggrn_command_add_argument (GGrnCommand *command
,const gchar *name
,const gchar *value
);
Adds an argument of the command.
If you add the same name argument twice, the old argument value is overrode.
|
A GGrnCommand. |
|
The name of the argument. |
|
The value of the argument. |
Since 1.0.0
gchar * ggrn_command_execute (GGrnCommand *command
);
Executes the command and returns the executed result.
|
A GGrnCommand. |
Returns : |
The executed result of command . It must be freed with
g_free() when no longer needed. |
Since 1.0.0
gchar * ggrn_command_to_path (GGrnCommand *command
);
Formats the command as path format like the following:
/d/table_create?name=Logs&flags=TABLE_NO_KEY
|
A GGrnCommand. |
Returns : |
The path format command. It must be freed with
g_free() when no longer needed. |
Since 1.0.0
gchar * ggrn_command_to_command_line (GGrnCommand *command
);
Formats the command as command line format like the following:
table_create --name Logs --flags TABLE_NO_KEY
|
A GGrnCommand. |
Returns : |
The command line format command. It must be freed with
g_free() when no longer needed. |
Since 1.0.0
"context"
property"context" GGrnContext* : Read / Write / Construct Only
The context for the command.