7.3.16. config_delete
#
7.3.16.1. Summary#
Added in version 5.1.2.
config_delete
command deletes the specified configuration item.
7.3.16.2. Syntax#
This command takes only one required parameter:
config_delete key
7.3.16.3. Usage#
Here is an example to delete alias.column
configuration item:
Execution example:
config_set alias.column Aliases.real_name
# [[0,1337566253.89858,0.000355720520019531],true]
config_get alias.column
# [[0,1337566253.89858,0.000355720520019531],"Aliases.real_name"]
config_delete alias.column
# [[0,1337566253.89858,0.000355720520019531],true]
config_get alias.column
# [[0,1337566253.89858,0.000355720520019531],""]
Here is an example to delete nonexistent configuration item:
Execution example:
config_delete nonexistent
# [
# [
# -22,
# 1337566253.89858,
# 0.000355720520019531,
# "[config][delete] failed to delete: <nonexistent>",
# [
# [
# "grn_config_delete",
# "lib/config.c",
# 2929
# ]
# ]
# ],
# false
# ]
config_delete
returns an error when you try to delete nonexistent
configuration item.
7.3.16.4. Parameters#
This section describes all parameters.
7.3.16.4.1. Required parameters#
There is only one required parameter.
7.3.16.4.1.1. key
#
Specifies the key of target configuration item.
The max key size is 4KiB.
You can’t use an empty string as key.
7.3.16.4.2. Optional parameters#
There is no optional parameter.
7.3.16.5. Return value#
config_delete
command returns whether deleting a configuration
item is succeeded or not:
[HEADER, SUCCEEDED_OR_NOT]
7.3.16.5.1. HEADER
#
See Output format about HEADER
.
7.3.16.5.2. SUCCEEDED_OR_NOT
#
If command succeeded, it returns true, otherwise it returns false on error.