Home » Database » DB_DataObject » Bug #7949
ability to select a schema with Generator
Details
| Request #7949 | ability to select a schema with Generator |
|---|---|
| Submitted | 2006-06-20 17:44 UTC |
| From | peter dot termaten at gmail dot com |
| Status | Suspended |
| Package | DB_DataObject |
| PHP Version | Irrelevant |
| OS | PostgreSQL |
| 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;
}