View Issue Details

IDProjectCategoryView StatusLast Update
37PHPOF2Defaultpublic18 Sep 2008 16:44
Reportermrosenquist Assigned Totimj  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Target Version0.10.1Fixed in Version0.10.1 
Summary37: Implement simple way to statically define table schema
DescriptionIt would be nice to have a simple way of statically defining the schema for tables which do not change regularly.
TagsNo tags attached.

Activities

timj

9 Mar 2008 22:27

manager   ~29

You can actually sort of already do this, by overloading the following properties in a PHPOF2_DBTable object:

- fields_lob
- fields_normal
- pri_keys
- fgn_keys
- key_auto_increment

and you would also have to fill the corresponding *_list properties.
In the new version internally I have refactored discoverSchema() so that the calls to load the (heavy) MDB2 modules "Reverse" and "Manager" are made in discoverSchema (as that is the only place they are used) and the code to create the *_list properties has moved to a helper (_createSchemaCachedLists()) so that you can just overload discoverSchema(), set the basic properties as above then call _createSchemaCachedLists(). You will not only have saved the discovery time but also saved loading the Manager and Reverse modules at all.

Issue History

Date Modified Username Field Change
9 Mar 2008 22:12 timj New Issue
9 Mar 2008 22:12 timj Reporter timj => mrosenquist
9 Mar 2008 22:12 timj Assigned To => timj
9 Mar 2008 22:12 timj Status new => assigned
9 Mar 2008 22:12 timj Projection none => tweak
9 Mar 2008 22:12 timj Target Version => 0.10.1
9 Mar 2008 22:27 timj Note Added: 0000029
28 Aug 2008 20:32 timj Status assigned => resolved
28 Aug 2008 20:32 timj Fixed in Version => 0.10.1
28 Aug 2008 20:32 timj Resolution open => fixed
18 Sep 2008 16:44 timj Status resolved => closed