Record::$info - jcobban/Genealogy GitHub Wiki

static Record::$info

Up: class Record

This protected static attribute contains an associative array which is re-defined in each derived class to contain the description of the table as it is used by the class Record. The contents of this attribute for each derived class are returned by $record->getInfo() and the contents for any table can be obtained by Record::getInformation($tableName). The main reason this is required is because there is no common method for obtaining database schema information that works for all server implementations.

name contents
'table' SQL internal table name used in SQL commands. For example 'tblIR'.
'name' The external name of the table to be shown to users. For example 'Persons'.
'prime' The primary key name(s) for the table. The key name is in lower case so it will match the field name in the query response. It is an array of field names if it requires more than one field to identify an individual record in the table.
'srvmg' true if the setting of the primary key is managed by the database server for new records, and false if it is managed by the application. In particular this is true if the primary key is a MySQL auto-increment field.
'fldcount' Not currently used. This is a number which is greater than or equal to the number of fields in the primary key, and less than or equal to the number of fields in the record.
'order' Default value of the ORDER BY clause for SELECT operations on this table by classes that extend class RecordSet. This is usually obtained from the $classname::$defaultOrder member of the associated class. If that is not defined then this is the same as 'prime'. This may be an empty string, in which case no ORDER BY clause is included in SELECT operations.
'classname' Name of the class that implements the interface to this table. This does not include the namespace qualifier. For example it contains 'Birth', not 'Genealogy\Birth'.
'initrow' Default initial row. This associative array provides information on field names, default values, and types of the fields in the table. This is usually obtained from the $classname::$initRow member of the associated class. If the table name does not have an access class defined in Record::$primeKey, or that class does not define $initRow, then the very first record is read from the table to be used as the initial row.

Next: static Record::$initRow