You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QString getid = QString( "SELECT id(%1) FROM %2 WHERE %3" )
2416
-
.arg( quotedIdentifier( mGeometryColumn ) )
2417
-
.arg( mQuery )
2418
-
.arg( pkParamWhereClause( 1 ) );
2416
+
.arg( quotedIdentifier( mGeometryColumn ) )
2417
+
.arg( mQuery )
2418
+
.arg( pkParamWhereClause( 1 ) );
2419
2419
2420
2420
QgsDebugMsg( "getting old topogeometry id: " + getid );
2421
2421
2422
2422
result = mConnectionRO->PQprepare( "getid", getid, 1, NULL );
2423
-
if ( result.PQresultStatus() != PGRES_COMMAND_OK ) {
2424
-
QgsDebugMsg( QString("Exception thrown due to PQprepare of this query returning != PGRES_COMMAND_OK (%1 != expected %2): %3").arg(result.PQresultStatus()).arg(PGRES_COMMAND_OK).arg(getid) );
2423
+
if ( result.PQresultStatus() != PGRES_COMMAND_OK )
2424
+
{
2425
+
QgsDebugMsg( QString( "Exception thrown due to PQprepare of this query returning != PGRES_COMMAND_OK (%1 != expected %2): %3" )
result = mConnectionRW->PQprepare( "replacetopogeom", replace, 2, NULL );
2435
-
if ( result.PQresultStatus() != PGRES_COMMAND_OK ) {
2436
-
QgsDebugMsg( QString("Exception thrown due to PQprepare of this query returning != PGRES_COMMAND_OK (%1 != expected %2): %3").arg(result.PQresultStatus()).arg(PGRES_COMMAND_OK).arg(replace) );
2437
+
if ( result.PQresultStatus() != PGRES_COMMAND_OK )
2438
+
{
2439
+
QgsDebugMsg( QString( "Exception thrown due to PQprepare of this query returning != PGRES_COMMAND_OK (%1 != expected %2): %3" )
result = mConnectionRW->PQprepare( "updatefeatures", update, 2, NULL );
2453
-
if ( result.PQresultStatus() != PGRES_COMMAND_OK ) {
2454
-
QgsDebugMsg( QString("Exception thrown due to PQprepare of this query returning != PGRES_COMMAND_OK (%1 != expected %2): %3").arg(result.PQresultStatus()).arg(PGRES_COMMAND_OK).arg(update) );
2457
+
if ( result.PQresultStatus() != PGRES_COMMAND_OK )
2458
+
{
2459
+
QgsDebugMsg( QString( "Exception thrown due to PQprepare of this query returning != PGRES_COMMAND_OK (%1 != expected %2): %3" )
QString replace = QString( "DELETE FROM %1.relation WHERE "
2510
2519
"layer_id = %2 AND topogeo_id = %3" )
2511
-
.arg( quotedIdentifier(toponame) )
2520
+
.arg( quotedIdentifier(toponame) )
2512
2521
.arg( layer_id )
2513
2522
.arg( old_tg_id );
2514
2523
result = mConnectionRW->PQexec( replace );
2515
-
if ( result.PQresultStatus() != PGRES_COMMAND_OK ) {
2516
-
QgsDebugMsg( QString("Exception thrown due to PQexec of this query returning != PGRES_COMMAND_OK (%1 != expected %2): %3").arg(result.PQresultStatus()).arg(PGRES_COMMAND_OK).arg(replace) );
2524
+
if ( result.PQresultStatus() != PGRES_COMMAND_OK )
2525
+
{
2526
+
QgsDebugMsg( QString( "Exception thrown due to PQexec of this query returning != PGRES_COMMAND_OK (%1 != expected %2): %3" )
replace = QString( "UPDATE %1.relation SET topogeo_id = %2 "
2520
2531
"WHERE layer_id = %3 AND topogeo_id = %4" )
2521
-
.arg( quotedIdentifier(toponame) )
2532
+
.arg( quotedIdentifier(toponame) )
2522
2533
.arg( old_tg_id )
2523
2534
.arg( layer_id )
2524
2535
.arg( new_tg_id );
2525
2536
QgsDebugMsg( "relation swap: " + replace );
2526
2537
result = mConnectionRW->PQexec( replace );
2527
-
if ( result.PQresultStatus() != PGRES_COMMAND_OK ) {
2528
-
QgsDebugMsg( QString("Exception thrown due to PQexec of this query returning != PGRES_COMMAND_OK (%1 != expected %2): %3").arg(result.PQresultStatus()).arg(PGRES_COMMAND_OK).arg(replace) );
2538
+
if ( result.PQresultStatus() != PGRES_COMMAND_OK )
2539
+
{
2540
+
QgsDebugMsg( QString( "Exception thrown due to PQexec of this query returning != PGRES_COMMAND_OK (%1 != expected %2): %3" )
0 commit comments