/usr/share/gtk-doc/html/bonobo-activation/query-syntax.html is in libbonobo2-dev 2.32.1-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Syntax</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Bonobo Activation API Reference Manual">
<link rel="up" href="query-langage.html" title="Bonobo Activation Query Langage">
<link rel="prev" href="query-langage.html" title="Bonobo Activation Query Langage">
<link rel="next" href="server-xml-reference.html" title=".server file format reference">
<meta name="generator" content="GTK-Doc V1.16 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="query-langage.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="query-langage.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Bonobo Activation API Reference Manual</th>
<td><a accesskey="n" href="server-xml-reference.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="query-syntax"></a>Syntax</h2></div></div></div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="oaf-query-ref-types"></a>Constants</h3></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>'string': As in SQL, delimited by single quotes. Example: 'mystring'
</p></li>
<li class="listitem"><p>'stringv' (string arrays): A comma-separated list of strings, surrounded
by square brackets. Example: ['red','blue']
</p></li>
<li class="listitem"><p>'number': Floating point decimals. (aka "whatever atof() accepts" :)
</p></li>
<li class="listitem"><p>'boolean': TRUE or FALSE (other common boolean value identifiers also
accepted, but not encouraged).
</p></li>
</ul></div>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="id326930"></a>Field identifiers</h3></div></div></div>
<p>
Names of fields are attributes of a ServerInfo record. These include
'server_type', 'location_info', and 'iid', even though these are explicitly
stored instead of just other attributes.
</p>
<p>
Some pseudo-fields are also available - they are all prefaced with an underscore:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
_active : Whether the server is currently running (boolean)
</p></li></ul></div>
<p>
</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="id326953"></a>Variables</h3></div></div></div>
<p>
Variables are various miscellaneous data items that are part of the
environment. The syntax for referring to a variable is a '$' sign
followed by the variable name. The following variables are available:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>$hostname : the hostname that the requesting client is running on.
</p></li>
<li class="listitem"><p>$domain : the "domain" that the client is requesting activation in.
</p></li>
</ul></div>
<p>
</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="id326978"></a>Functions</h3></div></div></div>
<p>Functions perform transformations on data and return a result. There are
two possible syntaxes for a function call:
</p>
<pre class="programlisting">
funcname(field, other-arguments)
field.funcname(other-arguments...)
</pre>
<p>
Internally, 'field.funcname(other-arguments...)' is translated to be
exactly the same as 'funcname(field, other-arguments)', so
'priority.max()' is exactly the same as 'max(priority)'. Function names are
case insensitive. The following functions are available:
</p>
<p>
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>
defined(expression) :
Returns a boolean value that indicates whether the given expression is defined for the current
record. For example, using a field name would indicate whether that field is defined for the
record.
</p></li>
<li class="listitem"><p>
has_one(stringv1, stringv2) :
Returns a boolean value that indicates whether any of the strings
in the 'stringv2' array are contained in the 'stringv1' array.
</p></li>
<li class="listitem"><p>
has_all(stringv1, stringv2) :
Returns a boolean value that indicates whether all of the strings
in the 'stringv2' array are contained in the 'stringv1' array.
</p></li>
<li class="listitem"><p>
has(stringv, string)
Returns a boolean value that indicates whether 'string' is contained in the 'stringv' array.
</p></li>
<li class="listitem"><p>
prefer_by_list_order(string, stringv)
This function is intended to use as a sort condition when you have a prioritized list of
preferred values. It returns -1 if the 'string' is not in the 'stringv' array, otherwise
it's position measured from the end of 'stringv'. The result is that the first item is
most preferred, items after that are next most preferred, and items not in the list are
lowest priority.
</p></li>
<li class="listitem"><p>
max(expr)
Evaluates 'expr' over all the available server information records in the database, and returns
the maximum value as dictated by the normal sort order for the data type of 'expr'.
This function is not valid for string vectors.
</p></li>
<li class="listitem"><p>
min(expr)
As with the 'max' function, but finds the minimum value.
</p></li>
</ul></div>
<p>
</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="id327045"></a>Operators</h3></div></div></div>
<p>
More complex queries can be built using the various operators described below. </p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>When building complex expressions, make sure they are fully parenthized or your query will fail in weird ways.</div>
<p>
</p>
<div class="table">
<a name="id327058"></a><p class="title"><b>Table 1. Binary relational operators.</b></p>
<div class="table-contents"><table summary="Binary relational operators." border="1">
<colgroup>
<col align="left">
<col align="left">
</colgroup>
<thead><tr>
<th align="left">Operator</th>
<th align="left">Signification</th>
</tr></thead>
<tbody>
<tr>
<td align="left">==</td>
<td align="left">equal</td>
</tr>
<tr>
<td align="left">!=</td>
<td align="left">not equal</td>
</tr>
<tr>
<td align="left"><</td>
<td align="left">less than</td>
</tr>
<tr>
<td align="left">></td>
<td align="left">greater than</td>
</tr>
<tr>
<td align="left"><=</td>
<td align="left">less than or equal</td>
</tr>
<tr>
<td align="left">>=</td>
<td align="left">greater than or equal</td>
</tr>
</tbody>
</table></div>
</div>
<p><br class="table-break">
</p>
<div class="table">
<a name="id327161"></a><p class="title"><b>Table 2. Binary boolean operators.</b></p>
<div class="table-contents"><table summary="Binary boolean operators." border="1">
<colgroup>
<col align="left">
<col align="left">
</colgroup>
<thead><tr>
<th align="left">Operator</th>
<th align="left">Signification</th>
</tr></thead>
<tbody>
<tr>
<td align="left">&& or AND</td>
<td align="left">and</td>
</tr>
<tr>
<td align="left">|| or OR</td>
<td align="left">or</td>
</tr>
<tr>
<td align="left">^^ or XOR</td>
<td align="left">exclusive or</td>
</tr>
</tbody>
</table></div>
</div>
<p><br class="table-break">
</p>
<div class="table">
<a name="id327236"></a><p class="title"><b>Table 3. Unary boolean operators.</b></p>
<div class="table-contents"><table summary="Unary boolean operators." border="1">
<colgroup>
<col align="left">
<col align="left">
</colgroup>
<thead><tr>
<th align="left">Operator</th>
<th align="left">Signification</th>
</tr></thead>
<tbody><tr>
<td align="left">~ or NOT</td>
<td align="left">not</td>
</tr></tbody>
</table></div>
</div>
<p><br class="table-break">
</p>
<div class="table">
<a name="id327291"></a><p class="title"><b>Table 4. Binary arithmetic operators.</b></p>
<div class="table-contents"><table summary="Binary arithmetic operators." border="1">
<colgroup>
<col align="left">
<col align="left">
</colgroup>
<thead><tr>
<th align="left">Operator</th>
<th align="left">Signification</th>
</tr></thead>
<tbody>
<tr>
<td align="left">/</td>
<td align="left">divided by</td>
</tr>
<tr>
<td align="left">+</td>
<td align="left">plus</td>
</tr>
<tr>
<td align="left">-</td>
<td align="left">minus</td>
</tr>
<tr>
<td align="left">*</td>
<td align="left">times</td>
</tr>
</tbody>
</table></div>
</div>
<p><br class="table-break">
</p>
<div class="table">
<a name="id327376"></a><p class="title"><b>Table 5. Unary arithmetic operators.</b></p>
<div class="table-contents"><table summary="Unary arithmetic operators." border="1">
<colgroup>
<col align="left">
<col align="left">
</colgroup>
<thead><tr>
<th align="left">Operator</th>
<th align="left">Signification</th>
</tr></thead>
<tbody><tr>
<td align="left">-</td>
<td align="left">negate</td>
</tr></tbody>
</table></div>
</div>
<p><br class="table-break">
</p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.16</div>
</body>
</html>
|