Skip to content
Permalink
Browse files

[GRASS] vector import begin/commit transaction

  • Loading branch information
blazek committed Jun 22, 2015
1 parent 5e22129 commit 19fdb3389b8cb7936719bbd541644832aa57b1d0
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/providers/grass/qgis.v.in.cpp
@@ -178,6 +178,13 @@ int main( int argc, char **argv )
G_fatal_error( "Cannot create table: %s", e.what() );
}

if ( db_grant_on_table( driver, fieldInfo->table, DB_PRIV_SELECT, DB_GROUP | DB_PUBLIC ) != DB_OK )
{
// TODO: fatal?
//G_fatal_error(("Unable to grant privileges on table <%s>"), fieldInfo->table);
}
db_begin_transaction( driver );

QgsFeature feature;
struct line_cats *cats = Vect_new_cats_struct();

@@ -271,6 +278,8 @@ int main( int argc, char **argv )
}
featureCount++;
}
db_commit_transaction( driver );
db_close_database_shutdown_driver( driver );

if ( isPolygon )
{
@@ -393,7 +402,6 @@ int main( int argc, char **argv )
}
}

db_close_database_shutdown_driver( driver );
Vect_build( finalMap );
Vect_close( finalMap );

0 comments on commit 19fdb33

Please sign in to comment.
You can’t perform that action at this time.