Critical rules for maintaining the dual-write path (Legacy vs. ODBC) in SqlLib.
The sqllib library is undergoing a transition from a legacy text-based upsert mechanism ("Old Write") to a high-performance ODBC parameter binding mechanism ("New Write"). To ensure system stability during this evolution, both implementations must coexist and be selectable at compile-time.
The preprocessor definition SQLDB_NEW_WRITE controls which implementation is compiled.
When modifying SqlConnection.cpp, SqlStatement classes, or related headers:
#ifdef SQLDB_NEW_WRITE / #else / #endif preprocessor blocks wrapping the Write implementations.#ifndef SQLDB_NEW_WRITE or #else block) is the PRODUCTION FALLBACK.
SQLDB_NEW_WRITE enabled blocks.SQLDB_NEW_WRITE is defined or undefined.SQLDB_NEW_WRITE if it introduces dependencies incompatible with the legacy build.[[maybe_unused]] if necessary to prevent warnings.