dev-master
9999999-devLibrary provide functional to split data from entity to different property by bit mask.
MIT
The Requires
- php >=7.0
- doctrine/orm ~2.4.0|~2.5.0
The Development Requires
by Konstantin Kuklin
database doctrine bit mask
Library provide functional to split data from entity to different property by bit mask.
Doctrine Compressed Fields is a library which is allow to store data from different Entity properties in one column by using bits mask., (*1)
DO NOT USE IN PRODUCTION! Developing still in progress., (*3)
Sometimes we need to store simple boolean value like true or false and we use for it tinyint(1)
which cost is 1 byte(bits)., (*4)
So we lose 7 bits
on every such value if a column! Just imagine we lose 7k bits(700b = 0.68kb) on each 1k rows with 1 bool
element stored in tinyint(1)
.
Here you can find the solution, how to store data without losing memory and hdd free space., (*5)
Execute in console:, (*6)
composer require konstantinkuklin/doctrine-compressed-fields
To run the tests, you need the sqlite extension for php. On Unix-like systems, install:, (*7)
php5-sqlite
, (*8)
On Windows, enable the extension by uncommenting the following lines in php.ini, (*9)
extension = php_pdo_sqlite.dll extension = php_sqlite3.dll extension_dir = ext
Running the tests from the project root:, (*10)
./vendor/bin/phpunit
On Windows run phpunit from the full path, (*11)
phpunit
Library provide functional to split data from entity to different property by bit mask.
MIT
database doctrine bit mask