Project

General

Profile

« Previous | Next » 

Revision 28793

Added by Dominika Tkaczyk almost 10 years ago

Madis update

View differences:

vtbase.py
21 21
        return func(*args, **kw)
22 22
    return wrapper
23 23

  
24
class VT():
24
class VT(object):
25 25
    def parse(self,*args):
26 26
        return args
27 27
    def full_parse(self,args,boolargs=None,nonstringargs=None,needsescape=None, notsplit=None):
......
33 33
    def destroy(self):
34 34
        pass
35 35

  
36
class VTGenerator:
36
class VTGenerator(object):
37 37
    def __init__(self,fobj): ####parse auto argument and throw!!!!
38 38
        self.tableObjs=dict()
39 39
        self.fobj=fobj
......
75 75
            return self.Create( db, modulename, dbname, tablename,*args)
76 76
        return self.tableObjs[tablename]
77 77

  
78
class LTable: ####Init means setschema and execstatus
78
class LTable(object): ####Init means setschema and execstatus
79 79
    @echocall
80 80
    def __init__(self, tblist, envars, tableObj , iterFunc ,openedIter=None): # tablename, auto , cursorfunc, ommit tuple OPTIONAL []
81 81
        self.tblist=tblist
......
90 90
        try:
91 91
            return self.tableObj.BestIndex(*args)
92 92
        except AttributeError:
93
            if functions.SQLITEAFTER3717:
93
            if functions.SQLITEAFTER380:
94 94
                return (None, 0, None, False, 1e99)
95 95
            else:
96 96
                return (None, 0, None, False, 1000)
......
134 134
            self.tableObj.destroy()
135 135

  
136 136
# Represents a cursor
137
class Cursor: ##### Needs Cursor Function , Iterator instance, tablename ...... if has close
138
    __slots__ = ("Next", "Close", "Column", "Rowid", "Eof", "pos", "row", "table", "eof", "iterNext", "iter")
137
class Cursor(object): ##### Needs Cursor Function , Iterator instance, tablename ...... if has close
138
    __slots__ = ("Column", "Next", "Eof", "Rowid", "iterNext", "pos", "row", "eof", "envars", "firsttime", "openIter", "iterFunc")
139 139

  
140 140
    @echocall
141
    def __init__(self, iterFunc, openIter,envars):
142
        self.envars=envars
141
    def __init__(self, iterFunc, openIter, envars):
142
        self.envars = envars
143 143
        self.firsttime = True
144 144
        self.openIter=openIter
145 145
        self.iterNext = self.openIter.next
......
183 183
    def Next(self):
184 184
        try:
185 185
            self.row=self.iterNext()
186
            self.Column=self.row.__getitem__
186 187
#            self.pos+=1
187 188
        except StopIteration:
188 189
            self.row=[]

Also available in: Unified diff