运行查询

iTop使用自己的内部查询语言从数据库检索对象。在MySQL数据库内部,使用几个关系表存储了iTop操纵的对象,但是数据库对象语言(OQL)通过几乎像对待普通SQL表一样操作对象来隐藏这种复杂性。

OQL语法与SQL语法非常相似,只是因为iTop始终会操纵“对象”并根据需要检索列,因此不需要指示要检索的列。

菜单“运行查询”允许管理员测试并运行OQL查询(有关OQL语法的更多信息,请参阅对象查询语言引用)。在页面顶部,一些预定义查询列为示例(单击顶部的“查询示例”)。

Run Queries

对于测试和查询,在文本区域中键入OQL表达式,然后单击“评估”以获取结果。

由于查询的结果显示为HTML表,因此通过此方法只能查询可以显示为HTML的对象。以这种方式查询时,内部iTop对象列表的显示可能会导致错误。

原文:https://www.itophub.io/wiki/page?id=2_6_0%3Aadmin%3Aobjects_queries


Running Object Queries

iTop uses its own internal query language to retrieve the objects from the database. Inside the MySQL database the objects manipulated by iTop are stored using several relational tables, but the Object Query Language (OQL) hides this complexity by manipulating objects almost as if they were plain SQL tables.

The OQL syntax is quite similar to the SQL syntax, except that there is no need to indicate which columns to retrieve, since iTop always manipulates “objects” and retrieves the columns as necessary.

The menu “Run Queries” allows Administrators to test and run OQL queries (For more information about the OQL syntax, refer to Object Query Language Reference). Some predefined queries are listed as examples at the top of the page (click on “Query Examples” at the top).

Run Queries

To test a query, type the OQL expression in the text area, and click on “Evaluate” to get the results.

Since the result of the query is displayed as an HTML table, only objects that can be displayed as HTML can be queried by this method. The display of a list of internal iTop objects may cause an error when queried this way.

标签:
由 superadmin 在 2020/08/25, 16:28 创建
    

需要帮助?

如果您需要有关XWiki的帮助,可以联系:

深圳市艾拓先锋企业管理咨询有限公司