MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / rb_is_numeric_column

Function rb_is_numeric_column

src/cypher/cypher.c:3871–3888  ·  view source on GitHub ↗

Check whether a column contains numeric data by examining the first non-empty value */

Source from the content-addressed store, hash-verified

3869
3870/* Check whether a column contains numeric data by examining the first non-empty value */
3871static bool rb_is_numeric_column(const result_builder_t *rb, int col) {
3872 for (int i = 0; i < rb->row_count; i++) {
3873 const char *v = rb->rows[i][col];
3874 if (v && *v) {
3875 const char *p2 = (*v == '-') ? v + SKIP_ONE : v;
3876 if (*p2 == '\0') {
3877 return false;
3878 }
3879 for (; *p2; p2++) {
3880 if (*p2 < '0' || *p2 > '9') {
3881 return false;
3882 }
3883 }
3884 return true;
3885 }
3886 }
3887 return false;
3888}
3889
3890typedef struct {
3891 const int *cols;

Callers 1

rb_apply_order_byFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected