Project

General

Profile

« Previous | Next » 

Revision 2398

sql_gen.py: Added ColValueCond

View differences:

lib/sql_gen.py
116 116

  
117 117
##### Conditions
118 118

  
119
class ColValueCond(Code):
120
    def __init__(self, col, value):
121
        value = as_ValueCond(value)
122
        
123
        self.col = col
124
        self.value = value
125
    
126
    def to_str(self, db): return self.value.to_str(db, self.col)
127

  
128
##### Condition column comparisons
129

  
119 130
class ValueCond(objects.BasicObject):
120 131
    def __init__(self, value):
121 132
        if not isinstance(value, Code): value = Literal(value)

Also available in: Unified diff