Redleaf::BindingQueryResult

A result from a SPARQL query that returns a series of rows with bound variables.

Subversion Id

 $Id$

Authors

Copyright © 2008-2009, Michael Granger All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Constants

SVNRev

SVN Revision

SVNId

SVN Id

Public Instance Methods

bindings → array click to toggle source

Return an Array of the bindings (columns) that are in the rows of the result set.

   result = graph.query( 'SELECT ?s ?p ?o WHERE { ?s ?p ?o }' )
   result.bindings
   # => [ :s, :p, :o ]
static VALUE
rleaf_redleaf_bindingsqueryresult_bindings( VALUE self ) 
each( ) click to toggle source

Iterate over the result’s rows, yielding each one as a hash to the provided block.

    # File lib/redleaf/queryresult/binding.rb, line 36
36:     def each( &block ) # :yields: row
37:         return self.rows.each( &block )
38:     end
length → fixnum click to toggle source

Return the number of rows in the result.

static VALUE
rleaf_redleaf_bindingsqueryresult_length( VALUE self ) 
Also aliased as: size
rows → array click to toggle source

Return the result rows as an Array of Hashes.

static VALUE
rleaf_redleaf_bindingsqueryresult_rows( VALUE self ) 
size() click to toggle source

Alias for #length

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.