Add set config by code
simplify doQuery