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 + ";"
def __init__(self): OClass.__init__(self, "spi")
def __init__(self): OClass.__init__(self, "io") self.pin_id = 1
def __init__(self): OClass.__init__(self, "io") self.pin_id = 1 self.ss = None self.sc = None