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

Function graph_binary_compare

src/store/store.c:1850–1858  ·  view source on GitHub ↗

SQLite's BINARY collation compares the unsigned bytes of the UTF-8 text. * Keep the merge comparator byte-for-byte equivalent so neither cursor can * be advanced past a row that SQLite considers distinct. */

Source from the content-addressed store, hash-verified

1848 * Keep the merge comparator byte-for-byte equivalent so neither cursor can
1849 * be advanced past a row that SQLite considers distinct. */
1850static int graph_binary_compare(const char *left, const char *right) {
1851 const unsigned char *a = (const unsigned char *)safe_str(left);
1852 const unsigned char *b = (const unsigned char *)safe_str(right);
1853 while (*a && *a == *b) {
1854 a++;
1855 b++;
1856 }
1857 return (*a > *b) - (*a < *b);
1858}
1859
1860static int graph_node_compare(const cbm_graph_node_identity_t *left,
1861 const cbm_graph_node_identity_t *right) {

Callers 2

graph_node_compareFunction · 0.85
graph_edge_compareFunction · 0.85

Calls 1

safe_strFunction · 0.70

Tested by

no test coverage detected