Project

General

Profile

« Previous | Next » 

Revision 2348

sql_gen.py: Use db.esc_name() instead of sql.esc_name(db, ...) so passed-in db can be a mock object

View differences:

lib/sql_gen.py
35 35
        self.name = name
36 36
        self.schema = schema
37 37
    
38
    def to_str(self, db): return sql.qual_name(db, self.schema, self.name)
38
    def to_str(self, db):
39
        str_ = ''
40
        if self.schema != None: str_ += db.esc_name(self.schema)+'.'
41
        str_ += db.esc_name(self.name)
42
        return str_
39 43
    
40 44
    def to_Table(self): return self
41 45

  
......
75 79
    def to_str(self, db):
76 80
        str_ = ''
77 81
        if self.table != None: str_ += self.table.to_str(db)+'.'
78
        str_ += sql.esc_name(db, self.name)
82
        str_ += db.esc_name(self.name)
79 83
        return str_
80 84
    
81 85
    def to_Col(self): return self

Also available in: Unified diff