Append a WHERE clause fragment, joining with AND if not the first. */
| 4225 | |
| 4226 | /* Append a WHERE clause fragment, joining with AND if not the first. */ |
| 4227 | static int where_append(char *where, int where_sz, int wlen, int *nparams, const char *cond) { |
| 4228 | if (*nparams > 0) { |
| 4229 | wlen += snprintf(where + wlen, where_sz - wlen, " AND "); |
| 4230 | } |
| 4231 | wlen += snprintf(where + wlen, where_sz - wlen, "%s", cond); |
| 4232 | (*nparams)++; |
| 4233 | return wlen; |
| 4234 | } |
| 4235 | |
| 4236 | /* Bind a text parameter and increment the bind index. */ |
| 4237 | static void where_bind_text(search_bind_t *binds, int *bind_idx, const char *val) { |
no outgoing calls
no test coverage detected