public function prepareLookupForDb($values, ConnectionInterface $connection)
    {
        $preparedValues = [];
        if ($this->rhsValueIsIterable) {
            foreach ($values as $value) {
                $preparedValues[] = $this->lhs->getOutputField()->convertToDatabaseValue($value, $connection);
            }
        } else {
            $preparedValues[] = $this->lhs->getOutputField()->convertToDatabaseValue($values, $connection);
        }

        return $preparedValues;
    }
public function prepareLookupForDb($values, ConnectionInterface $connection)
    {
        $preparedValues = [];
        if ($this->rhsValueIsIterable) {
            foreach ($values as $value) {
                $preparedValues[] = $this->lhs->getOutputField()->convertToDatabaseValue($value, $connection);
            }
        } else {
            $preparedValues[] = $this->lhs->getOutputField()->convertToDatabaseValue($values, $connection);
        }

        return $preparedValues;
    }
public function prepareLookupForDb ( $ values , ConnectionInterface $ connection ) { $ preparedValues = [ ] ; if ( $ this -> rhsValueIsIterable ) { foreach ( $ values as $ value ) { $ preparedValues [ ] = $ this -> lhs -> getOutputField ( ) -> convertToDatabaseValue ( $ value , $ connection ) ; } } else { $ preparedValues [ ] = $ this -> lhs -> getOutputField ( ) -> convertToDatabaseValue ( $ values , $ connection ) ; } return $ preparedValues ; }
Prepare the rhs for use on database queries.

@author: Eddilbert Macharia (http://eddmash.com)<edd.cowan@gmail.com>

@throws \Eddmash\PowerOrm\Exception\FieldError
@throws \Doctrine\DBAL\DBALException
Prepare the rhs for use on database queries .