Example #1
0
def diff_table(tbl_name, db1, db2):
    indexes = utils.indexed_column_sets(db1, tbl_name)
    if not indexes is None:
        return __diff_on_index(indexes[0], tbl_name, db1, db2)
    return None
Example #2
0
 def test_indexed_column_sets2(self):
     self.db.cursor().execute("create table options (id int UNIQUE, date text, trans text, symbol text, qty real, price real, uuid text UNIQUE, PRIMARY KEY (symbol, trans) );")
     self.db.cursor().execute("CREATE INDEX option_qty ON options (qty);")
     self.db.cursor().execute("CREATE INDEX option_date ON options (date);")
     self.db.cursor().execute("CREATE INDEX option_uuid ON options (uuid);")
     self.assertEqual(utils.indexed_column_sets(self.db, 'options'), [(u'symbol', u'trans'), (u'id',), (u'uuid',)])