.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "RDF::Redland::Query 3pm" .TH RDF::Redland::Query 3pm 2024-03-17 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME RDF::Redland::Query \- Redland RDF Syntax Query Class .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use RDF::Redland; \& \& ... \& my $query=new RDF::Redland::Query($query_string); # default query language \& my $results=$query\->execute($model); \& # or my $results=$model\->query_execute($query); \& while(!$results\->finished) { \& for (my $i=0; $i < $results\->bindings_count(); $i++) { \& my $name=$results\->binding_name($i); \& my $value=$results\->binding_value($i); \& # ... do something with the results \& } \& $results\->next_result; \& } .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" 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. .SH CONSTRUCTORS .IX Header "CONSTRUCTORS" .IP "new QUERY-STRING [BASE\-URI [QUERY\-LANG\-URI [QUERY\-LANG]]]" 4 .IX Item "new QUERY-STRING [BASE-URI [QUERY-LANG-URI [QUERY-LANG]]]" Create a new RDF::Redland::Query object for a query string \fIQUERY-STRING\fR with optional base URI \fIBASE-URI\fR IN QUERY language \fIQUERY-LANG\fR or query language URI \fIQUERY-LANG-URI\fR (both can be undef). If \fIQUERY-LANG-URI\fR is omitted, the current directory is used as the base URI. If \fIQUERY-LANG-NAME\fR is undef, the default query language "rdql" is used. If \fIBASE-URI\fR is omitted, no base URI is used. .SH METHODS .IX Header "METHODS" .IP "execute MODEL" 4 .IX Item "execute MODEL" Run the query against model \fIMODEL\fR returning a RDF::Redland::QueryResults object or undef on failure. .SH "SEE ALSO" .IX Header "SEE ALSO" RDF::Redland::QueryResults .SH AUTHOR .IX Header "AUTHOR" Dave Beckett \- http://www.dajobe.org/