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. */
| 1848 | * Keep the merge comparator byte-for-byte equivalent so neither cursor can |
| 1849 | * be advanced past a row that SQLite considers distinct. */ |
| 1850 | static 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 | |
| 1860 | static int graph_node_compare(const cbm_graph_node_identity_t *left, |
| 1861 | const cbm_graph_node_identity_t *right) { |
no test coverage detected