|
Groonga
|

Go to the source code of this file.
Functions | |
| GRN_API grn_obj * | grn_inspect (grn_ctx *ctx, grn_obj *buffer, grn_obj *obj) |
| Inspect specified object and produce a textual representation. | |
| GRN_API grn_obj * | grn_inspect_indent (grn_ctx *ctx, grn_obj *buffer, grn_obj *content, const char *indent) |
| GRN_API grn_obj * | grn_inspect_indented (grn_ctx *ctx, grn_obj *buffer, grn_obj *obj, const char *indent) |
| Inspect specified object and produce an indented textual representation. | |
| GRN_API grn_obj * | grn_inspect_limited (grn_ctx *ctx, grn_obj *buffer, grn_obj *obj) |
| Inspect specified object and produce a length-limited textual representation. | |
| GRN_API grn_obj * | grn_inspect_name (grn_ctx *ctx, grn_obj *buffer, grn_obj *obj) |
| Inspect specified object and return the name of the specified object. | |
| GRN_API grn_obj * | grn_inspect_encoding (grn_ctx *ctx, grn_obj *buffer, grn_encoding encoding) |
| Inspect the given encoding and produce its name. | |
| GRN_API grn_obj * | grn_inspect_type (grn_ctx *ctx, grn_obj *buffer, unsigned char type) |
| Inspect the given type and produce its name. | |
| GRN_API grn_obj * | grn_inspect_query_log_flags (grn_ctx *ctx, grn_obj *buffer, unsigned int flags) |
| Inspect the given query log flags and produce their names. | |
| GRN_API grn_obj * | grn_inspect_key (grn_ctx *ctx, grn_obj *buffer, grn_obj *table, const void *key, uint32_t key_size) |
| GRN_API void | grn_p (grn_ctx *ctx, grn_obj *obj) |
| Print inspected text of the given object. | |
| GRN_API void | grn_p_geo_point (grn_ctx *ctx, grn_geo_point *point) |
| Print inspected text of the given geo point. | |
| GRN_API void | grn_p_ii_values (grn_ctx *ctx, grn_obj *obj) |
| Print inspected text of the given index column values. | |
Inspect specified object and produce a textual representation.
obj is a GRN_TABLE_PAT_KEY table, all keys are shown. To limit output on GRN_TABLE_PAT_KEY tables, use grn_inspect_limited instead.For example usage:
| ctx | The context object. |
| buffer | The buffer where the inspected text will be stored. |
| obj | The target object to inspect. |
| GRN_API grn_obj * grn_inspect_encoding | ( | grn_ctx * | ctx, |
| grn_obj * | buffer, | ||
| grn_encoding | encoding | ||
| ) |
Inspect the given encoding and produce its name.
For example usage:
For example output: Depending on encoding, it will output one of the following lines:
| ctx | The context object. |
| buffer | The buffer where the encoding name will be stored. |
| encoding | The encoding to inspect. Must be one of: |
| GRN_API grn_obj * grn_inspect_indent | ( | grn_ctx * | ctx, |
| grn_obj * | buffer, | ||
| grn_obj * | content, | ||
| const char * | indent | ||
| ) |
| GRN_API grn_obj * grn_inspect_indented | ( | grn_ctx * | ctx, |
| grn_obj * | buffer, | ||
| grn_obj * | obj, | ||
| const char * | indent | ||
| ) |
Inspect specified object and produce an indented textual representation.
This function combines grn_inspect and grn_inspect_indent. It first inspects the given obj into a temporary buffer, then prepends the given indent string to each line of that inspected text and stores the result in buffer.
indent string is only applied when the inspected text contains one or more newline characters (when the output spans multiple lines).For example usage:
If obj is GRN_TABLE_PAT_KEY table, it prints like the following.
| ctx | The context object. |
| buffer | The buffer where the indented inspected text will be stored. |
| obj | The target object to inspect. |
| indent | The indentation string to prepend to each line of output. |
| GRN_API grn_obj * grn_inspect_key | ( | grn_ctx * | ctx, |
| grn_obj * | buffer, | ||
| grn_obj * | table, | ||
| const void * | key, | ||
| uint32_t | key_size | ||
| ) |
Inspect specified object and produce a length-limited textual representation.
This function inspects obj into buffer, but if the full representation exceeds half of GRN_CTX_MSGSIZE, the output is truncated to that length, and "...(original length)" is appended to indicate the total size.
GRN_CTX_MSGSIZE/2, it will be truncated otherwise it is copied in full.For example usage:
If obj is GRN_TABLE_PAT_KEY table, it prints truncated result as follows.
| ctx | The context object. |
| buffer | The buffer where the truncated inspected text will be stored. |
| obj | The target object to inspect. |
Inspect specified object and return the name of the specified object.
This function inspects the given obj and writes its name into buffer. If obj has a name, that name is copied into buffer. Otherwise:
obj's ID is a GRN_ID_NIL, the (nil) is stored in buffer.obj exists but has no name, the (anonymous:ID) is stored.For example usage:
For example output: Depending on obj, it will output one of the following lines:
| ctx | The context object. |
| buffer | The buffer where the inspected name will be stored. |
| obj | The target object whose name is to be inspected. |
| GRN_API grn_obj * grn_inspect_query_log_flags | ( | grn_ctx * | ctx, |
| grn_obj * | buffer, | ||
| unsigned int | flags | ||
| ) |
Inspect the given query log flags and produce their names.
For example usage:
For example output: Depending on flags, it will output one of the following:
When multiple flags are set, they are displayed separated by "|".
Available flags:
| ctx | The context object. |
| buffer | The buffer where the flag names will be stored. |
| flags | The query log flags to inspect. |
Inspect the given type and produce its name.
For example usage:
For example output: Depending on type, it will output one of the following lines:
Table types:
Column types:
Data container types:
Cursor types:
Other object types:
Unknown types:
Where 0x42 is an example of the hexadecimal value for unknown types.
| ctx | The context object. |
| buffer | The buffer where the type name will be stored. |
| type | The type to inspect. This is typically obtained from an grn_obj_header::type. |
Print inspected text of the given object.
For example usage:
If obj is a ShortText type, it prints output like:
| ctx | The context object. |
| obj | The object to inspect and print. |
| GRN_API void grn_p_geo_point | ( | grn_ctx * | ctx, |
| grn_geo_point * | point | ||
| ) |
Print inspected text of the given geo point.
This function inspects the given point and prints the result directly to stdout. It internally creates a WGS84 geo point object from the provided grn_geo_point structure and prints its inspected representation.
For example usage:
If point indicates New York City, it prints output like:
| ctx | The context object. |
| point | The geo point to inspect and print. |
Print inspected text of the given index column values.
For example usage:
If obj is an index column, it prints output like:
| ctx | The context object. |
| obj | The index column to inspect and print. |