示例#1
0
    def __init__(self, nodes, query_context):
        query_context.checked_graphs += 1
        self._nodes = [(node_var.name, [IndexNodeId.from_int(nid) for nid in node_ids])
                       for node_var, node_ids in nodes.iteritems()
                       if not node_var.is_set]

        self._size = product((len(ids) for var, ids in self._nodes), 1)
        self._items = None
示例#2
0
    def __init__(self, nodes, query_context):
        query_context.checked_graphs += 1
        self._nodes = [(node_var.name, [IndexNodeId.from_int(nid) for nid in node_ids])
                       for node_var, node_ids in nodes.iteritems()
                       if not node_var.is_set]

        self._size = product((len(ids) for var, ids in self._nodes), 1)
        self._items = None
示例#3
0
 def _nodeids(self, query_result):
     for node_var in query_result:
         query_result[node_var] = IndexNodeId.from_int(
             query_result[node_var])
     return query_result
示例#4
0
 def _nodeids(self, query_result):
     for node_var in query_result:
         query_result[node_var] = IndexNodeId.from_int(query_result[node_var])
     return query_result
示例#5
0
 def get_index_node_id(self, xml_node_id):
     """Returns the index node id associated with the `xml_node_id` from the TIGER-XML file."""
     result = self._cursor.execute(
         "SELECT id FROM node_data WHERE xml_node_id = ?",
         (xml_node_id, )).fetchone()
     return IndexNodeId.from_int(result[0])
示例#6
0
 def get_index_node_id(self, xml_node_id):
     """Returns the index node id associated with the `xml_node_id` from the TIGER-XML file."""
     result = self._cursor.execute("SELECT id FROM node_data WHERE xml_node_id = ?", 
                                   (xml_node_id,)).fetchone()
     return IndexNodeId.from_int(result[0])