Project

General

Profile

« Previous | Next » 

Revision 2400

sql_gen.py: Added as_Value()

View differences:

sql_gen.py
32 32
    
33 33
    def to_str(self, db): return db.esc_value(self.value)
34 34

  
35
def as_Value(value):
36
    if isinstance(value, Code): return value
37
    else: return Literal(value)
38

  
35 39
def is_null(value): return isinstance(value, Literal) and value.value == None
36 40

  
37 41
##### Tables

Also available in: Unified diff