system prop service
More...
Inherits QorusSystemService.
|
int | reload () |
| reload service method More...
|
|
auto | get (string domain, softstring key) |
| get service method More...
|
|
string | update (string domain, softstring key, auto value) |
| update service method More...
|
|
hash | updateMany (hash hash) |
| updateMany service method More...
|
|
string | export (*softlist domains, softbool yaml=False) |
| export service method More...
|
|
nothing | import (string data, *softlist domains) |
| import service method More...
|
|
◆ export()
string QorusSystemPropService::export |
( |
*softlist |
domains, |
|
|
softbool |
yaml = False |
|
) |
| |
|
inline |
export service method
Exports properties as an XML or YAML string (not a file). Attributes in the "qorus_properties"
tag are only informational and are not used with prop.import(). The system domain "omq"
is not exported.
Example XML output:
<?xml version="1.0" encoding="UTF-8"?>
<qorus_properties instance="quark-1" schema-version="3.1.0" schema-compatibility="3.1.0" schema-load-compatibility="3.1.0">
<domain1>
<key1>value</key1>
<key2>value</key2>
</domain1>
</qorus_properties>
Example YAML output:
{qorus_properties: {domain1: {key1: "value", key2: "value"},
^attributes^: {instance: "quark-1", schema-version: "3.1.0",
schema-compatibility: "3.1.0", schema-load-compatibility: "3.1.0"}}}
- Parameters
-
domains | if this value is set, then only the domains listed are exported |
yaml | export as YAML instead of XML if this parameter is True |
- Note
- - type information is only preserved when exporting as a YAML string
- Deprecated:
- use REST API call GET /api/latest/system/props?action=export instead
◆ get()
auto QorusSystemPropService::get |
( |
string |
domain, |
|
|
softstring |
key |
|
) |
| |
|
inline |
get service method
- Parameters
-
domain | if the domain name is not sent, then a hash of all system properties is returned |
key | if the key is not sent, then a hash of all properties in the domain is returned |
- Deprecated:
- use prop_get() GET /api/latest/system/props/{domain}/{key} instead
◆ import()
nothing QorusSystemPropService::import |
( |
string |
data, |
|
|
*softlist |
domains |
|
) |
| |
|
inline |
◆ reload()
int QorusSystemPropService::reload |
( |
| ) |
|
|
inline |
◆ update()
string QorusSystemPropService::update |
( |
string |
domain, |
|
|
softstring |
key, |
|
|
auto |
value |
|
) |
| |
|
inline |
update service method
Updates the value of the property in the domain passed. If the property does not exist then it is created. If the value is NOTHING
(i.e. if no value is supplied) then the property will be deleted. Changes are committed to the database and the internal cache before the method call returns. No changes may be made in the system "omq"
domain.
- Parameters
-
domain | the domain of the property to set |
key | the key to set |
value | the value to set in the property |
- Returns
- the action code,
"INSERT"
, "UPDATE"
, "DELETE"
, "IGNORED"
(if a non-existent key should be deleted)
- Exceptions
-
PARAMETER-ERROR | if the domain or key arguments are empty strings |
PROP-ERROR | serialized value exceeds 4000 bytes (column limit) |
UPDATE-ERROR | changes attempted in the "omq" domain |
- Deprecated:
- use prop_update() or PUT /api/latest/system/props/{domain}/{key}?action=set instead
◆ updateMany()
hash QorusSystemPropService::updateMany |
( |
hash |
hash | ) |
|
|
inline |
updateMany service method
Updates the values of the properties in the domain corresponding to the top level keys of the hash passed and the keys corresponding to the second-level keys in the hash according to the rules for the prop.update() method.
The method returns a hash with "INSERT"
, "UPDATE"
, "DELETE"
and "IGNORED"
keys having integer values corresponding to the number of operations performed (deleting a non-existent key or domain causes a "IGNORED"
value to be returned).
All changes are made atomically in a single transaction.
- Parameters
-
hash | in the format domain.key.value for updating, inserting, or deleting |
- Returns
- a hash of action codes as keys, with the values of each key being the number of actions of that type executed
- Exceptions
-
PROP-ERROR | serialized value exceeds 4000 bytes (column limit) |
UPDATE-ERROR | changes attempted in the "omq" domain |
- Deprecated:
- use prop_update() or PUT /api/latest/system/props/{domain}?action=updateMany instead
The documentation for this class was generated from the following file: