| Groonga GObject Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
struct GGrnContext; struct GGrnContextClass; GGrnContext * ggrn_context_new (void); gboolean ggrn_context_open_database (GGrnContext *context,const gchar *path,GError **error); gboolean ggrn_context_create_database (GGrnContext *context,const gchar *path,GError **error); gchar * ggrn_context_execute_command (GGrnContext *context,const gchar *command); gboolean ggrn_context_send_command (GGrnContext *context,const gchar *command,GError **error); gchar * ggrn_context_receive_result (GGrnContext *context);
GGrnContext * ggrn_context_new (void);
Allocates a new GGrnContext.
Returns : |
a new GGrnContext. |
Since 1.0.0
gboolean ggrn_context_open_database (GGrnContext *context,const gchar *path,GError **error);
Opens a database.
|
A GGrnContext. |
|
The path of the database to be opened. |
|
return location for a GError, or NULL. |
Returns : |
TRUE on success, FALSE if an error occurred. |
Since 1.0.0
gboolean ggrn_context_create_database (GGrnContext *context,const gchar *path,GError **error);
Creates a new database.
|
A GGrnContext. |
|
The path of the database to be created, or NULL
for temporary database. [allow-none]
|
|
return location for a GError, or NULL. |
Returns : |
TRUE on success, FALSE if an error is occurred. |
Since 1.0.0
gchar * ggrn_context_execute_command (GGrnContext *context,const gchar *command);
Executes a Groonga command and returns the executed result.
|
A GGrnContext. |
|
The Groonga command to be executed. See http://groonga.org/docs/reference/command.html about Groonga command. |
Returns : |
The executed result of command. It must be freed with
g_free() when no longer needed. |
Since 1.0.0
gboolean ggrn_context_send_command (GGrnContext *context,const gchar *command,GError **error);
Sends a Groonga command. Use ggrn_context_receive_result() to
receive the result of the sent command.
Normally, you should use high-level API
ggrn_context_execute_command(). If you want to get error details of
the executed command, use this API.
|
A GGrnContext. |
|
The Groonga command to be sent. See http://groonga.org/docs/reference/command.html about Groonga command. |
Returns : |
TRUE on success, FALSE if an error is occurred. |
Since 1.0.0
gchar * ggrn_context_receive_result (GGrnContext *context);
Receives the result of the sent command by ggrn_context_send_command().
|
A GGrnContext. |
Returns : |
The result of the sent command. It must be freed with
g_free() when no longer needed. |
Since 1.0.0