| 2235 | ////////////////////////////////////////////////////////// |
| 2236 | |
| 2237 | inline soar_module::sqlite_statement* smem_setup_web_crawl(agent* thisAgent, smem_weighted_cue_element* el) |
| 2238 | { |
| 2239 | soar_module::sqlite_statement* q = NULL; |
| 2240 | |
| 2241 | // first, point to correct query and setup |
| 2242 | // query-specific parameters |
| 2243 | if (el->element_type == attr_t) |
| 2244 | { |
| 2245 | // attribute_s_id=? |
| 2246 | q = thisAgent->smem_stmts->web_attr_all; |
| 2247 | } |
| 2248 | else if (el->element_type == value_const_t) |
| 2249 | { |
| 2250 | // attribute_s_id=? AND value_constant_s_id=? |
| 2251 | q = thisAgent->smem_stmts->web_const_all; |
| 2252 | q->bind_int(2, el->value_hash); |
| 2253 | } |
| 2254 | else if (el->element_type == value_lti_t) |
| 2255 | { |
| 2256 | // attribute_s_id=? AND value_lti_id=? |
| 2257 | q = thisAgent->smem_stmts->web_lti_all; |
| 2258 | q->bind_int(2, el->value_lti); |
| 2259 | } |
| 2260 | |
| 2261 | // all require hash as first parameter |
| 2262 | q->bind_int(1, el->attr_hash); |
| 2263 | |
| 2264 | return q; |
| 2265 | } |
| 2266 | |
| 2267 | inline bool _smem_process_cue_wme(agent* thisAgent, wme* w, bool pos_cue, smem_prioritized_weighted_cue& weighted_pq, MathQuery* mathQuery) |
| 2268 | { |
no test coverage detected