mongoFilterToBSON :: forall typ. PersistField typ
                  => Text
                  -> MongoFilterOperator typ
                  -> DB.Document
mongoFilterToBSON fname filt = case filt of
    (PersistFilterOperator v op) -> [filterToBSON fname v op]
    (MongoFilterOperator bval)   -> [fname DB.:= bval]
mongoFilterToBSON :: forall typ. PersistField typ
                  => Text
                  -> MongoFilterOperator typ
                  -> DB.Document
mongoFilterToBSON fname filt = case filt of
    (PersistFilterOperator v op) -> [filterToBSON fname v op]
    (MongoFilterOperator bval)   -> [fname DB.:= bval]
mongoFilterToBSON fname filt = case filt of
    (PersistFilterOperator v op) -> [filterToBSON fname v op]
    (MongoFilterOperator bval)   -> [fname DB.:= bval]