Navigation Menu

Skip to content

Commit

Permalink
Translate
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 8, 2015
1 parent 6e0031b commit 29f1c2f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 13 additions & 1 deletion reference/functions/pgroonga-command.md
Expand Up @@ -5,4 +5,16 @@ layout: en

# `pgroonga.command` function

TODO
`pgroonga.command` function executes a [Groonga command](http://groonga.org/docs/reference/command.html) and returns the result as `text` type value.

Here is `pgroonga.command` signature:

```text
pgroonga.command(command)
```

`command` is a `text` type value. `pgroonga.command` executes `command` as a Groonga command.

Groonga command returns result as JSON. `pgroonga.command` returns the JSON as `text` type value. You can use [JSON functions and operations provided by PostgreSQL](http://www.postgresql.org/docs/current/static/functions-json.html) by casting the result to `json` or `jsonb` type.

See also [examples in tutorial](../../tutorial/#groonga).
4 changes: 3 additions & 1 deletion tutorial/index.md
Expand Up @@ -427,6 +427,8 @@ SELECT * FROM products WHERE tags %% 'PostgreSQL';
-- (2 行)
```

{: #groonga}

## How to use Groonga throw PGroonga

This is an advanced topic.
Expand Down Expand Up @@ -473,7 +475,7 @@ SELECT * FROM json_each(pgroonga.command('status')::json->1);
-- (9 rows)
```

See [pgroonga.command function](../reference/functions/pgroonga-command.html) for more details.
See [`pgroonga.command` function](../reference/functions/pgroonga-command.html) for more details.

### `pgroonga.table_name` function

Expand Down

0 comments on commit 29f1c2f

Please sign in to comment.