The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Redland RDF Application Framework - Perl RDF::Redland::Query Class</title>
</head>
<body>

<h1 style="text-align:center">Redland RDF Application Framework - Perl RDF::Redland::Query Class</h1>


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<!--

<ul>

        <li><a href="#name">NAME</a></li>
        <li><a href="#synopsis">SYNOPSIS</a></li>
        <li><a href="#description">DESCRIPTION</a></li>
        <li><a href="#constructors">CONSTRUCTORS</a></li>
        <li><a href="#methods">METHODS</a></li>
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
</ul>

--></div>
<!-- INDEX END -->

<h2><a name="name">NAME</a></h2>
<p>RDF::Redland::Query - Redland RDF Syntax Query Class</p>

<h2><a name="synopsis">SYNOPSIS</a></h2>
<pre>
  use RDF::Redland;
</pre>
<pre>
  ...
  my $query=new RDF::Redland::Query($query_string); # default query language
  my $results=$query-&gt;execute($model);
  # or my $results=$model-&gt;query_execute($query);
  while(!$results-&gt;finished) {
    for (my $i=0; $i &lt; $results-&gt;bindings_count(); $i++) {
      my $name=$results-&gt;binding_name($i);
      my $value=$results-&gt;binding_value($i);
      # ... do something with the results
    }
    $results-&gt;next_result;
  }
</pre>

<h2><a name="description">DESCRIPTION</a></h2>
<p>This class represents queries of various syntaxes over an RDF::Redland::Model returning a sequence of results that (currently) bind variable names to RDF::Redland::Node values.</p>

<h2><a name="constructors">CONSTRUCTORS</a></h2>
<dl>
<dt><strong><a name="new_query_string_base_uri_query_lang_uri_query_lang" class="item">new QUERY-STRING [BASE-URI [QUERY-LANG-URI [QUERY-LANG]]]</a></strong></dt>
<dd>
<p>Create a new RDF::Redland::Query object for a query string <em>QUERY-STRING</em> with optional base URI <em>BASE-URI</em> IN QUERY language <em>QUERY-LANG</em> or query language URI <em>QUERY-LANG-URI</em> (both can be undef). If <em>QUERY-LANG-URI</em> is omitted, the current directory is used as the base URI. If <em>QUERY-LANG-NAME</em> is undef, the default query language "rdql" is used. If <em>BASE-URI</em> is omitted, no base URI is used.</p>
</dd>
</dl>

<h2><a name="methods">METHODS</a></h2>
<dl>
<dt><strong><a name="execute" class="item">execute MODEL</a></strong></dt>
<dd>
<p>Run the query against model <em>MODEL</em> returning a RDF::Redland::QueryResults object or undef on failure.</p>
</dd>
</dl>

<h2><a name="see_also">SEE ALSO</a></h2>
<p><a href="QueryResults.html">the RDF::Redland::QueryResults manpage</a></p>

<h2><a name="author">AUTHOR</a></h2>
<p>Dave Beckett - <a href="http://www.dajobe.org/">http://www.dajobe.org/</a></p>
<hr />

<p>(C) Copyright 2000-2011 <a href="http://www.dajobe.org/">Dave Beckett</a>, (C) Copyright 2000-2005 <a href="http://www.bristol.ac.uk/">University of Bristol</a></p>

</body>
</html>