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

Function proj_insert_object_session_create

src/iso19111/c_api.cpp:9426–9438  ·  view source on GitHub ↗

\brief Starts a session for proj_get_insert_statements() * * Starts a new session for one or several calls to * proj_get_insert_statements(). * * An insertion session guarantees that the inserted objects will not create * conflicting intermediate objects. * * The session must be stopped with proj_insert_object_session_destroy(). * * Only one session may be active at a time for a given co

Source from the content-addressed store, hash-verified

9424 * @since 8.1
9425 */
9426PJ_INSERT_SESSION *proj_insert_object_session_create(PJ_CONTEXT *ctx) {
9427 SANITIZE_CTX(ctx);
9428 try {
9429 auto dbContext = getDBcontext(ctx);
9430 dbContext->startInsertStatementsSession();
9431 PJ_INSERT_SESSION *session = new PJ_INSERT_SESSION;
9432 session->ctx = ctx;
9433 return session;
9434 } catch (const std::exception &e) {
9435 proj_log_error(ctx, __FUNCTION__, e.what());
9436 return nullptr;
9437 }
9438}
9439
9440// ---------------------------------------------------------------------------
9441

Callers 2

TEST_FFunction · 0.85
TempSessionHolderMethod · 0.85

Calls 4

getDBcontextFunction · 0.85
proj_log_errorFunction · 0.85
whatMethod · 0.45

Tested by 1

TEST_FFunction · 0.68