The following utility functions have been added to the CSelectQuery class (and any other query classes inheriting from CWhereQuery) in FogBugz 8:
''' <summary>
''' Add a wildcard-free LIKE condition to the query.
''' The search parameter will be encoded and escaped for sql injection and for use in a LIKE clause.
''' </summary>
''' <param name='sColumn'>The column on which to perform the like search.</param>
''' <param name='sLike'>The substring to search for.</param>
Public Sub AddLike(sColumn, sLike)
''' <summary>
''' Add a substring LIKE condition to the query.
''' A percent sign will be added to the beginning and end of the search term.
''' The search parameter will be encoded and escaped for sql injection and for use in a LIKE clause.
''' </summary>
''' <param name='sColumn'>The column on which to perform the like search.</param>
''' <param name='sLike'>The substring to search for.</param>
Public Sub AddSubstringLike(sColumn As String, sLike As String)
''' <summary>
''' Add a prefix LIKE condition to the query.
''' A percent sign will be added to the end of the search term.
''' The search parameter will be encoded and escaped for sql injection and for use in a LIKE clause.
''' </summary>
''' <param name='sColumn'>The column on which to perform the like search.</param>
''' <param name='sLike'>The prefix to search for.</param>
Public Sub AddPrefixLike(sColumn As String, sLike As String)
''' <summary>
''' Add a suffix LIKE condition to the query.
''' A percent sign will be added to the beginning the search term.
''' The search parameter will be encoded and escaped for sql injection and for use in a LIKE clause.
''' </summary>
''' <param name='sColumn'>The column on which to perform the like search.</param>
''' <param name='sLike'>The suffix to search for.</param>
Public Sub AddSuffixLike(sColumn As String, sLike As String)