Actions that can be performed on component databases
The Perl API provides utilities that allow you to query any of the Network Manager component databases and to retrieve and control the information stored in them.
The RIV::OQL Perl API module allows
you to perform operations on the component databases, including:
- Inserting new entries into the component databases
- Modifying existing device attributes
- Deleting entries from the component databases
To access a particular component database, the service in which the database resides must be running. For example, if you want to access a component database that resides in DISCO, ncp_disco must be running. Likewise, to access a CLASS database, ncp_class must be running.
After
you create a RIV::OQL object based on a selected
service, you can perform one of four actions on a component database:
- SELECT
- INSERT
- UPDATE
- DELETE
A SELECT statement returns records, while the other statements do not return any records.
The RIV::OQL module
allows you to:
- Access retrieved records using the
RIV::GetResultmethod. - Print these retrieved records using the
RIV::OQL::Printmethod. - Create new databases and tables with the
RIV::OQL::CreateDBandRIV::OQL::CreateTablemethods.
In addition to the previously described convenience methods,
you can use the RIV::OQL::Send($statement, $returnResults) method,
where $statement is any valid OQL statement, and $returnResults equals:
- 1 — For queries that return results. For example, select and show.
- 0 — For queries that do not return results. For example, insert.