You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Off: The custom query above is just an example, right? Because you don't need to use a custom query for that. You can execute it like this: $mapper->where(['state IN' => ['pending', 'active']]);
On: I can't say anything about the usefullness of passing through the custom param type.
Yes, it's just an example for the sake of simplicity. Intended usage of \Spot\Mapper::query() is for custom, complex queries, where you might also have typed parameters. Currently using query() you can't specify them, however it's supported directly by DBAL (see \Doctrine\DBAL\Connection::executeQuery). The method just doesn't proxy them. IMHO this is unnecessary limitation of Spot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using custom query, it's not possible to use custom types for query parameters. For example:
This pull request fixes the problem by passing custom param types to \Doctrine\DBAL\Connection::executeQuery() via Mapper::query().