PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject » Bug #7949

ability to select a schema with Generator

Details

Request #7949ability to select a schema with Generator
Submitted2006-06-20 17:44 UTC
Frompeter dot termaten at gmail dot com
StatusSuspended
PackageDB_DataObject
PHP VersionIrrelevant
OSPostgreSQL
Roadmaps(Not assigned)

Comments

[2006-06-20 17:44 UTC] peter dot termaten at gmail dot com

Description:
------------
Hi,

Using the Generator when building classes from PostgreSQL I figured it would be handy to generate only tables from a particular schema.
This could be achieved in a similar way as selected particular tables, by adding a Configuration option like : 'include_schema_regex'.

'exclude_schema_regex' could add an exclusion of a schema

See code sammple below

Test script:
---------------
Adding the following to Generator.php, method _createTableList
directly after the logic for stripping the schema part from the table name would do the trick:

if (isset($options['include_schema_regex'] ) && !preg_match($options['include_schema_regex'],$bits[0])) {
continue;
}