Пример #1
0
def clear_country_table():
    with db.get_fire_db_connection() as conn:
        with conn.cursor() as cur:
            cur.execute('DELETE FROM countries')
Пример #2
0
def fill_country_table(country_shp_file):
    with db.get_fire_db_connection() as conn:
        with conn.cursor() as cur:
            for county in traverse_countries(country_shp_file):
                insert_country(cur, county)