Beispiel #1
0
    def __init__(self, name, fields):
        OClass.__init__(self, name, {PUBLIC})
        self.implements = ["Query"]

        self.dbargs = []
        for fld, dtype in fields:
            dbArg = JDbAttr(fld, dtype)
            self << dbArg
            self.dbargs.append(dbArg)

        s = ", ".join([a.name+" "+a.dbtpe for a in self.dbargs])
        self.CREATE = "CREATE TABLE "+self.name+" ("+s+")"
        self.INSERT = "INSERT INTO " + self.name + " VALUES("
        self.SELECT = "SELECT * FROM " + self.name + ";"
Beispiel #2
0
 def __init__(self):
     OClass.__init__(self, "spi")
Beispiel #3
0
 def __init__(self):
     OClass.__init__(self, "io")
     self.pin_id = 1
Beispiel #4
0
 def __init__(self):
     OClass.__init__(self, "io")
     self.pin_id = 1
     self.ss = None
     self.sc = None