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 'DROP DATABASE IF EXISTS test;' -U postgres
- psql -c 'create database test;' -U postgres - psql -c 'create database test;' -U postgres
- mysql -e 'create database IF NOT EXISTS test;' - mysql -e 'create database IF NOT EXISTS test;'
- mysql -v -uroot test < ./tests/sql/mysql.sql - mysql -v -uroot test < ./test/sql/mysql.sql
- psql test postgres -f ./tests/sql/pgsql.sql - psql test postgres -f ./test/sql/pgsql.sql
script: gulp script: gulp

View File

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