Esempio n. 1
0
 public function delete($where)
 {
     // where必须有,防止误删所有数据
     if (!is_array($where) || empty($where)) {
         throw new LibraryException('参数错误:$where');
     }
     // 物理删除
     $sql = $this->sqlBuilder->createDeleteSql($where);
     $affects = $this->masterHandle->delete($sql);
     // 如果删除成功,清空该表所有静态缓存
     if (!empty($affects)) {
         unset(self::$rowCache[$this->dbName][$this->tableName]);
     }
     return $affects;
 }