Update travis build and simplify a nested if statement

This commit is contained in:
Timothy Warren 2015-12-04 09:13:26 -05:00
parent 6b0be21782
commit f84bbaa477
2 changed files with 8 additions and 11 deletions

View File

@ -14,8 +14,8 @@ before_script:
- psql -c 'DROP DATABASE IF EXISTS test;' -U postgres
- psql -c 'create database test;' -U postgres
- mysql -e 'create database IF NOT EXISTS test;'
- mysql -v -uroot test < ./tests/sql/mysql.sql
- psql test postgres -f ./tests/sql/pgsql.sql
- mysql -v -uroot test < ./test/sql/mysql.sql
- psql test postgres -f ./test/sql/pgsql.sql
script: gulp

View File

@ -202,18 +202,15 @@ module.exports = class QueryParser {
// Remove the value from the combined list
// and replace it with a placeholder
if (combIndex !== -1)
if (combIndex !== -1 && funcIndex === -1)
{
// Make sure to skip functions when replacing values
if (funcIndex === -1)
{
parts.combined[combIndex] = '?';
parts.combined[combIndex] = '?';
if ( ! inOutputArray)
{
outputValues.push(value);
inOutputArray = true;
}
if ( ! inOutputArray)
{
outputValues.push(value);
inOutputArray = true;
}
}
}