]> git.evergreen-ils.org Git - Evergreen.git/commit
Rewrote the implementation of the open-ils.qstore.columns method.
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Jun 2010 21:39:12 +0000 (21:39 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Jun 2010 21:39:12 +0000 (21:39 +0000)
commit0700a02bb61ef4c07fa02d5f99667527aa8a2770
tree1e7349547894bbed73a5d6b4fddcb6e7fee3ca49
parenta2207d3e33d6caa8ac42030b8e0ccc18ce4adfda
Rewrote the implementation of the open-ils.qstore.columns method.

The old implementation examined the SELECT clause(s) as encoded
in the query.select_item and query.expression tables.  The new
implementation performs a dummy query, and then returns the
field names from the database result.

Advantages of the new implementation:

1. It doesn't get confused by wild cards in the SELECT clause.

2. It provides a field name for every column, including those
which are function calls, subqueries, or other expressions.
(Of course these names may not be very revealing, such as
"?column?".)

Disadvantages:

1. The resulting field names are not qualified by table name.

2. Additional overhead due to the additional database call.

M    Open-ILS/src/c-apps/oils_storedq.c

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16641 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/c-apps/oils_storedq.c