@return : non-zero */
| 754 | |
| 755 | /* @return : non-zero */ |
| 756 | int ops_sql_query(struct sip_msg* msg, str* query, struct db_url *url, |
| 757 | pvname_list_t* dest, int one_row) |
| 758 | { |
| 759 | int ret; |
| 760 | |
| 761 | if(msg==NULL || query==NULL) |
| 762 | { |
| 763 | LM_ERR("bad parameters\n"); |
| 764 | return -1; |
| 765 | } |
| 766 | |
| 767 | LM_DBG("query [%.*s]\n", query->len, query->s); |
| 768 | ret = sql_query(url, msg, query, dest, one_row); |
| 769 | |
| 770 | /* Empty return set */ |
| 771 | if(ret==1) |
| 772 | return -2; |
| 773 | |
| 774 | /* All other failures */ |
| 775 | if(ret!=0) |
| 776 | return -1; |
| 777 | |
| 778 | /* Have a return set */ |
| 779 | return 1; |
| 780 | } |
| 781 | |
| 782 | |
| 783 | static inline int _parse_json_col_and_filter( str *cols, str *filter, |
no test coverage detected