7.3.43. object_list
#
7.3.43.1. Summary#
Added in version 6.0.7.
object_list
lists objects in database. Object information is taken
from metadata in database. object_list
doesn’t open any
objects. So object_list
is a light command for database that has
many tables and/or columns.
Normally, schema is a useful command than
object_list
. Because schema returns more information than
object_list
.
7.3.43.2. Syntax#
This command takes no parameters:
object_list
7.3.43.3. Usage#
Here is an example schema to show example output:
Execution example:
table_create Memos TABLE_HASH_KEY ShortText
# [[0,1337566253.89858,0.000355720520019531],true]
column_create Memos content COLUMN_SCALAR Text
# [[0,1337566253.89858,0.000355720520019531],true]
table_create Terms TABLE_PAT_KEY ShortText \
--default_tokenizer TokenBigram \
--normalizer NormalizerAuto
# [[0,1337566253.89858,0.000355720520019531],true]
column_create Terms memos_content_index \
COLUMN_INDEX|WITH_POSITION \
Memos content
# [[0,1337566253.89858,0.000355720520019531],true]
Here is an output of object_list
command against this database:
Execution example:
object_list
# [
# [
# 0,
# 1337566253.89858,
# 0.000355720520019531
# ],
# {
# "Object": {
# "id": 2,
# "name": "Object",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 0,
# "names": "KEY_UINT"
# },
# "path": null,
# "size": 8
# },
# "Bool": {
# "id": 3,
# "name": "Bool",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 0,
# "names": "KEY_UINT"
# },
# "path": null,
# "size": 1
# },
# "Int8": {
# "id": 4,
# "name": "Int8",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 8,
# "names": "KEY_INT"
# },
# "path": null,
# "size": 1
# },
# "UInt8": {
# "id": 5,
# "name": "UInt8",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 0,
# "names": "KEY_UINT"
# },
# "path": null,
# "size": 1
# },
# "Int16": {
# "id": 6,
# "name": "Int16",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 8,
# "names": "KEY_INT"
# },
# "path": null,
# "size": 2
# },
# "UInt16": {
# "id": 7,
# "name": "UInt16",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 0,
# "names": "KEY_UINT"
# },
# "path": null,
# "size": 2
# },
# "Int32": {
# "id": 8,
# "name": "Int32",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 8,
# "names": "KEY_INT"
# },
# "path": null,
# "size": 4
# },
# "UInt32": {
# "id": 9,
# "name": "UInt32",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 0,
# "names": "KEY_UINT"
# },
# "path": null,
# "size": 4
# },
# "Int64": {
# "id": 10,
# "name": "Int64",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 8,
# "names": "KEY_INT"
# },
# "path": null,
# "size": 8
# },
# "UInt64": {
# "id": 11,
# "name": "UInt64",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 0,
# "names": "KEY_UINT"
# },
# "path": null,
# "size": 8
# },
# "Float": {
# "id": 12,
# "name": "Float",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 16,
# "names": "KEY_FLOAT"
# },
# "path": null,
# "size": 8
# },
# "Time": {
# "id": 13,
# "name": "Time",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 8,
# "names": "KEY_INT"
# },
# "path": null,
# "size": 8
# },
# "ShortText": {
# "id": 14,
# "name": "ShortText",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 16384,
# "names": "KEY_VAR_SIZE"
# },
# "path": null,
# "size": 4096
# },
# "Text": {
# "id": 15,
# "name": "Text",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 16384,
# "names": "KEY_VAR_SIZE"
# },
# "path": null,
# "size": 65536
# },
# "LongText": {
# "id": 16,
# "name": "LongText",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 16384,
# "names": "KEY_VAR_SIZE"
# },
# "path": null,
# "size": 2147483648
# },
# "TokyoGeoPoint": {
# "id": 17,
# "name": "TokyoGeoPoint",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 24,
# "names": "KEY_GEO_POINT"
# },
# "path": null,
# "size": 8
# },
# "WGS84GeoPoint": {
# "id": 18,
# "name": "WGS84GeoPoint",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 24,
# "names": "KEY_GEO_POINT"
# },
# "path": null,
# "size": 8
# },
# "Float32": {
# "id": 19,
# "name": "Float32",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 16,
# "names": "KEY_FLOAT"
# },
# "path": null,
# "size": 4
# },
# "BFloat16": {
# "id": 20,
# "name": "BFloat16",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 32,
# "name": "type"
# },
# "flags": {
# "value": 16,
# "names": "KEY_FLOAT"
# },
# "path": null,
# "size": 2
# },
# "TokenMecab": {
# "id": 64,
# "name": "TokenMecab",
# "opened": true,
# "n_elements": 4,
# "type": {
# "id": 33,
# "name": "proc"
# },
# "flags": {
# "value": 4096,
# "names": "CUSTOM_NAME"
# },
# "path": "tokenizers/mecab.so",
# "plugin_id": 1
# },
# "Memos": {
# "id": 256,
# "name": "Memos",
# "opened": false,
# "n_elements": 6,
# "type": {
# "id": 48,
# "name": "table:hash_key"
# },
# "flags": {
# "value": 49152,
# "names": "TABLE_HASH_KEY|PERSISTENT"
# },
# "path": "${DB_PATH}.0000100",
# "range": {
# "id": 0,
# "name": null
# },
# "token_filters": [
#
# ]
# },
# "Memos.content": {
# "id": 257,
# "name": "Memos.content",
# "opened": false,
# "n_elements": 5,
# "type": {
# "id": 65,
# "name": "column:var_size"
# },
# "flags": {
# "value": 49152,
# "names": "COLUMN_SCALAR|PERSISTENT"
# },
# "path": "${DB_PATH}.0000101",
# "range": {
# "id": 15,
# "name": "Text"
# },
# "sources": [
#
# ],
# "generator": ""
# },
# "Terms": {
# "id": 258,
# "name": "Terms",
# "opened": false,
# "n_elements": 6,
# "type": {
# "id": 49,
# "name": "table:pat_key"
# },
# "flags": {
# "value": 49153,
# "names": "TABLE_PAT_KEY|PERSISTENT"
# },
# "path": "${DB_PATH}.0000102",
# "range": {
# "id": 0,
# "name": null
# },
# "token_filters": [
#
# ]
# },
# "Terms.memos_content_index": {
# "id": 259,
# "name": "Terms.memos_content_index",
# "opened": false,
# "n_elements": 4,
# "type": {
# "id": 72,
# "name": "column:index"
# },
# "flags": {
# "value": 33282,
# "names": "COLUMN_INDEX|WITH_POSITION|PERSISTENT"
# },
# "path": "${DB_PATH}.0000103",
# "range": {
# "id": 256,
# "name": "Memos"
# },
# "sources": [
# {
# "id": 257,
# "name": "Memos.content"
# }
# ]
# }
# }
# ]
7.3.43.4. Parameters#
This section describes all parameters.
7.3.43.4.1. Required parameters#
There is no required parameter.
7.3.43.4.2. Optional parameters#
There is no optional parameter.
7.3.43.5. Return value#
object_list
command returns a list of object information in the
database:
[HEADER, OBJECTS]
7.3.43.5.1. HEADER
#
See Output format about HEADER
.
7.3.43.5.2. OBJECTS
#
OBJECTS
are pairs of object name and object details:
{
"OBJECT_1": OBJECT_1,
"OBJECT_2": OBJECT_2,
...,
"OBJECT_n": OBJECT_n,
}
Each OBJECT
consists of common properties and object type specific
properties.
7.3.43.5.3. OBJECT
(common properties)#
Here are common properties:
{
"id": ID,
"name": NAME,
"opened": OPENED,
"value_size": N_BYTES,
"n_elements": N_ELEMENTS,
"type": OBJECT_TYPE,
"flags": FLAGS,
"path": PATH
}
Name |
Description |
---|---|
|
The ID of the object. |
|
The name of the object. |
|
Whether the object is opened or not. It’s |
|
The number of bytes of the metadata. It’s an integer. It’s appeared only when the metadata are broken. If this
property is appeared, |
|
The number of internal elements in the metadata. It’s an integer. |
|
The type of the object. See OBJECT_TYPE for details. |
|
The flags of the object. See FLAGS for details. |
|
The path that contains data of the object. It’s |
7.3.43.5.4. OBJECT_TYPE
#
OBJECT_TYPE
represents the type of object. For example, patricia
trie table, hash table and index column are object types.
OBJECT_TYPE
has the following properties:
{
"id": ID,
"name": NAME
}
Name |
Description |
---|---|
|
The ID of the type. |
|
The name of the type. For example, TABLE_HASH_KEY is
|
7.3.43.5.5. FLAGS
#
FLAGS
represents the flags of object. The most flags are the
specified flags in table_create or column_create. Some
flags are added internally.
FLAGS
has the following properties:
{
"value": VALUE,
"names": NAMES
}
Name |
Description |
---|---|
|
The value of the flags. It’s an integer. |
|
The names of each flag. It’s a string. Each name is separated
by |
7.3.43.5.6. OBJECT
("type"
object type specific properties)#
Here are "type"
object type specific properties in OBJECT
:
{
"size": SIZE
}
Name |
Description |
---|---|
|
The size of the type. If the type is fixed size type, the size is the size of each value. If the type is variable size type, the size is the maximum size of each value. |
7.3.43.5.7. OBJECT
("proc"
object type specific properties)#
Here is a list of object that is "proc"
object type:
Here are "proc"
object type specific properties in OBJECT
:
{
"plugin_id": PLUGIN_ID
}
Name |
Description |
---|---|
|
The plugin ID of the |
7.3.43.5.8. OBJECT
("table:*"
object types specific properties)#
Here are "table:*"
object types specific properties in
OBJECT
:
{
"range": RANGE,
"token_filters": TOKEN_FILTERS
}
Name |
Description |
---|---|
|
The type of the table’s value. See RANGE for details. |
|
The token filters of the table. See TOKEN_FILTERS for details. |
7.3.43.5.9. RANGE
#
RANGE
represents the type of the range.
RANGE
has the following properties:
{
"id": ID,
"name": NAME
}
Name |
Description |
---|---|
|
The ID of the type of the range. It’s an integer. If the object
doesn’t have range, ID is |
|
The name of the type of the range. It’s a string or |
7.3.43.5.10. TOKEN_FILTERS
#
TOKEN_FILTERS
represents the token filters of the table.
TOKEN_FILTERS
is an array of TOKEN_FILTER
:
[
TOKEN_FILTER_1,
TOKEN_FILTER_2,
...,
TOKEN_FILTER_n
]
TOKEN_FILTER
has the following properties:
{
"id": ID,
"NAME": NAME
}
Name |
Description |
---|---|
|
The ID of the token filter. It’s an integer. |
|
The name of the token filter. It’s a string. |
7.3.43.5.11. OBJECT
("column:*"
object types specific properties)#
Here are "column:*"
object types specific properties in
OBJECT
:
{
"range": RANGE,
"sources": SOURCES
}
7.3.43.5.12. OBJECT
("column:fix"
and "column:var"
object types specific properties)#
Here are "column:fix"
and "column:var"
object type specific
properties in OBJECT
:
{
"generator": GENERATOR
}
Name |
Description |
---|---|
|
Added in version 14.1.0. The generator expression in Script syntax. If the column is not a Generated column, this is an empty string. |
7.3.43.5.13. SOURCES
#
SOURCES
represents the sources of an index column or a generated
column.
SOURCES
is an array of SOURCE
:
[
SOURCE_1,
SOURCE_2,
...,
SOURCE_n
]
SOURCE
has the following properties:
{
"id": ID,
"NAME": NAME
}
Name |
Description |
---|---|
|
The ID of the source table or column. It’s an integer. |
|
The name of the source table or column. It’s a string. |