Package gavo :: Package svcs :: Module pql :: Class PQLDatePar
[frames] | no frames]

Class PQLDatePar

source code

object --+    
         |    
    PQLPar --+
             |
            PQLDatePar

a PQL parameter containing a date.

steps in ranges are allowed.

There's an additional complication here: in the database, dates can be represented in various forms. To save the day, getSQL takes an additional optional parameter and transfroms the input values as appropriate before passing them to the database.

Nested Classes

Inherited from PQLPar: rangeClass

Instance Methods
 
getSQL(self, colName, sqlPars, convert=None)
returns an SQL condition expressing the PQL constraint for colName.
source code

Inherited from PQLPar: __eq__, __init__, __repr__, __str__, covers, getValuesAsSet

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods

Inherited from PQLPar: fromLiteral

Static Methods
 
valParser(literal)
str(object='') -> string
source code
 
stepParser(val) source code
Class Variables
  nullvalue = ''
hash(x)
Properties

Inherited from object: __class__

Method Details

valParser(literal)
Static Method

source code 

str(object='') -> string

Return a nice string representation of the object. If the argument is a string, the return value is the same object.

Overrides: valParser
(inherited documentation)

stepParser(val)
Static Method

source code 
Overrides: PQLPar.stepParser

getSQL(self, colName, sqlPars, convert=None)

source code 

returns an SQL condition expressing the PQL constraint for colName.

In addition to the usual parameters, we here accept an additonal argument convert with possible values None (meaning timestamp, which is the default) mjd, jd, and jy, which represents how the datetimes are represented in the database.

Overrides: PQLPar.getSQL