nette/database 3.2.1: immutable datetime & reflection

- David Grudl
- Nette Core | 8285
I have just released Nette Database v3.2.1, which allows you to set date
columns to be returned as immutable objects. Specifically, instead of
Nette\Utils\DateTime, it uses the new
Nette\Database\DateTime, which inherits from
DateTimeImmutable.
You can set this in the configuration:
database:
options:
newDateTime: true
This behavior will be the default starting from version 4.0.
I have also added (experimental) support for database reflection similar to that in Dibi:
$reflection = $connection->getReflection();
foreach ($reflection->tables as $table) {
echo $table->name;
echo 'columns:';
foreach ($table->columns as $column) {
echo $column->name;
}
}
The experimental aspect is that properties are used instead of methods. https://github.com/…e/Reflection