microtec/cakephp-firebird-utility

CakePHP 3 Driver for Firebird Database

1.0.31 2019-08-01 12:11 UTC

README

Currently provides data reading, inserting, deleting and updating.

This plugin is inspired by mbamarante/cakephp-firebird-driver.

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require microtec/cakephp-firebird-utility

Requirements

  • CakePHP 3.2+
  • an Firebird PHP extension

Datasource configuration

Here is an example datasource configuration:

'myfbconnection' => [
    'className' => 'Cake\Database\Connection',
    'driver' => 'CakephpFirebird\Driver\Firebird',
    'host' => '127.0.0.1',
    'port' => '3050',
    'username' => 'sysdba',
    'password' => 'masterkey',
    'database' => '/path-to-database/database.fdb',
    'role'     => false
    ]

Firebird 3 - Boolean datatype

Requirements

  • Firebird >= 3
  • Php >= 7.3

Usage

Put this code in you config/bootstrap.php :

Type::map('boolean', '\CakephpFirebird\Type\BooleanType');

Known Issues

  • disable multiple records insert in the same query (e.g.: fixtures)
  • disable auto increment fields on table creation
  • review data types
  • improve unit tests
  • unimplemented add and dropContraints, enable and disableForeignFeySQL

Workaround

  • use cake bake lowercase table name