def create_hidden_table(db, table):
    loctable = '_%s_loc_' % table
    try:
        db.execute('select count(*) from %s' % loctable).fetchone()[0]
        return loctable
    except:
        try:


            # create if it doesn't exist
            q = """create table %s (
                 id int references %s(id),
                 latitude float null,
                 longitude float null,
                 address text null,
                 city varchar(128) null,
                 state varchar(128) null,
                 country varchar(128) null,
                 query text null,
                 description text null,
                 zoom float null,
                 shape polygon null        
            )""" % (loctable, table)
            db.execute(q, bexit=False)

            q = 'create index %s_id on %s (id);' % (loctable, loctable)
            db.execute(q, bexit=False)
            return loctable
        except:
            traceback.print_exc()
            return None
dataset/ETHPy150Open sirrice/dbtruck/dbtruck/analyze/hidden.py/create_hidden_table/original