add simple Query functions.
add simple Query functions.
add basic methods in Query and liscense statement in some files.
add QueryManager testcases.