gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] gmDemographicRecord.py re-re-factored


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] gmDemographicRecord.py re-re-factored
Date: Mon, 20 Dec 2004 20:23:38 +0100
User-agent: Mutt/1.3.22.1i

>       _cmd_fetch_payload = "select *, xmin from org where id=%s"
                                                  ^^^

>       _cmds_lock_rows_for_update = ["select 1 from v_org where id=%(id)s and 
> xmin=%(xmin)s"]
>       _cmds_store_payload = ["update org set description=%(description)s, 
> id_category=(select id from org_category where description=%(occupation)s) 
> where id=%(id)s"]
>       _updateable_fields = ["description", "occupation"]
                                              ^^^^^^^^^^

Table "org" does not have a field "occupation" so that should
not be in updateable_fields. If it did I am not sure I
understand the reasoning.

>               <b>[1]</b> But beware, language extension packs are entitled to 
> add backend triggers to check for validity of external IDs.
A very nice idea indeed ! Let's agree on that such
trigger/check constraint functions are to be prepended with
"i18n_" (behind the tr_ for trigger and trf_ for trigger
function respectively) such that they can be detected
reliably. Eg. trf_i18n_must_be_SSN() called by trigger
tr_i18n_must_be_SSN.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]