mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-11 14:41:06 +02:00
365 lines
18 KiB
HTML
365 lines
18 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>Variables</title>
|
||
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
||
<link rel="start" href="index.html" title="Rasqal RDF Query Library Manual">
|
||
<link rel="up" href="pt01.html" title="Part I. Reference Manual">
|
||
<link rel="prev" href="rasqal-section-triples-source.html" title="Triples Source">
|
||
<link rel="next" href="rasqal-section-xsd.html" title="XML Schema Decimals">
|
||
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
|
||
<link rel="stylesheet" href="style.css" type="text/css">
|
||
<link rel="chapter" href="rasqal.html" title="Rasqal Overview">
|
||
<link rel="part" href="pt01.html" title="Part I. Reference Manual">
|
||
<link rel="index" href="ix01.html" title="Index">
|
||
</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="rasqal-section-triples-source.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
||
<td><a accesskey="u" href="pt01.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">Rasqal RDF Query Library Manual</th>
|
||
<td><a accesskey="n" href="rasqal-section-xsd.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
||
</tr>
|
||
<tr><td colspan="5" class="shortcuts"><nobr><a href="#rasqal-section-variable.synopsis" class="shortcut">Top</a>
|
||
|
|
||
<a href="#rasqal-section-variable.description" class="shortcut">Description</a></nobr></td></tr>
|
||
</table>
|
||
<div class="refentry" lang="en">
|
||
<a name="rasqal-section-variable"></a><div class="titlepage"></div>
|
||
<div class="refnamediv"><table width="100%"><tr>
|
||
<td valign="top">
|
||
<h2><span class="refentrytitle"><a name="rasqal-section-variable.top_of_page"></a>Variables</span></h2>
|
||
<p>Variables — Variable with names and literal value.</p>
|
||
</td>
|
||
<td valign="top" align="right"></td>
|
||
</tr></table></div>
|
||
<div class="refsynopsisdiv">
|
||
<a name="rasqal-section-variable.synopsis"></a><h2>Synopsis</h2>
|
||
<pre class="synopsis">
|
||
<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a>;
|
||
<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a>* <a class="link" href="rasqal-section-variable.html#rasqal-new-variable" title="rasqal_new_variable ()">rasqal_new_variable</a> (<a class="link" href="rasqal-section-query.html#rasqal-query" title="rasqal_query">rasqal_query</a> *rq,
|
||
unsigned char *name,
|
||
<a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal">rasqal_literal</a> *value);
|
||
<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a>* <a class="link" href="rasqal-section-variable.html#rasqal-new-variable-typed" title="rasqal_new_variable_typed ()">rasqal_new_variable_typed</a> (<a class="link" href="rasqal-section-query.html#rasqal-query" title="rasqal_query">rasqal_query</a> *rq,
|
||
<a class="link" href="rasqal-section-variable.html#rasqal-variable-type" title="enum rasqal_variable_type">rasqal_variable_type</a> type,
|
||
unsigned char *name,
|
||
<a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal">rasqal_literal</a> *value);
|
||
<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a>* <a class="link" href="rasqal-section-variable.html#rasqal-new-variable-from-variable" title="rasqal_new_variable_from_variable ()">rasqal_new_variable_from_variable</a> (<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a> *v);
|
||
void <a class="link" href="rasqal-section-variable.html#rasqal-free-variable" title="rasqal_free_variable ()">rasqal_free_variable</a> (<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a> *v);
|
||
void <a class="link" href="rasqal-section-variable.html#rasqal-variable-print" title="rasqal_variable_print ()">rasqal_variable_print</a> (<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a> *v,
|
||
FILE *fh);
|
||
void <a class="link" href="rasqal-section-variable.html#rasqal-variable-set-value" title="rasqal_variable_set_value ()">rasqal_variable_set_value</a> (<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a> *v,
|
||
<a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal">rasqal_literal</a> *l);
|
||
enum <a class="link" href="rasqal-section-variable.html#rasqal-variable-type" title="enum rasqal_variable_type">rasqal_variable_type</a>;
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1" lang="en">
|
||
<a name="rasqal-section-variable.description"></a><h2>Description</h2>
|
||
<p>
|
||
A class to hold a variable with optional name and a
|
||
<a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal"><span class="type">rasqal_literal</span></a> value. The name is not required for SPARQL
|
||
anonymous variables, when constructed with
|
||
<a class="link" href="rasqal-section-variable.html#rasqal-new-variable-typed" title="rasqal_new_variable_typed ()"><code class="function">rasqal_new_variable_typed()</code></a> and type <a class="link" href="rasqal-section-variable.html#RASQAL-VARIABLE-TYPE-ANONYMOUS:CAPS"><span class="type">RASQAL_VARIABLE_TYPE_ANONYMOUS</span></a>.
|
||
</p>
|
||
</div>
|
||
<div class="refsect1" lang="en">
|
||
<a name="rasqal-section-variable.details"></a><h2>Details</h2>
|
||
<div class="refsect2" lang="en">
|
||
<a name="rasqal-variable"></a><h3>rasqal_variable</h3>
|
||
<pre class="programlisting">typedef struct {
|
||
const unsigned char *name;
|
||
rasqal_literal* value;
|
||
int offset;
|
||
rasqal_variable_type type;
|
||
struct rasqal_expression_s* expression;
|
||
} rasqal_variable;
|
||
</pre>
|
||
<p>
|
||
Binding between a variable name and a value.
|
||
</p>
|
||
<p>
|
||
Includes internal field <em class="parameter"><code>offset</code></em> for recording the offset into the
|
||
(internal) rasqal_query variables array.</p>
|
||
<p>
|
||
|
||
</p>
|
||
<div class="variablelist"><table border="0">
|
||
<col align="left" valign="top">
|
||
<tbody>
|
||
<tr>
|
||
<td><p><span class="term"><a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal">rasqal_literal</a> *<em class="structfield"><code>value</code></em>;</span></p></td>
|
||
<td> Variable value or NULL if unbound.
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term">int <em class="structfield"><code>offset</code></em>;</span></p></td>
|
||
<td> Internal.
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><a class="link" href="rasqal-section-variable.html#rasqal-variable-type" title="enum rasqal_variable_type">rasqal_variable_type</a> <em class="structfield"><code>type</code></em>;</span></p></td>
|
||
<td> Variable type.
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term">struct rasqal_expression_s *<em class="structfield"><code>expression</code></em>;</span></p></td>
|
||
<td> Expression when the variable is a computed SELECT expression
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2" lang="en">
|
||
<a name="rasqal-new-variable"></a><h3>rasqal_new_variable ()</h3>
|
||
<pre class="programlisting"><a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a>* rasqal_new_variable (<a class="link" href="rasqal-section-query.html#rasqal-query" title="rasqal_query">rasqal_query</a> *rq,
|
||
unsigned char *name,
|
||
<a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal">rasqal_literal</a> *value);</pre>
|
||
<p>
|
||
Constructor - Create a new Rasqal normal variable.
|
||
</p>
|
||
<p>
|
||
The variable must be associated with a query, since variable
|
||
names are only significant with a single query.
|
||
</p>
|
||
<p>
|
||
This creates a regular variable that can be returned of type
|
||
RASQAL_VARIABLE_TYPE_NORMAL. Use rasqal_new_variable_typed
|
||
to create other variables.
|
||
</p>
|
||
<p>
|
||
The <em class="parameter"><code>name</code></em> and <em class="parameter"><code>value</code></em> become owned by the rasqal_variable structure</p>
|
||
<p>
|
||
|
||
</p>
|
||
<div class="variablelist"><table border="0">
|
||
<col align="left" valign="top">
|
||
<tbody>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>rq</code></em> :</span></p></td>
|
||
<td> <a class="link" href="rasqal-section-query.html#rasqal-query" title="rasqal_query"><span class="type">rasqal_query</span></a> to associate the variable with
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
||
<td> variable name
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
|
||
<td> variable <a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal"><span class="type">rasqal_literal</span></a> value (or NULL)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
||
<td> a new <a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable"><span class="type">rasqal_variable</span></a> or NULL on failure.
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2" lang="en">
|
||
<a name="rasqal-new-variable-typed"></a><h3>rasqal_new_variable_typed ()</h3>
|
||
<pre class="programlisting"><a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a>* rasqal_new_variable_typed (<a class="link" href="rasqal-section-query.html#rasqal-query" title="rasqal_query">rasqal_query</a> *rq,
|
||
<a class="link" href="rasqal-section-variable.html#rasqal-variable-type" title="enum rasqal_variable_type">rasqal_variable_type</a> type,
|
||
unsigned char *name,
|
||
<a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal">rasqal_literal</a> *value);</pre>
|
||
<p>
|
||
Constructor - Create a new typed Rasqal variable.
|
||
</p>
|
||
<p>
|
||
The variable must be associated with a query, since variable
|
||
names are only significant with a single query.
|
||
</p>
|
||
<p>
|
||
The <em class="parameter"><code>name</code></em> and <em class="parameter"><code>value</code></em> become owned by the rasqal_variable structure</p>
|
||
<p>
|
||
|
||
</p>
|
||
<div class="variablelist"><table border="0">
|
||
<col align="left" valign="top">
|
||
<tbody>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>rq</code></em> :</span></p></td>
|
||
<td> <a class="link" href="rasqal-section-query.html#rasqal-query" title="rasqal_query"><span class="type">rasqal_query</span></a> to associate the variable with
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
|
||
<td> variable type defined by enumeration rasqal_variable_type
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
||
<td> variable name
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
|
||
<td> variable <a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal"><span class="type">rasqal_literal</span></a> value (or NULL)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
||
<td> a new <a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable"><span class="type">rasqal_variable</span></a> or NULL on failure.
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2" lang="en">
|
||
<a name="rasqal-new-variable-from-variable"></a><h3>rasqal_new_variable_from_variable ()</h3>
|
||
<pre class="programlisting"><a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a>* rasqal_new_variable_from_variable (<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a> *v);</pre>
|
||
<p>
|
||
Copy Constructor - Create a new Rasqal variable from an existing one
|
||
</p>
|
||
<p>
|
||
This does a deep copy of all variable fields</p>
|
||
<p>
|
||
|
||
</p>
|
||
<div class="variablelist"><table border="0">
|
||
<col align="left" valign="top">
|
||
<tbody>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
|
||
<td> <a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable"><span class="type">rasqal_variable</span></a> to copy
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
||
<td> a new <a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable"><span class="type">rasqal_variable</span></a> or NULL on failure.
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2" lang="en">
|
||
<a name="rasqal-free-variable"></a><h3>rasqal_free_variable ()</h3>
|
||
<pre class="programlisting">void rasqal_free_variable (<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a> *v);</pre>
|
||
<p>
|
||
Destructor - Destroy a Rasqal variable object.</p>
|
||
<p>
|
||
|
||
</p>
|
||
<div class="variablelist"><table border="0">
|
||
<col align="left" valign="top">
|
||
<tbody><tr>
|
||
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
|
||
<td> <a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable"><span class="type">rasqal_variable</span></a> object
|
||
</td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2" lang="en">
|
||
<a name="rasqal-variable-print"></a><h3>rasqal_variable_print ()</h3>
|
||
<pre class="programlisting">void rasqal_variable_print (<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a> *v,
|
||
FILE *fh);</pre>
|
||
<p>
|
||
Print a Rasqal variable in a debug format.
|
||
</p>
|
||
<p>
|
||
The print debug format may change in any release.</p>
|
||
<p>
|
||
|
||
</p>
|
||
<div class="variablelist"><table border="0">
|
||
<col align="left" valign="top">
|
||
<tbody>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
|
||
<td> the <a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable"><span class="type">rasqal_variable</span></a> object
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>fh</code></em> :</span></p></td>
|
||
<td> the <span class="type">FILE</span>* handle to print to
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2" lang="en">
|
||
<a name="rasqal-variable-set-value"></a><h3>rasqal_variable_set_value ()</h3>
|
||
<pre class="programlisting">void rasqal_variable_set_value (<a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable">rasqal_variable</a> *v,
|
||
<a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal">rasqal_literal</a> *l);</pre>
|
||
<p>
|
||
Set the value of a Rasqal variable.
|
||
</p>
|
||
<p>
|
||
The variable value is an input parameter and is copied in, not shared.
|
||
If the variable value is NULL, any existing value is deleted.</p>
|
||
<p>
|
||
|
||
</p>
|
||
<div class="variablelist"><table border="0">
|
||
<col align="left" valign="top">
|
||
<tbody>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
|
||
<td> the <a class="link" href="rasqal-section-variable.html#rasqal-variable" title="rasqal_variable"><span class="type">rasqal_variable</span></a> object
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><span class="term"><em class="parameter"><code>l</code></em> :</span></p></td>
|
||
<td> the <a class="link" href="rasqal-section-literal.html#rasqal-literal" title="rasqal_literal"><span class="type">rasqal_literal</span></a> value to set (or NULL)
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2" lang="en">
|
||
<a name="rasqal-variable-type"></a><h3>enum rasqal_variable_type</h3>
|
||
<pre class="programlisting">typedef enum {
|
||
RASQAL_VARIABLE_TYPE_UNKNOWN = 0,
|
||
RASQAL_VARIABLE_TYPE_NORMAL = 1,
|
||
RASQAL_VARIABLE_TYPE_ANONYMOUS = 2
|
||
} rasqal_variable_type;
|
||
</pre>
|
||
<p>
|
||
Rasqal variable types.
|
||
</p>
|
||
<p>
|
||
ANONYMOUS can be used in queries but cannot be returned in a
|
||
result.</p>
|
||
<p>
|
||
|
||
</p>
|
||
<div class="variablelist"><table border="0">
|
||
<col align="left" valign="top">
|
||
<tbody>
|
||
<tr>
|
||
<td><p><a name="RASQAL-VARIABLE-TYPE-UNKNOWN:CAPS"></a><span class="term"><code class="literal">RASQAL_VARIABLE_TYPE_UNKNOWN</code></span></p></td>
|
||
<td> Internal.
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><a name="RASQAL-VARIABLE-TYPE-NORMAL:CAPS"></a><span class="term"><code class="literal">RASQAL_VARIABLE_TYPE_NORMAL</code></span></p></td>
|
||
<td> The regular variable type.
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><p><a name="RASQAL-VARIABLE-TYPE-ANONYMOUS:CAPS"></a><span class="term"><code class="literal">RASQAL_VARIABLE_TYPE_ANONYMOUS</code></span></p></td>
|
||
<td> Anonymous variable type.
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="footer">
|
||
<hr>
|
||
Generated by GTK-Doc V1.10</div>
|
||
</body>
|
||
</html>
|