public function modify($data=null, $where=null)
    {
        $this->set($data, $where);
        $query = static::getQuery();
        
        // verify data
        $mdata = $query->get('data');
        $mwhere = $query->get('where');
        
        if (!$query->formatted()) {
            $mdata = static::formatInput($mdata);
            $query->remove('data')->setRaw('data', $mdata);
            
            $res = static::verifyData($mdata);
            if ($res['errcode']) {
                return $res;
            }
        }
        
        if (static::isEmptyData($mdata)) {
            return ErrorInfo::success('donot need modify.');
        }
        
        if (!$mwhere) {
            // clone query
            $clone = $query->clone();
            $res = $this->setQuery($clone)->verifyUnique($mdata, $mwhere);
            if ($res->isError()) {
                return $res;
            }
        }
        
        $ret = $this->setQuery($query)->update()->query();
        
        return ErrorInfo::instance($ret === false ? -1 : 0);
    }