The Relational DAS needs to examine the result set and
for every column, know which table and which column of
that table it came from.
In some circumstances it can find this information for itself,
but sometimes it cannot.
In these cases a column specifier is needed,
which is an array that identifies the columns.
Each entry in the array is simply a string in the form
table-name.column_name.
The column specifier is needed when there are duplicate
column names in the database metadata.
For example, in the database used within the examples,
all the tables have both a
id
and a
name
column.
When the Relational DAS fetches the result set from PDO
it can do so with the PDO_FETCH_ASSOC attribute,
which will cause the columns in the results set
to be labelled with the column name, but will not distinguish
duplicates.
So this will only work when there are no duplicates
possible in the results set.
To summarise, specify a column specifier array whenever there
is any uncertainty about which column could be from which table and
only omit it when every column name in the database metadata is unique.
All of the examples in the
Examples
use a column specifier.
There is one example in the
Scenarios
directory of the installation that does not:
that which works with just the employee table,
and because it works with just one table,
there can not exist duplicate column names.