Repository navigation
docs: add full doxygen documentation to get_check_data.hpp #3125
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
base: develop
Are you sure you want to change the base?
Changes from all commits
1c48ba7
af76677
f5ab906
abb9aec
9d22105
8e03631
caf78c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -48,34 +48,54 @@ extern "C" { | |||||
| namespace pgrouting { | ||||||
| using Column_info_t = struct Column_info_t; | ||||||
|
|
||||||
| /** @brief Function will check whether the colNumber represent any specific column or NULL (SPI_ERROR_NOATTRIBUTE). */ | ||||||
| /** | ||||||
| * @brief Function will check whether the colNumber exists | ||||||
| */ | ||||||
| bool column_found(int); | ||||||
|
|
||||||
| /** @brief Function tells expected type of each column and then check the correspondence type of each column. */ | ||||||
| /** | ||||||
| * @brief Function tells expected type of each column | ||||||
| */ | ||||||
| void fetch_column_info(const TupleDesc&, std::vector<Column_info_t>&); | ||||||
|
|
||||||
| /** @brief Function return the value of specified column in char type. */ | ||||||
| /** | ||||||
| * @brief Function return the value of specified column | ||||||
| */ | ||||||
| char getChar(const HeapTuple, const TupleDesc&, const Column_info_t&, bool, char); | ||||||
|
|
||||||
| /** @brief get postgres array into c++ set container */ | ||||||
| /** | ||||||
| * @brief get postgres array into c++ set container | ||||||
| */ | ||||||
| std::set<int64_t> get_pgset(ArrayType*); | ||||||
|
|
||||||
| /** @brief get postgres array into c++ vector container */ | ||||||
| /** | ||||||
| * @brief Get postgres array into c++ vector container | ||||||
| */ | ||||||
| std::vector<int64_t> get_pgarray(ArrayType*, bool); | ||||||
|
|
||||||
| /** @brief Enforces the input array to be @b NOT empty */ | ||||||
| /** | ||||||
| * @brief Enforces the input array to be NOT empty | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: sed -n '45,105p' include/cpp_common/get_check_data.hpp
rg -n -A 45 -B 8 'get_array\s*\(' src/cpp_common/get_check_data.cppRepository: pgRouting/pgrouting Length of output: 5319 Document the When Suggested fix- * @brief Enforces the input array to be NOT empty
+ * @brief Returns nullptr for an empty input array when allow_empty is true; otherwise requires a nonempty array📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| */ | ||||||
| int64_t* get_array(ArrayType*, size_t*, bool); | ||||||
|
|
||||||
| /** @brief Function returns the values of specified columns in array. */ | ||||||
| /** | ||||||
| * @brief Function returns the values of specified column | ||||||
| */ | ||||||
| int64_t* getBigIntArr(const HeapTuple, const TupleDesc&, const Column_info_t&, size_t*); | ||||||
|
|
||||||
| /** @brief Function returns the value of specified column in integer type. */ | ||||||
| /** | ||||||
| * @brief Function returns the value of specified column | ||||||
| */ | ||||||
| int64_t getBigInt(const HeapTuple, const TupleDesc&, const Column_info_t&); | ||||||
|
|
||||||
| /** @brief Function returns the value of specified column in double type. */ | ||||||
| /** | ||||||
| * @brief Function returns the value of specified column | ||||||
| */ | ||||||
| double getFloat8(const HeapTuple, const TupleDesc&, const Column_info_t&); | ||||||
|
|
||||||
| /** @brief Function returns the string representation of the value of specified column. */ | ||||||
| /** | ||||||
| * @brief Function returns the string representation of column | ||||||
| * @note Under development - not used, not tested | ||||||
| */ | ||||||
| char* getText(const HeapTuple, const TupleDesc&, const Column_info_t&); | ||||||
|
|
||||||
| } // namespace pgrouting | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,7 +139,7 @@ check_char_type(const pgrouting::Column_info_t &info) { | |
| } | ||
| } | ||
|
|
||
| /** | ||
| /* | ||
| * @brief The function check whether column type is ANY-INTEGER-ARRAY or not. | ||
| * Where ANY-INTEGER-ARRAY is SQL type: | ||
| * SMALLINT[], INTEGER[], BIGINT[] | ||
|
|
@@ -243,8 +243,7 @@ char getChar( | |
| return value; | ||
| } | ||
|
|
||
| /** @brief get the array contents from postgres | ||
| * | ||
| /** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: sed -n '225,345p' src/cpp_common/get_check_data.cpp
sed -n '405,455p' src/cpp_common/get_check_data.cpp
rg -n 'elog|throw\s+std::string|std::string\s*\(' src/cpp_common/get_check_data.cppRepository: pgRouting/pgrouting Length of output: 8034 🏁 Script executed: sed -n '240,505p' src/cpp_common/get_check_data.cppRepository: pgRouting/pgrouting Length of output: 8218 Correct the array-accessor Doxygen comments. The comments for The 🤖 Prompt for AI Agents |
||
| * @details This function generates the array inputs according to their type | ||
| * received through @a ArrayType *v parameter and store them in @a c_array. It | ||
| * can be empty also if received @a allow_empty true. The cases of failure are:- | ||
|
|
@@ -328,8 +327,7 @@ get_pgset(ArrayType *v) { | |
| return results; | ||
| } | ||
|
|
||
| /** @brief get the array contents from postgres | ||
| * | ||
| /** | ||
| * @details This function generates the array inputs according to their type | ||
| * received through @a ArrayType *v parameter and store them in @a c_array. It | ||
| * can be empty also if received @a allow_empty true. The cases of failure are:- | ||
|
|
@@ -420,8 +418,7 @@ get_pgarray(ArrayType *v, bool allow_empty) { | |
| return results; | ||
| } | ||
|
|
||
| /** @brief get the array contents from postgres | ||
| * | ||
| /** | ||
| * @details This function generates the array inputs according to their type | ||
| * received through @a ArrayType *v parameter and store them in @a c_array. It | ||
| * can be empty also if received @a allow_empty true. The cases of failure are:- | ||
|
|
@@ -622,7 +619,7 @@ double getFloat8( | |
| return 0.0; | ||
| } | ||
|
|
||
| /*! | ||
| /** | ||
| * [SPI_getvalue](https://doxygen.postgresql.org/spi_8c.html#ae53c12ff90592f67e4e40ad0af24205b | ||
| which calls OidOutputFunctionCall, which calls | ||
| OutputFunctionCall - https://doxygen.postgresql.org/fmgr_8c.html#ae19cff34818e4a6c90523e8bb02c3420 | ||
|
|
@@ -639,4 +636,4 @@ char* getText(const HeapTuple tuple, const TupleDesc &tupdesc, const pgrouting: | |
| return SPI_getvalue(tuple, tupdesc, info.colNumber); | ||
| } | ||
|
|
||
| } // namespace pgrouting | ||
| } // namespace pgrouting | ||
Uh oh!
There was an error while loading. Please reload this page.