def main(args): print('Star Spider...') db = BaseTable() db.connect() row = BaseTable(code='001', name='jeck') db.add(row) for row in db.get_all(): print(row['code'], row['name'])
def main(args): print('Star Spider...') db = Test() db.connect() row = BaseTable(code='001', name='jeck') db.add(row) row = BaseTable(code='002', name='frank') db.add(row) rst = db.query(code='001', name='jeck') rst.name = 'new name' db.update(rst) row = BaseTable(code='003', name='black') db.add(row) db.delete(rst) for row in db.get_all(): print(row.id, row.code, row.name, row.createtime, row.modifytime)
def main(args): print('Star Spider...') db = BaseTable() db.connect() row = BaseTable(code='001', name='jeck') db.add(row) row = BaseTable(code='002', name='frank') db.add(row) for row in db.get_all(): print(row.id, row.code, row.name, row.createtime, row.modifytime)
def main(args): print('Star Spider...') db = BaseTable() db.connect() row = BaseTable(code='001', name='jeck') db.add(row) row = BaseTable(code='002', name='frank') db.add(row) rst = db.session.query(BaseTable).filter(BaseTable.id == 2).first() rst.name = 'new name' rst.save() for row in db.get_all(): print(row.id, row.code, row.name, row.createtime, row.modifytime)
def main(args): print('Star Spider...') db = BaseTable() db.connect() row = BaseTable(code='')
def main(args): print('Star Spider...') db = BaseTable()
def main(args): print('Star Spider...') db = BaseTable() db.connect() row = BaseTable(code='001', name='jeck') db.add(row)