Add all position hints query support.

AFDP-46

Add the following:
- query definition
- repository function using the query
- command using the repository function
- unit and integration tests.