title: Sqlite.swift live search
body: <p>I want to do a live search on the DB. </p>
  
  <p>Lets say I want to search by companies and I have the following info on a column named companies. </p>
  
  <ul>
  <li>Facebook</li>
  <li>FastCompany</li>
  <li>Facebook</li>
  <li>Google</li>
  <li>Microsoft</li>
  </ul>
  
  <p>I have a textfield that has calls a function on editchanged. </p>
  
  <pre><code>   @IBAction func searching(sender: AnyObject) {
          tempstring = "%"+searchBar.text+"%"
          println(tempstring)
  
           user = user.select(name)
              .filter(like(tempstring, name))
              .limit(30, offset: 0)
          collectionView?.reloadData()
  }
  </code></pre>
  
  <p>It kind of works, if I start typing "<strong>fa</strong>"
  It will show (<strong>Facebook, Facebook and FastCompany</strong>)</p>
  
  <p>If I continue typing "<strong>fac</strong>" it will show (<strong>Facebook, Facebook</strong>)</p>
  
  <p>But when I delete the last character "<strong>c</strong>"  from the searchbox (leaving it in "fa" again) then the query displays nothing. </p>
  
  <p>Any ideas on how I can solve this. </p>