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

Class PQLTextParIR

source code

object --+    
         |    
    PQLPar --+
             |
            PQLTextParIR

a PQL string parameter matching "google-like", "Information Retrieval".

Basically, this matches the input and the database column as document vectors. Correspondingly, ranges are disallowed.

Nested Classes
  rangeClass
a stand-in for PQLRange when no ranges are to be supported

Inherited from PQLPar: valParser

Instance Methods
 
getSQL(self, colName, sqlPars)
returns an SQL condition expressing this PQL constraint for colName.
source code
 
covers(self, value)
returns true if value is within the ranges specified by the PQL expression.
source code

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

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

Class Methods

Inherited from PQLPar: fromLiteral

Static Methods

Inherited from PQLPar: stepParser

Class Variables
  nullvalue = ''
hash(x)
Properties

Inherited from object: __class__

Method Details

getSQL(self, colName, sqlPars)

source code 

returns an SQL condition expressing this PQL constraint for colName.

The parameters necessary are added to sqlPars.

cmpExpr can be used to override the cmpExpr argument to PQLRange.getSQL; this is not really intended for user code, though, but rather for subclasses of PQLPar

Overrides: PQLPar.getSQL
(inherited documentation)

covers(self, value)

source code 

returns true if value is within the ranges specified by the PQL expression.

value must be type-true, i.e., you are responsible for converting it into the type the range are in.

Overrides: PQLPar.covers
(inherited documentation)