From 6a482daca4738ad55b7a165395f43aba612e1303 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Tue, 4 Aug 2026 17:49:23 +0000 Subject: [PATCH] Add SIGHTING_CONTROLS table, document, etc. --- db/schemas/codes/indexes/Makefile | 1 + .../codes/indexes/create/sighting_controls.m4 | 58 +++ .../codes/indexes/drop/sighting_controls.m4 | 32 ++ db/schemas/codes/tables/Makefile | 3 +- .../codes/tables/create/sighting_controls.m4 | 101 +++++ doc/src/code_tables.m4 | 14 + doc/src/epilog.inc.m4 | 22 ++ doc/src/functions.m4 | 14 + doc/src/functions/sighting_controls.m4 | 359 ++++++++++++++++++ include/global_constants.m4 | 8 + 10 files changed, 611 insertions(+), 1 deletion(-) create mode 100644 db/schemas/codes/indexes/create/sighting_controls.m4 create mode 100644 db/schemas/codes/indexes/drop/sighting_controls.m4 create mode 100644 db/schemas/codes/tables/create/sighting_controls.m4 create mode 100644 doc/src/functions/sighting_controls.m4 diff --git a/db/schemas/codes/indexes/Makefile b/db/schemas/codes/indexes/Makefile index af7114a..a8de2e4 100644 --- a/db/schemas/codes/indexes/Makefile +++ b/db/schemas/codes/indexes/Makefile @@ -29,6 +29,7 @@ ORDER := arrival_sources \ obs_periods \ people \ role_codes \ + sighting_controls \ sighting_records ## diff --git a/db/schemas/codes/indexes/create/sighting_controls.m4 b/db/schemas/codes/indexes/create/sighting_controls.m4 new file mode 100644 index 0000000..ce97d88 --- /dev/null +++ b/db/schemas/codes/indexes/create/sighting_controls.m4 @@ -0,0 +1,58 @@ +dnl Copyright (C) 2026 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`indexmacros.m4')dnl + +-- The table is probably small enough that indexes are less than +-- useless. Oh well. + +CREATE INDEX IF NOT EXISTS + sighting_controls_source ON sighting_controls + (source); + +CREATE INDEX IF NOT EXISTS + sighting_controls_sightingrecord ON sighting_controls + (sightingrecord) + WHERE sightingrecord IS NOT NULL; +CREATE INDEX IF NOT EXISTS + sighting_controls_wtype ON sighting_controls + (wtype) + WHERE wtype IS NOT NULL; +CREATE INDEX IF NOT EXISTS + sighting_controls_behavior ON sighting_controls + (behavior) + WHERE behavior IS NOT NULL; +CREATE INDEX IF NOT EXISTS + sighting_controls_certainty ON sighting_controls + (certainty) + WHERE certainty IS NOT NULL; +CREATE INDEX IF NOT EXISTS + sighting_controls_role ON sighting_controls + (role) + WHERE role IS NOT NULL; +CREATE INDEX IF NOT EXISTS + sighting_controls_startsource ON sighting_controls + (startsource) + WHERE startsource IS NOT NULL; +CREATE INDEX IF NOT EXISTS + sighting_controls_endsource ON sighting_controls + (endsource) + WHERE endsource IS NOT NULL; diff --git a/db/schemas/codes/indexes/drop/sighting_controls.m4 b/db/schemas/codes/indexes/drop/sighting_controls.m4 new file mode 100644 index 0000000..2b9a39a --- /dev/null +++ b/db/schemas/codes/indexes/drop/sighting_controls.m4 @@ -0,0 +1,32 @@ +dnl Copyright (C) 2026 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`indexmacros.m4')dnl + +DROP INDEX IF EXISTS sighting_controls_source; + +DROP INDEX IF EXISTS sighting_controls_sightingrecord; +DROP INDEX IF EXISTS sighting_controls_wtype; +DROP INDEX IF EXISTS sighting_controls_behavior; +DROP INDEX IF EXISTS sighting_controls_certainty; +DROP INDEX IF EXISTS sighting_controls_role; +DROP INDEX IF EXISTS sighting_controls_startsource; +DROP INDEX IF EXISTS sighting_controls_endsource; diff --git a/db/schemas/codes/tables/Makefile b/db/schemas/codes/tables/Makefile index 38cb86f..302eb39 100644 --- a/db/schemas/codes/tables/Makefile +++ b/db/schemas/codes/tables/Makefile @@ -46,7 +46,8 @@ ORDER := agg_severities \ role_codes \ sighting_records \ species \ - studies + studies \ + sighting_controls ## ## CAUTION: This Makefile is not designed to be run directly. It is normally diff --git a/db/schemas/codes/tables/create/sighting_controls.m4 b/db/schemas/codes/tables/create/sighting_controls.m4 new file mode 100644 index 0000000..65e654e --- /dev/null +++ b/db/schemas/codes/tables/create/sighting_controls.m4 @@ -0,0 +1,101 @@ +dnl Copyright (C) 2025 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`tablemacros.m4')dnl +include(`grants.m4')dnl +dnl + +CREATE TABLE sighting_controls ( + step INTEGER NOT NULL + positive_check(`Step') + ,source TEXT NOT NULL + CHECK (source IN ('sdb_comm_membs_sc' + , 'sdb_non_brec_sighting_sources_sc' + , 'sdb_roles_sc' + , 'sdb_swelling_sources_sc')) + ,sightingrecord TEXT -- For sdb_non_brec_sighting_sources_sc + REFERENCES sighting_records -- and sdb_swelling_sources_sc + -- There's not enough room to include the actual constants in the + -- constraint name. + CONSTRAINT "SightingRecord must be NULL unless Source uses SIGHTING_RECORDS" + CHECK (source = 'sdb_non_brec_sighting_sources_sc' + OR source = 'sdb_swelling_sources_sc' + OR sightingrecord IS NULL) + ,wtype TEXT -- For sdb_roles_sc + CONSTRAINT "WType must be NULL unless Source is sdb_roles_sc" + CHECK (source = 'sdb_roles_sc' + OR wtype IS NULL) + -- Mimic WATCHES.Type + CONSTRAINT "SIGHTING_CONTROLS.WType must be one of: sdb_arec, sdb_brec, sdb_location, sdb_other_watch" + CHECK (wtype IS NULL + OR wtype = 'sdb_arec' + OR wtype = 'sdb_brec' + OR wtype = 'sdb_location' + OR wtype = 'sdb_other_watch') + ,behavior TEXT -- For sdb_roles_sc + CONSTRAINT "Behavior must be NULL unless Source is sdb_roles_sc" + CHECK (source = 'sdb_roles_sc' + OR behavior IS NULL) + -- Mimic EVENTS.Behavior + CONSTRAINT "Behavior must be one of the allowed special values" + CHECK (behavior IS NULL + OR behavior IN ('sdb_aggression' + , 'sdb_arrival' + , 'sdb_arrival_a' + , 'sdb_colobus' + , 'sdb_food' + , 'sdb_utm' + , 'sdb_grooming' + , 'sdb_groom_scan' + , 'sdb_groom_scan_a' + , 'sdb_paper' + , 'sdb_mating_event' + , 'sdb_pg_event')) + ,certainty TEXT -- For sdb_roles_sc + REFERENCES certainties + CONSTRAINT "Certainty must be NULL unless Source is sdb_roles_sc" + CHECK (source = 'sdb_roles_sc' + OR certainty IS NULL) + ,role TEXT -- For sdb_roles_sc + REFERENCES role_codes + CONSTRAINT "Role must be NULL unless Source is sdb_roles_sc" + CHECK (source = 'sdb_roles_sc' + OR role IS NULL) + ,startsource TEXT + REFERENCES comm_membs_sources -- For sdb_comm_membs_sc + CONSTRAINT "StartSource must be NULL unless Source is sdb_comm_membs_sc" + CHECK (source = 'sdb_comm_membs_sc' + OR startsource IS NULL) + ,endsource TEXT + REFERENCES comm_membs_sources -- for sdb_comm_membs_sc + CONSTRAINT "EndSource must be NULL unless Source is sdb_comm_membs_sc" + CHECK (source = 'sdb_comm_membs_sc' + OR endsource IS NULL) + ,notes TEXT NOT NULL + notonlyspaces_check(`Notes') +); + +grant_priv(`SIGHTING_CONTROLS') + +-- The Step column is the primary key, but we don't want a sequence +-- to go with the primary key so need to make the key primary as +-- a separate step. +ALTER TABLE sighting_controls ADD PRIMARY KEY (step); diff --git a/doc/src/code_tables.m4 b/doc/src/code_tables.m4 index f596422..5882730 100644 --- a/doc/src/code_tables.m4 +++ b/doc/src/code_tables.m4 @@ -1284,6 +1284,20 @@ Description |ROLE_CODES.Description_summary| |emptytext| |notnull| +.. _SIGHTING_CONTROLS_stub: + +SIGHTING_CONTROLS +----------------- + +This table is not really a code table, but it is in the ``codes`` +schema so a dsection in the documentation exists here. + +Each row records a step in the process of searching through the +SokweDB tables to discover the places an individual was sighted. +For further information see the |SIGHTING_CONTROLS| documentation. + + + .. _SIGHTING_RECORDS: SIGHTING_RECORDS diff --git a/doc/src/epilog.inc.m4 b/doc/src/epilog.inc.m4 index 7fa2a55..e6542df 100644 --- a/doc/src/epilog.inc.m4 +++ b/doc/src/epilog.inc.m4 @@ -793,6 +793,28 @@ elo_ranks_daily_rst(sdb_male, MT)dnl .. |ROLE_CODES.Role| replace:: :ref:`Role ` +.. |SIGHTING_CONTROLS| replace:: :ref:`SIGHTING_CONTROLS ` +.. |SIGHTING_CONTROLS.Step| replace:: + :ref:`Step ` +.. |SIGHTING_CONTROLS.Source| replace:: + :ref:`Source ` +.. |SIGHTING_CONTROLS.SightingRecord| replace:: + :ref:`SightingRecord ` +.. |SIGHTING_CONTROLS.WType| replace:: + :ref:`WType ` +.. |SIGHTING_CONTROLS.Behavior| replace:: + :ref:`Behavior ` +.. |SIGHTING_CONTROLS.Certainty| replace:: + :ref:`Certainty ` +.. |SIGHTING_CONTROLS.Role| replace:: + :ref:`Role ` +.. |SIGHTING_CONTROLS.StartSource| replace:: + :ref:`StartSource ` +.. |SIGHTING_CONTROLS.EndSource| replace:: + :ref:`EndSource ` +.. |SIGHTING_CONTROLS.Notes| replace:: + :ref:`Notes ` + .. |SIGHTING_RECORDS| replace:: :ref:`SIGHTING_RECORDS ` .. |SIGHTING_RECORDS.Code| replace:: :ref:`Code ` diff --git a/doc/src/functions.m4 b/doc/src/functions.m4 index e3b6add..9a6ac12 100644 --- a/doc/src/functions.m4 +++ b/doc/src/functions.m4 @@ -38,3 +38,17 @@ users. functions/build_swelling_states.rst functions/julian.rst functions/julian_to.rst + + +.. _control_tables: + +Control Tables +============== + +The tables documented here exist to control and guide function behavior. +They are located in |the codes schema|. + +.. toctree:: + :maxdepth: 1 + + functions/sighting_controls.rst diff --git a/doc/src/functions/sighting_controls.m4 b/doc/src/functions/sighting_controls.m4 new file mode 100644 index 0000000..119fbaa --- /dev/null +++ b/doc/src/functions/sighting_controls.m4 @@ -0,0 +1,359 @@ +.. Copyright (C) 2026 The Meme Factory, Inc. www.karlpinc.com + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +.. M4 setup +include(constants.m4)dnl +include(macros.m4)dnl +sdb_rst_quotes(`on')dnl +sdb_generated_rst()dnl + +.. _SIGHTING_CONTROLS: + +SIGHTING_CONTROLS +----------------- + +.. |SIGHTING_CONTROLS_summary| replace:: + Each row records a step in the process of searching through the + SokweDB tables to discover the places an individual was sighted. + +|SIGHTING_CONTROLS_summary| +The content of the table controls what tables the +|function_build_sightings| function examines to determine whether an +individual was sighted, and the order in which the tables are +examined. + +Each row of SIGHTING_CONTROLS has a |SIGHTING_CONTROLS.Step| and +|SIGHTING_CONTROLS.Source| value. +The |SIGHTING_CONTROLS.Step| value determines the order in which the +SokweDB tables are searched. +The |SIGHTING_CONTROLS.Source| value determines which table(s) are +searched. +The SIGHTING_CONTROLS row's other columns control which rows are +examined when searching. + +.. caution:: + + The rows in SIGHTING_CONTROLS are referenced, by + |SIGHTING_CONTROLS.Step| value, in the |SIGHTINGS| table. + This connects the sighting of an individual, in |SIGHTINGS|, to the + tables that record the individual's sighting. + + If SIGHTING_CONTROLS content is changed, then |SIGHTINGS| rows will + no longer be connected to accurate information. + There are no guard rails in place to prevent this from happening. + + The recommended practice is to change SIGHTING_CONTROLS only when + the |SIGHTINGS| table is empty. + +The SIGHTING_CONTROLS table contains many columns that correspond with +the columns of SokweDB's tables. +|SIGHTING_CONTROLS.WType| corresponds with the database's |WATCHES|.\ +|WATCHES.Type| column, |SIGHTING_CONTROLS.Behavior| corresponds with +the database's |EVENTS|.\ |EVENTS.Behavior| column, +|SIGHTING_CONTROLS.StartSource| corresponds with the database's +|COMM_MEMBS|.\ |COMM_MEMBS.StartSource| column, etc. +When one of these SIGHTING_CONTROLS columns contains a value, the +corresponding in-database column must contain that same value in order +for the individual to be recorded in |SIGHTINGS|. +When |SIGHTING_CONTROLS.WType| is ``sdb_aggression``, the value of the +|EVENTS|.\ |EVENTS.Behavior| column must also be ``sdb_aggression``. +And so forth. +When one of these SIGHTING_CONTROLS rows is |null|, the corresponding +in-database column may contain any value whatsoever. +So, |null| values in one of these SIGHTING_CONTROLS columns mean that +the value of the in-database column does not effect the creation of +a |SIGHTINGS| row. + +Which tables and which rows of these tables are examined to determine +whether an individual is sighted is therefore under the control of the +person(s) responsible for maintaining SIGHTING_CONTROLS. +Tables to examine can be added, omitted, or examined multiple times +using different criteria each time. + +The categories of database content available for searching is +controlled by the |SIGHTING_CONTROLS.Source| column. +The available values are: + +``sdb_comm_membs_sc`` + + The |COMM_MEMBS| table is searched. + + The SIGHTING_CONTROLS columns used to control the search are: + + * |SIGHTING_CONTROLS.StartSource| + * |SIGHTING_CONTROLS.EndSource| + +``sdb_non_brec_sighting_sources_sc`` + + The |NON_BREC_SIGHTING_SOURCES| table is searched. + + The SIGHTING_CONTROLS column used to control the search is: + + * |SIGHTING_CONTROLS.SightingRecord| + +``sdb_roles_sc`` + + The |WATCHES|, |EVENTS|, and |ROLES| tables are searched. + + The SIGHTING_CONTROLS columns used to control the search are: + + * |SIGHTING_CONTROLS.WType| + * |SIGHTING_CONTROLS.Behavior| + * |SIGHTING_CONTROLS.Certainty| + * |SIGHTING_CONTROLS.Role| + +``sdb_swelling_sources_sc`` + + The |SWELLING_SOURCES| table is searched. + + The SIGHTING_CONTROLS column used to control the search is: + + * |SIGHTING_CONTROLS.SightingRecord| + + +A minimum, sensible, SIGHTING_CONTROLS table might look like (all +omitted columns are |null|):: + + step | source | certainty + ------+---------------------------+----------- + 1 | sdb_roles_sc | sdb_identity_certain + 2 | sdb_swelling_sources_sc | + 3 | sdb_non_brec_sighting_sources_sc | + 4 | sdb_comm_membs_sc | + +The above SIGHTING_CONTROLS content looks for individuals everywhere +possible, but excludes all recorded events that are not certain. +It excludes all |EVENTS| rows but those with an |EVENTS|.\ +|EVENTS.Certainty| value of ``sdb_identity_certain``. + +Notice that ``sdb_comm_membs_sc`` is last. +This makes sense because searching is done in |SIGHTING_CONTROLS.Step| +order. +If ``sdb_comm_membs_sc`` was first it would almost always be where the +presence of every individual is discovered, because |COMM_MEMBS| +reports individuals present over vast swaths of time. +This would result in |SIGHTINGS|.\ |SIGHTINGS.Step| values that reveal +very little detail in the way of when individuals were sighted. + +On the other hand, putting ``sdb_comm_membs_sc`` first does place the +|COMM_MEMBS|.\ |COMM_MEMBS.CommID| value in the |SIGHTINGS|.\ +|SIGHTINGS.CommID| column. +If |COMM_MEMBS|.\ |COMM_MEMBS.CommID| is more accurate than the +community data stored elsewhere in the system this could be of +benefit. + +A SIGHTING_CONTROLS table that provides detail on exactly which +behavior the sighted individual was involved with is (all +omitted columns are |null|):: + + step | source | behavior | certainty + ------+---------------------------+----------+----------- + 1 | sdb_roles_sc | sdb_pg_event | sdb_identity_certain + 2 | sdb_roles_sc | sdb_aggression | sdb_identity_certain + 3 | sdb_roles_sc | sdb_mating_event | sdb_identity_certain + 4 | sdb_roles_sc | sdb_grooming | sdb_identity_certain + 5 | sdb_roles_sc | sdb_groom_scan | sdb_identity_certain + 6 | sdb_roles_sc | sdb_groom_scan_a | sdb_identity_certain + 7 | sdb_roles_sc | sdb_food | sdb_identity_certain + 8 | sdb_roles_sc | sdb_utm | sdb_identity_certain + 9 | sdb_roles_sc | sdb_paper | sdb_identity_certain + 10 | sdb_roles_sc | sdb_arrival | sdb_identity_certain + 11 | sdb_roles_sc | sdb_arrival_a | sdb_identity_certain + 12 | sdb_roles_sc | sdb_colobus | sdb_identity_certain + 13 | sdb_swelling_sources_sc | | + 14 | sdb_non_brec_sighting_sources_sc | | + 15 | sdb_comm_membs_sc | | + +Again, the |SIGHTING_CONTROLS.Step| value is significant. +Lower numbers have a higher priority when it comes to what is recorded +in |SIGHTINGS|.\ |SIGHTINGS.Step|. +Given the example values above, if an individual is observed both +pantgrunting and mating the reported |SIGHTINGS|.\ |SIGHTINGS.Step| +value will be that of the pantgrunt. + +Even more detail is possible. +For example, a |SIGHTING_CONTROLS.Source| of ``sdb_roles_sc``, with a +|SIGHTING_CONTROLS.Behavior| of ``sdb_aggression``, and a +|SIGHTING_CONTROLS.Certainty| of ``sdb_identity_certain``, and, +finally, a |SIGHTING_CONTROLS.Role| of ``sdb_actor`` singles out the +aggressor in aggression events. + + +.. contents:: + :depth: 2 + + +.. _SIGHTING_CONTROLS.Step: + +Step +```` + +.. |SIGHTING_CONTROLS.Step_summary| replace:: + A unique positive integer which serves both to identify the row and + to prioritize the searching of a selected portion of SokweDB. + +|SIGHTING_CONTROLS.Step_summary| |notnull| + + +.. _SIGHTING_CONTROLS.Source: + +Source +`````` + +.. |SIGHTING_CONTROLS.Source_summary| replace:: + A code designating which broad category of database content is + searched. + +|SIGHTING_CONTROLS.Source_summary| + +One of the values: + +* ``sdb_comm_membs_sc`` -- + The |COMM_MEMBS| table is searched. + +* ``sdb_non_brec_sighting_sources_sc`` -- + The |NON_BREC_SIGHTING_SOURCES| table is searched. + +* ``sdb_roles_sc`` -- + The |WATCHES|, |EVENTS|, and |ROLES| tables are searched. + +* ``sdb_swelling_sources_sc`` -- + The |SWELLING_SOURCES| table is searched. + +|notnull| + + +.. _SIGHTING_CONTROLS.SightingRecord: + +SightingRecord +`````````````` + +.. |SIGHTING_CONTROLS.SightingRecord_summary| replace:: + A |SIGHTING_RECORDS|.\ |SIGHTING_RECORDS.Code| value that must + match for the search to succeed. + +|SIGHTING_CONTROLS.SightingRecord_summary| +Depending on the |SIGHTING_CONTROLS.Source|, it is either the codes +found in the |SWELLING_SOURCES|.\ |SWELLING_SOURCES.Source| column or +the |NON_BREC_SIGHTING_SOURCES|.\ |NON_BREC_SIGHTING_SOURCES.Source| +column that must match. + +When this column is |null| then every |SIGHTING_RECORDS|.\ +|SIGHTING_RECORDS.Code| value matches. + + +.. _SIGHTING_CONTROLS.WType: + +WType (Watches TYPE) +```````````````````` + +.. |SIGHTING_CONTROLS.WType_summary| replace:: + A |WATCHES|.\ |WATCHES.Type| value that must match for the search + to succeed. + +|SIGHTING_CONTROLS.WType_summary| +When this column is |null| then every |WATCHES|.\ |WATCHES.Type| value +matches. + + +.. _SIGHTING_CONTROLS.Behavior: + +Behavior +```````` + +.. |SIGHTING_CONTROLS.Behavior_summary| replace:: + A |EVENTS|.\ |EVENTS.Behavior| value that must match for the search + to succeed. + +|SIGHTING_CONTROLS.Behavior_summary| +When this column is |null| then every |EVENTS|.\ |EVENTS.Behavior| +value matches. + +The following behavior values are not associated with chimpanzees and +may not be used in this column: + +* ``sdb_brec_note`` -- + B-Record note + +* ``sdb_other_species`` -- + Other species + +.. _SIGHTING_CONTROLS.Certainty: + +Certainty +````````` + +.. |SIGHTING_CONTROLS.Certainty_summary| replace:: + A |EVENTS|.\ |EVENTS.Certainty| value that must match for the search + to succeed. + +|SIGHTING_CONTROLS.Certainty_summary| +When this column is |null| then every |EVENTS|.\ |EVENTS.Certainty| +value matches. + + +.. _SIGHTING_CONTROLS.Role: + +Role +```` + +.. |SIGHTING_CONTROLS.Role_summary| replace:: + A |ROLES|.\ |ROLES.Role| value that must match for the search + to succeed. + +|SIGHTING_CONTROLS.Role_summary| +When this column is |null| then every |ROLES|.\ |ROLES.Role| value +matches. + + +.. _SIGHTING_CONTROLS.StartSource: + +StartSource +``````````` + +.. |SIGHTING_CONTROLS.StartSource_summary| replace:: + A |COMM_MEMBS|.\ |COMM_MEMBS.StartSource| value that must match for + the search to succeed. + +|SIGHTING_CONTROLS.StartSource_summary| +When this column is |null| then every |COMM_MEMBS|.\ +|COMM_MEMBS.StartSource| value matches. + + +.. _SIGHTING_CONTROLS.EndSource: + +EndSource +``````````` + +.. |SIGHTING_CONTROLS.EndSource_summary| replace:: + A |COMM_MEMBS|.\ |COMM_MEMBS.EndSource| value that must match for + the search to succeed. + +|SIGHTING_CONTROLS.EndSource_summary| +When this column is |null| then every |COMM_MEMBS|.\ +|COMM_MEMBS.EndSource| value matches. + + +.. _SIGHTING_CONTROLS.Notes: + +Notes +````` + +.. |SIGHTING_CONTROLS.Notes_summary| replace:: + Free form textual notes on the SIGHTINGS_CONTROL row. + +|SIGHTING_CONTROLS.Notes_summary| +|notonlyspaces| +|notnull| diff --git a/include/global_constants.m4 b/include/global_constants.m4 index d1699b8..d619315 100644 --- a/include/global_constants.m4 +++ b/include/global_constants.m4 @@ -179,6 +179,14 @@ dnl Special code value for directed dyadic interactions where the dnl direction is not known. define(`sdb_unkpair', `UNKPair') +dnl +dnl SIGHTING_CONTROLS +dnl +define(`sdb_comm_membs_sc', `COMM_MEMBS') +define(`sdb_non_brec_sighting_sources_sc', `NON_BREC_SIGHTING_SOURCES') +define(`sdb_roles_sc', `ROLES') +define(`sdb_swelling_sources_sc', `SWELLING_SOURCES') + dnl dnl SIGHTING_RECORDS dnl -- 2.34.1