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"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<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>


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

<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>
-->
<!-- INDEX END -->

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

<h2><a name="synopsis" id="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" id="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" id="constructors">CONSTRUCTORS</a></h2>
<dl>
<dt><strong><a name="item_new_query_2dstring__5bbase_2duri__5bquery_2dlang_2" id="item_new_query_2dstring__5bbase_2duri__5bquery_2dlang_2">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" id="methods">METHODS</a></h2>
<dl>
<dt><strong><a name="item_execute" id="item_execute">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" id="see_also">SEE ALSO</a></h2>
<p><a href="QueryResults.html">the RDF::Redland::QueryResults manpage</a></p>

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

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

</body>
</html>