Guest User

Untitled

a guest
Aug 8th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.75 KB | None | 0 0
  1. ORIGINAL
  2. --------
  3. public void add_text_condition_subquery (string column, string val,
  4.             bool negation=false)
  5.         {
  6.             string search_table = get_search_table_for_column (column);
  7.             string sql = "%s IN (SELECT id FROM %s WHERE value %s= ?)".printf (
  8.                 column, search_table, (negation) ? "!" : "");
  9.             add (sql, val);
  10.         }
  11.  
  12.  
  13. NEW
  14. ---
  15. public void add_text_condition_subquery (string column, string val,
  16.             bool negation=false)
  17.         {
  18.             string search_table = get_search_table_for_column (column);
  19.             string sql = "%s %s= (SELECT id FROM %s WHERE value = ?)".printf (
  20.                 column, (negation) ? "!" : "", search_table);
  21.             add (sql, val);
  22.         }
Add Comment
Please, Sign In to add comment