Append a WHERE clause fragment, joining with AND if not the first. */
| 2421 | |
| 2422 | /* Append a WHERE clause fragment, joining with AND if not the first. */ |
| 2423 | static int where_append(char *where, int where_sz, int wlen, int *nparams, const char *cond) { |
| 2424 | if (*nparams > 0) { |
| 2425 | wlen += snprintf(where + wlen, where_sz - wlen, " AND "); |
| 2426 | } |
| 2427 | wlen += snprintf(where + wlen, where_sz - wlen, "%s", cond); |
| 2428 | (*nparams)++; |
| 2429 | return wlen; |
| 2430 | } |
| 2431 | |
| 2432 | /* Bind a text parameter and increment the bind index. */ |
| 2433 | static void where_bind_text(search_bind_t *binds, int *bind_idx, const char *val) { |
no outgoing calls
no test coverage detected