summaryrefslogtreecommitdiff
path: root/test/it_dbi.t
diff options
context:
space:
mode:
authorDavid Flatz2018-08-13 11:52:28 +0200
committerDavid Flatz2018-08-13 11:52:28 +0200
commit3db4daffff1cbb6d2262a1caa873569b0d0a315a (patch)
tree5bfffb3835c98104736494c4e3d8c05a3af2ec1e /test/it_dbi.t
parentf8aabe317e7a7997594bc124aa17fd4d6442dfd1 (diff)
downloaditools-3db4daffff1cbb6d2262a1caa873569b0d0a315a.tar.gz
itools-3db4daffff1cbb6d2262a1caa873569b0d0a315a.tar.bz2
itools-3db4daffff1cbb6d2262a1caa873569b0d0a315a.zip
disable dyncols in WHERE when we have multiple tables because we can't trust _fields anymore and columns might be prefixed with tablename
Diffstat (limited to 'test/it_dbi.t')
-rwxr-xr-xtest/it_dbi.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/it_dbi.t b/test/it_dbi.t
index 89df3b8..4e22152 100755
--- a/test/it_dbi.t
+++ b/test/it_dbi.t
@@ -360,6 +360,10 @@ is($r->key1, "a"); is($r->key2, null);
$r->iterate();
is($r->key1, null); is($r->key2, "b");
+# don't do dyncols stuff in where when we select form multiple tables (column names are unknown then)
+is($r->_where(['FROM' => 'it_dbi_test AS a, it_dbi_test AS b', '-a.ID' => 'b.ID']), 'WHERE a.ID = b.ID', "don't do JSON_EXTRACT when we have multiple tables in FROM");
+is($r->_where(['JOIN' => 'it_dbi_test AS b', '-a.ID' => 'b.ID']), 'WHERE a.ID = b.ID', "don't do JSON_EXTRACT when we JOIN");
+
#
# Test tracked update
#