]> err.no Git - mapper/commitdiff
Add sql for other other way languages. Finalize all sql statements properly.
authorKaj-Michael Lang <milang@tal.org>
Tue, 30 Oct 2007 13:53:56 +0000 (15:53 +0200)
committerKaj-Michael Lang <milang@tal.org>
Tue, 30 Oct 2007 13:53:56 +0000 (15:53 +0200)
src/osm.c

index cb2869a610005c9948ee21dd449ede6e96274c39..9cebb34ac865769e5e195f8471360b680a6046be 100644 (file)
--- a/src/osm.c
+++ b/src/osm.c
@@ -359,11 +359,13 @@ struct sql_stmt {
        sqlite3_stmt *insert_way_data;
        sqlite3_stmt *insert_way_ref;
        sqlite3_stmt *insert_way_name;
+       sqlite3_stmt *insert_way_names_nls;
        sqlite3_stmt *insert_way_n2n;
        sqlite3_stmt *delete_way;
        sqlite3_stmt *delete_way_n2n;
        sqlite3_stmt *delete_way_seg_wsid;
        sqlite3_stmt *delete_way_name;
+       sqlite3_stmt *delete_way_names_nls;
        sqlite3_stmt *delete_way_ref;
 
        sqlite3_stmt *insert_place;
@@ -423,6 +425,18 @@ sqlite3_finalize(sql.update_node);
 sqlite3_finalize(sql.insert_place);
 sqlite3_finalize(sql.delete_place);
 
+sqlite3_finalize(sql.delete_way);
+sqlite3_finalize(sql.insert_way_data);
+
+sqlite3_finalize(sql.delete_way_name);
+sqlite3_finalize(sql.insert_way_name);
+
+sqlite3_finalize(sql.delete_way_n2n);
+sqlite3_finalize(sql.insert_way_n2n);
+
+sqlite3_finalize(sql.delete_way_names_nls);
+sqlite3_finalize(sql.insert_way_names_nls);
+
 return sqlite3_close(db)==SQLITE_OK ? TRUE : FALSE;
 }
 
@@ -456,6 +470,10 @@ sqlite3_prepare_v2(db, "delete from way_n2n where wsid=?", -1, &sql.delete_way_n
 sqlite3_prepare_v2(db, "insert or replace into way_names (wid,name) values (?, ?)",  -1, &sql.insert_way_name, NULL);
 sqlite3_prepare_v2(db, "delete from way_names", -1, &sql.delete_way_name, NULL);
 
+/* Other language names for ways */
+sqlite3_prepare_v2(db, "insert into way_names_nls (wid,lang,name) values (?, ?, ?)",  -1, &sql.insert_way_names_nls, NULL);
+sqlite3_prepare_v2(db, "delete from way_names_nls where wid=?", -1, &sql.delete_way_names_nls, NULL);
+
 /* Way ref and int_ref */
 sqlite3_prepare_v2(db, "insert or replace into way_ref (rid,ref,int_ref) values (?, ?, ?)", -1, &sql.insert_way_ref, NULL);
 sqlite3_prepare_v2(db, "delete from way_ref", -1, &sql.delete_way_ref, NULL);