docs: def match(self, origin=None, rel=None, target=None, attrs=None, include_ids=False):
          '''
          Retrieve an iterator of relationship IDs that match a pattern of components
  
          origin - (optional) origin of the relationship (similar to an RDF subject). If omitted any origin will be matched.
          rel - (optional) type IRI of the relationship (similar to an RDF predicate). If omitted any relationship will be matched.
          target - (optional) target of the relationship (similar to an RDF object), a boolean, floating point or unicode object. If omitted any target will be matched.
          attrs - (optional) attribute mapping of relationship metadata, i.e. {attrname1: attrval1, attrname2: attrval2}. If any attribute is specified, an exact match is made (i.e. the attribute name and value must match).
          include_ids - If true include statement IDs with yield values
          '''
          #FIXME: Implement include_ids
          cur = self._conn.cursor()
          conditions = ""
          and_placeholder = ""
          tables = "relationship"
          params = []
          if origin:
              conditions += "relationship.origin = %s"
              params.append(origin)
              and_placeholder = " AND "
          if target:
              conditions += and_placeholder + "relationship.target = %s"
              params.append(target)
              and_placeholder = " AND "
          if rel:
              conditions += and_placeholder + "relationship.rel = %s"
              params.append(rel)
              and_placeholder = " AND "
          if attrs:
              tables = "relationship, attribute"
              for a_name, a_val in attrs.items():
                  conditions += and_placeholder + "EXISTS (SELECT 1 from attribute AS subattr WHERE subattr.rawid = relationship.rawid AND subattr.name = %s AND subattr.value = %s)"
                  params.extend((a_name, a_val))
                  and_placeholder = " AND "
          #querystr = "SELECT relationship.rawid, relationship.origin, relationship.rel, relationship.target, attribute.name, attribute.value FROM {0} WHERE {1} ORDER BY relationship.rawid;".format(tables, conditions)
          #SELECT relationship.rawid, attribute.rawid, relationship.origin, relationship.rel, relationship.target, attribute.name, attribute.value FROM relationship FULL JOIN attribute ON relationship.rawid = attribute.rawid WHERE relationship.origin = 'http://uche.ogbuji.net' AND EXISTS (SELECT 1 from attribute AS subattr WHERE subattr.rawid = relationship.rawid AND subattr.name = '@context' AND subattr.value = 'http://uche.ogbuji.net#_metadata') AND EXISTS (SELECT 1 from attribute AS subattr WHERE subattr.rawid = relationship.rawid AND subattr.name = '@lang' AND subattr.value = 'ig') ORDER BY relationship.rawid;
          querystr = "SELECT relationship.rawid, relationship.origin, relationship.rel, relationship.target, attribute.name, attribute.value FROM relationship FULL JOIN attribute ON relationship.rawid = attribute.rawid WHERE {1} ORDER BY relationship.rawid;".format(tables, conditions)
          #self._logger.debug(x.format(url))
          self._logger.debug(cur.mogrify(querystr, params))
          cur.execute(querystr, params)
          #Use groupby to batch up the returning statements acording to rawid then rol up the attributes
          #return ( (s, p, o, dict([(n,v) for n,v in xxx])) for s, p, o in yyy)
          #cur.fetchone()
          #cur.close()
          return self._process_db_rows_iter(cur)