rename Query -> DatabaseQuery
add expand method for debugging purposes