Skip to content

Instantly share code, notes, and snippets.

@splee
splee / gist:4677465
Last active December 11, 2015 23:29 — forked from lithix-src/gist:4677404
select count(*)
into @exists
from information_schema.tables
where table_schema = 'dbs_admin'
and table_name = 'dbs_auto_increment';
set @qry = select if(@exists<0,
'rename table publisher.dbs_auto_increment to dbs_admin.dbs_auto_increment',
'select \'table exists\' status') as querystr;
# In-memory Cassandra-ish thingy... useful for unit tests. Maybe useful for other
# stuff too? No support for SuperColumns, but that should be easy enough to add.
import bisect
import copy
from cassandra.ttypes import NotFoundException, Column, ColumnPath, ColumnOrSuperColumn
class SSTable(object):