General structure of query solver

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
Test for query solver

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>