Skip to content

Commit

Permalink
MySqlDriver: fixed integer detection
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 30, 2023
1 parent 4a21417 commit e359656
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Database/Drivers/MySqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ public function getColumnTypes(\PDOStatement $statement): array
$types[$meta['name']] = $type = Nette\Database\Helpers::detectType($meta['native_type']);
if ($type === Nette\Database\IStructure::FIELD_TIME) {
$types[$meta['name']] = Nette\Database\IStructure::FIELD_TIME_INTERVAL;
} elseif ($type === Nette\Database\IStructure::FIELD_FLOAT && $meta['precision'] === 0) {
$types[$meta['name']] = Nette\Database\IStructure::FIELD_INTEGER;
}
}
}
Expand Down

0 comments on commit e359656

Please sign in to comment.