db_and_tools/render.rb
#   inline exapanded queries despite giving the optimiser a better look
#   at the data, don't appear to run any faster
#
#   def query_rdf_objects( predicate, subject )
#     map_query( @conn, "select object from _rdf where predicate = $$#{predicate}$$ and subject = $$#{ subject }$$", nil) do |row|
#       row['object']
#     end
#   end
#
#   def query_rdf_subjects( predicate, object )
#     map_query( @conn, "select subject from _rdf where predicate = $$#{predicate}$$ and object = $$#{object}$$", nil) do |row|
#       row['subject']
#     end
#   end
inline exapanded queries despite giving the optimiser a better look
at the data, don't appear to run any faster




inline exapanded queries despite giving the optimiser a better look at the data don ' t appear to run any faster
def query_rdf_objects( predicate, subject )
    map_query( @conn, %{
      select object from _rdf_m where predicate = $1 and subject = $2
      }, [predicate, subject]) do |row|
      row['object'].encode(:xml => :text)
    end
  end
def query_rdf_objects ( predicate , subject ) map_query ( @conn , %{
      select object from _rdf_m where predicate = $1 and subject = $2
      } , [ predicate , subject ] ) do | row | row [ 'object' ] . encode ( :xml => :text ) end end
inline exapanded queries despite giving the optimiser a better look
at the data, don't appear to run any faster
inline exapanded queries despite giving the optimiser a better look at the data don ' t appear to run any faster
predicate
subject