Commit 8729416b authored by Anze Vavpetic's avatar Anze Vavpetic

Merge branch 'propo-domain-mapping' into dev

e commit.
parents 10d5fbd2 ffb4430a
......@@ -31,7 +31,7 @@ illegal_predicates = [
'source_file', 'source_location', 'source_mode', 'stream', 'stream_position', 'stream_position_data', 'stream_property', 'stream_select', \
'style_check', 'syntax_errors', 'system', 'system_predicate', 'tableInfo', 'tell', 'telling', 'term_position', 'thread_at_exit', \
'thread_create', 'thread_detach', 'thread_exit', 'thread_join', 'thread_self', 'thread_setconcurrency', 'thread_sleep', 'throw', 'time_file', \
'ttyget', 'ttyget0', 'ttyput', 'ttyskip', 'ttytab', 'unhide', 'unix', 'var', 'variable_names', 'variables', 'version', 'view', 'with_output_to', \
'ttyget', 'ttyget0', 'ttyput', 'ttyskip', 'ttytab', 'unhide', 'unix', 'var', 'variable_names', 'variables', 'view', 'with_output_to', \
'write', 'write_canonical', 'write_depth', 'write_many_as', 'write_term', 'writeln', 'writeq', 'yap_flag'
]
......@@ -40,7 +40,7 @@ allowed_mysql_predicates = [
'db_import',
'db_open',
]
default_timeout = 1200 * 60
default_timeout = 120000 * 60
class SafePopen(threading.Thread):
'''
......
......@@ -33,7 +33,7 @@ class TreeLiker:
self._copy_data()
self._batch()
p = Popen(['java', '-Xmx1G', '-cp', 'bin/TreeLiker.jar',
p = Popen(['java', '-Xmx3G', '-cp', 'bin/TreeLiker.jar',
'ida.ilp.treeLiker.TreeLikerMain', '-batch', self.batch],
cwd=self.tmpdir)
stdout_str, stderr_str = p.communicate()
......
......@@ -141,9 +141,11 @@ class DBContext:
'''
con = self.connection.connect()
cursor = con.cursor()
print "SELECT %s FROM %s" % (self.fmt_cols(cols), table)
cursor.execute("SELECT %s FROM %s" % (self.fmt_cols(cols), table))
result = [cols for cols in cursor]
con.close()
return [cols for cols in cursor]
return result
def rows(self, table, cols):
'''
......@@ -164,16 +166,18 @@ class DBContext:
if self.orng_tables:
data = []
for ex in self.orng_tables[table]:
if ex[str(pk_att)] == pk:
if str(ex[str(pk_att)]) == str(pk):
data.append([ex[str(col)] for col in cols])
return data
else:
con = self.connection.connect()
cursor = con.cursor()
attributes = self.db.fmt_cols(cols)
print "SELECT %s FROM %s WHERE `%s`='%s'" % (attributes, table, pk_att, pk)
cursor.execute("SELECT %s FROM %s WHERE `%s`='%s'" % (attributes, table, pk_att, pk))
result = [cols for cols in cursor]
con.close()
return [cols for cols in cursor]
return results
def fetch_types(self, table, cols):
'''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment