Skip to content
  • David Woodhouse's avatar
    Add (failing) test for Evolution's address autocompletion query · 5f9f5b52
    David Woodhouse authored
    [00:21] <tristan> dwmw2, if you really think that, then it will have to be
                rethought again, but if we're gonna rethink it again - please
                add a failing test case to test-client-custom-summary.c before
                we even go down that road.
    
    Here you go :)
    
    Note: This fails because we're using an inner join of folder_id with
    folder_id_email_list on uid. Which means that records in folder_id
    which don't *have* an email address aren't considered for the search.
    
    This is the query:
    SELECT DISTINCT summary.uid, summary.vcard, summary.bdata
      FROM  'folder_id' AS summary
      JOIN  'folder_id_email_list' AS email_list
      ON    +email_list.uid = summary.uid
      WHERE ((summary.nickname IS NOT NULL AND summary.nickname LIKE 'p%')
          OR (email_list.value IS NOT NULL AND email_list.value LIKE 'p%')
          OR ((summary.full_name IS NOT NULL AND summary.full_name LIKE 'p%')
           OR (summary.family_name IS NOT NULL AND summary.family_...
    5f9f5b52