MCPcopy Create free account
hub / github.com/OSGeo/PROJ / proj_insert_object_session_destroy

Function proj_insert_object_session_destroy

src/iso19111/c_api.cpp:9449–9468  ·  view source on GitHub ↗

\brief Stops an insertion session started with * proj_insert_object_session_create() * * @param ctx PROJ context, or NULL for default context * @param session The insertion session. * @since 8.1 */

Source from the content-addressed store, hash-verified

9447 * @since 8.1
9448 */
9449void proj_insert_object_session_destroy(PJ_CONTEXT *ctx,
9450 PJ_INSERT_SESSION *session) {
9451 SANITIZE_CTX(ctx);
9452 if (session) {
9453 try {
9454 if (session->ctx != ctx) {
9455 proj_log_error(ctx, __FUNCTION__,
9456 "proj_insert_object_session_destroy() called "
9457 "with a context different from the one of "
9458 "proj_insert_object_session_create()");
9459 } else {
9460 auto dbContext = getDBcontext(ctx);
9461 dbContext->stopInsertStatementsSession();
9462 }
9463 } catch (const std::exception &e) {
9464 proj_log_error(ctx, __FUNCTION__, e.what());
9465 }
9466 delete session;
9467 }
9468}
9469
9470// ---------------------------------------------------------------------------
9471

Callers 2

TEST_FFunction · 0.85
~TempSessionHolderMethod · 0.85

Calls 4

proj_log_errorFunction · 0.85
getDBcontextFunction · 0.85
whatMethod · 0.45

Tested by 1

TEST_FFunction · 0.68