Skip to content

Commit edb8dc8

Browse files
authored
Helpers::dumpSql: Fixed bool format for PgSql
1 parent 23617a8 commit edb8dc8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Database/Helpers.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ public static function dumpSql(SqlLiteral $query, ?Explorer $explorer = null): s
142142
return '<i' . (isset($info['uri']) ? ' title="' . htmlspecialchars($info['uri'], ENT_NOQUOTES, 'UTF-8') . '"' : null)
143143
. '>&lt;' . htmlspecialchars($type, ENT_NOQUOTES, 'UTF-8') . ' resource&gt;</i> ';
144144

145-
} elseif (is_bool($param)) {
145+
} elseif (is_bool($param)) {
146+
if($connection->getDriver() instanceof Nette\Database\Drivers\PgSqlDriver) {
147+
return $param ? 'true' : 'false';
148+
}
146149
return (string) (int) $param;
147150

148151
} else {

0 commit comments

Comments
 (0)