keboola / php-datatypes
PHP datatypes for databases
9.0.0
2026-01-04 18:56 UTC
Requires
- php: ^8.2
Requires (Dev)
This package is auto-updated.
Last update: 2026-06-22 13:44:45 UTC
README
Introduction
This library is used for datatype definitions, validation and sql statement generation. Each type (Mysql, Redshift, Snowflake, GenericStorage) also provides a base type mapping that can be used to map types between different storage providers.
Base Types
There are currently 7 base types: String, Date, Timestamp, Integer, Numeric, Float, and Boolean.
Any type class that extends Keboola\Datatype\Definition\Common should provide a mapping for it's types to the above set.
This will allow us to map data-types between storage providers.
Build
git clone https://github.com/keboola/php-datatypes
cd php-datatypes
docker compose build
docker compose run --rm dev composer install
Tests Execution
Run tests with following command.
docker compose run --rm dev ./vendor/bin/phpunit
Coding Style
docker compose run --rm dev ./vendor/bin/phpcs --standard=psr2 --ignore=vendor -n .
License
MIT licensed, see LICENSE file.