rockerest’s avatarrockerest’s Twitter Archive—№ 16,754

      1. …in reply to @schizanon
        @yesiwebto I think Dexie's compound index support would allow something but I'm not 100% sure how. It's definitely in here somewhere: dexie.org/docs/Compound-Index#matching-first-part-only
        OpenGraph image for dexie.org/docs/Compound-Index#matching-first-part-only
    1. …in reply to @rockerest
      @yesiwebto Oh yeah I think what you posted is right. Dexie creates a virtual index on the parts of the compount indexes, so yes I think what you posted is how you'd query with an OR on the two parts of the compound index.
  1. …in reply to @rockerest
    @yesiwebto The chaining seems to break down after the first .where, which is frustrating, but I think you could simplify a bit like: .where( { fileName } ) .or( "otherFileName" ) .equals( fileName );
    1. …in reply to @rockerest
      @yesiwebto (frustrating, because I want it to be: .where( { fileName } ) .or .where( { "otherFileName": fileName } ); que sera)
      1. …in reply to @rockerest
        @yesiwebto ... calling .where immediately returns a Collection, and then calling .or returns a new WhereClause. .where returning a Collection right away is the original sin. We should be able to build up a big query before converting it to a Collection - either explicitly or implicitly.
        1. …in reply to @rockerest
          @yesiwebto Anyway, I'm just rabbit-trailing now :)