oatpp-sqlite icon indicating copy to clipboard operation
oatpp-sqlite copied to clipboard

foreign_keys not work.

Open kekxv opened this issue 3 years ago • 1 comments

PRAGMA foreign_keys=ON;

kekxv avatar Nov 09 '22 08:11 kekxv

it works under bazel:

    maybe(
        new_git_repository,
        name = "oatpp_sqlite",
        build_file_content = all_sqlite_content,
        init_submodules = True,
        # tag = "v0.16.5",
        commit = "c62750793e572f8692a242e731596a098e480ac3",
        shallow_since = "1651060543 +0300",
        remote = "https://github.com/oatpp/oatpp-sqlite.git",
        patch_cmds = [
            "sed -i.bak 's/\\/oatpp-${OATPP_MODULE_VERSION}\\/${OATPP_MODULE_NAME}/\\//g' cmake/module-install.cmake",
            # TODO enable foreign_keys
            "sed -i.bak 's/auto sqliteConn = std::static_pointer_cast<sqlite::Connection>(conn.object);/auto sqliteConn = std::static_pointer_cast<sqlite::Connection>(conn.object);sqlite3_exec(sqliteConn->getHandle(), \"PRAGMA foreign_keys=ON;\", NULL, NULL, NULL);/g' src/oatpp-sqlite/Executor.cpp",
        ],
    )

kekxv avatar Jun 22 '23 06:06 kekxv