ADL_query_translator modules/paradigms/Identification_Integer.py

modules / paradigms / Identification_Integer.py 


 SYNOPSIS

     Identification_Integer (table, idColumn, matchColumn, namespaces,
         cardinality)

         table
             A table to query, e.g., "holding".

         idColumn
             The table's internal identifier column (i.e., the column
             to be selected), e.g., "holding_id".

         matchColumn
             The table's external identifier column (i.e., the column
             against which the constraint is to be placed), e.g.,
             "fips_state_code".

         namespaces
             A list of zero or more namespaces that the external
             identifiers are members of, e.g., ["FIPS 5-2 numeric"].

         cardinality
             A Cardinality object representing the cardinality of
             'table' with respect to 'matchColumn'.

 DESCRIPTION

     Translates an identification constraint to an SQL integer
     equality test, e.g.,

         SELECT idColumn FROM table
             WHERE matchColumn = id

     where 'id' is the identifier mentioned in the constraint.  If
     the constraint identifier is not an integer, or if the namespace
     mentioned in the constraint is not one of the supported
     namespaces, the query

         SELECT idColumn FROM table
             WHERE 1 = 0

     is returned.

     Exceptions thrown:

         none

 AUTHOR

     Greg Janee
     gjanee@alexandria.ucsb.edu

 HISTORY

     $Log: Identification_Integer.py,v $
     Revision 1.1  2003/04/16 18:32:10  valentin
     updated to latest translator code

     Revision 1.1  2003/02/05 06:17:38  gjanee
     Initial revision

Imported Modules   

import UniversalTranslator
import edu.ucsb.adl.middleware
import types

Classes   

Identification_Integer


This document was automatically generated Thu Mar 4 12:45:30 2004 by HappyDoc version WORKING