[OPEN-ILS-DEV] Proposed changes to indexing_ingest_or_delete
Mike Rylander
mrylander at gmail.com
Thu Jan 9 15:24:56 EST 2014
Liam,
First, thanks for proposing early!
Is your primary goal the ability to deal with record attributes and
conditionally pre-delete stale data? Other than that, everything is
fairly well factored out of biblio.indexing_ingest_or_delete(), so the
rest of this email will assume that ... If I'm wrong, please advise
and ignore what I say here. ;)
I think I have a monkey wrench that might foul your plans. I'll be
starting work on Multi-Value Fields and Composite Record Attributes
(see: http://blog.esilibrary.com/2013/12/23/happy-holiday-development/
) soon, and that will significantly change how record attributes are
extracted, stored, and used. But(!) since I'll be in that area
anyway, I can make sure I factor out the code for record attributes
into a separate function. Then, once the deeper internals settle a
little, we can look again at how we might refactor the surface-level
trigger code further.
More generally, I don't particularly like the idea of teaching the
trigger to use parameters and then calling the trigger function
directly; but pushing the remaining logic that the trigger implements
into a regular function, and using params to /that/ function that the
trigger supplies by reading config.internal_flag values (turning the
trigger into a shell that sets up the default params), seems like a
good way to go. Passing blah%ROWTYPE objects for NEW and OLD into a
function is easy enough, and an HSTORE of flags for "do this, don't do
that" would allow for API stability as we add more ingest-y things.
Thoughts?
On Thu, Jan 9, 2014 at 1:45 PM, Liam Whalen
<liam.whalen at bc.libraries.coop> wrote:
> I would like to modify the trigger function indexing_ingest_or_delete, but I am not certain if my planned changes are the best option.
>
> I have created a bug report and added my proposed changes as a document attached to the report. The bug report is here: https://bugs.launchpad.net/evergreen/+bug/1267566
>
> I have also attached my proposed changes to this email.
>
> Any suggestions or alternate approaches would be appreciated.
>
> Liam Whalen
> BC Libraries Cooperative - Sitka
> Systems Specialist
> 855-383-5761 x1022
> liam.whalen at bc.libraries.coop
>
>
>
>
>
>
>
--
Mike Rylander
| Director of Research and Development
| Equinox Software, Inc. / Your Library's Guide to Open Source
| phone: 1-877-OPEN-ILS (673-6457)
| email: miker at esilibrary.com
| web: http://www.esilibrary.com
More information about the Open-ils-dev
mailing list