-
-
Notifications
You must be signed in to change notification settings - Fork 376
Read postgresql data on C++ #2607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pgdata_getters will be called from C++ code only
- parameter is the sql query - returns a C++ container
- This include will be removed when the reading takes place on C++ - The only expected place to remain is on old function of trsp
- C files: marking unused code - cleanup: removing comments - _driver.h: - parameter for queries is the sql char* - Clean up: removing parameter names & comments - _driver.cpp: - c++ code read the data from the SQL queries - Adding a catch for input errors
64bba51
to
3be0767
Compare
47eef4e
to
d6585aa
Compare
Something happened on the cpplint that is not working anymore on the CI. |
Opened an issue here |
@cvvergara I encountered the following build error on my M1 MacBook Pro environment.
And changing the following was necessary to pass the build. --- a/src/cpp_common/combinations.cpp
+++ b/src/cpp_common/combinations.cpp
@@ -24,12 +24,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/
-#include "cpp_common/combinations.hpp"
-
#include <map>
#include <set>
#include <deque>
#include <vector>
+#include "cpp_common/combinations.hpp"
#include "cpp_common/pgdata_getters.hpp"
#include "cpp_common/basePath_SSEC.hpp" After the build, it seems to be fine, but I will check more at tomorrow. |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Moving the input queries from the C code into the C++ code.
Before this change
On the C file:
process
within each C file example are very similarx
MB in memorypgr_do_function
defined on the driverOn the driver C++ file:
The ideal situation:
General steps to reach the ideal situation
This PR is step 1
In rough terms, moving the reading of the data to C++.
The sketch of the C & C++ driver files for the first step:
On the C file:
header
linked as Cprocess
within each C file will still be very similarpgr_do_function
defined on the driverOn the driver C++ file:
x
MB in memorytasks
pgdata_getters
andpgdata_fetchers
8000 totrsp_pgget
&trsp_pgfetch
trsp_pgget
is the deprecatedpgr_trsp
functiontrsp_pgget
&trsp_pgfetch
pgdata_getters
andpgdata_fetchers
to be used directly from C++pgdata_getters
andpgdata_fetchers
pgr_do_