add new api for query and direct copy.

Signed-off-by: qijiang.guo <qijiang.guo@gmail.com>