| 1 |
.. -*- rst -*- |
| 2 |
|
| 3 |
``grn_inspect`` |
| 4 |
=============== |
| 5 |
|
| 6 |
Summary |
| 7 |
------- |
| 8 |
|
| 9 |
There are two kind of functions to inspect :c:type:`grn_obj`. One is ``grn_inspect`` function, The other is ``grn_p`` function. |
| 10 |
|
| 11 |
Here is the list of ``grn_inspect`` function series. It sets inspected text into specified object. |
| 12 |
|
| 13 |
* :c:func:`grn_inspect()` |
| 14 |
* :c:func:`grn_inspect_indented()` |
| 15 |
* :c:func:`grn_inspect_limited()` |
| 16 |
* :c:func:`grn_inspect_name()` |
| 17 |
* :c:func:`grn_inspect_encoding()` |
| 18 |
* :c:func:`grn_inspect_type()` |
| 19 |
* :c:func:`grn_inspect_query_log_flags()` |
| 20 |
|
| 21 |
Here is the list of ``grn_p`` function series. It prints inspected text into console. |
| 22 |
|
| 23 |
* :c:func:`grn_p()` |
| 24 |
* :c:func:`grn_p_geo_point()` |
| 25 |
* :c:func:`grn_p_ii_values()` |
| 26 |
|
| 27 |
Example |
| 28 |
------- |
| 29 |
|
| 30 |
Here is an example which inspects specified target object. |
| 31 |
|
| 32 |
.. code-block:: c |
| 33 |
|
| 34 |
grn_obj buffer; |
| 35 |
GRN_TEXT_INIT(&buffer, 0); |
| 36 |
grn_inspect(&context, &buffer, obj); |
| 37 |
/* equivalent to grn_p(ctx, obj); */ |
| 38 |
printf("inspected: <%.*s>\n", (int)GRN_TEXT_LEN(&buffer), GRN_TEXT_VALUE(&buffer)); |
| 39 |
|
| 40 |
Reference |
| 41 |
--------- |
| 42 |
|
| 43 |
.. note:: |
| 44 |
We are currently switching to automatic generation using Doxygen. |