如何将 Propel ORM 与 Informix 数据库连接


How to connect Propel ORM with a Informix database

我需要将Informix数据库与Propel ORM一起使用,但我找不到任何方法。

我只找到PDO连接如下:

$bd = new PDO("informix:host=host.domain.com; service=9800;
    database=my_db; server=ids_server; protocol=onsoctcp;
    EnableScrollableCursors=1", "my_user", "my_pass");
我使用 Propel

1.6.7(使用 Phing),用于在 Propel 上进行连接的数组是:

return array (
            'datasources' => 
            array (
                'datasource' => 
                array (
                    'adapter' => 'informix', //'mysql','postgres'
                    'connection' => 
                    array (
                        'dsn' => 'informix:host=host.domain.com;service=9800;database=my_db;'
                        'user' => 'user',
                        'password' => 'password',
                    ),
                ),
                'default' => 'datasource',
            ),
            'generator_version' => '1.6.7',
            'classmap' => include('dir/to/classmap-conf.php')
        );

如果有必要,我可以使用 Propel 1.7 或 Propel 2.0,任何可以与 Informix 连接的内容(可能需要使用 PDO 库)。

根据 Propel 文档,唯一支持的数据库是:

  • MS SQL Server
  • MySQL
  • 神谕
  • PostgreSQL
  • SQLite