public static function delete($where): int
    {
        $delete = new Delete(static::getTableName(), static::getAdapterConnection());

        if ($where instanceof Where) {
            $delete->where($where);
        } else if (is_array($where)) {
            foreach ($where as $field => $value) {
                $delete->where($field, $value);
            }
        } else if (!is_array(static::$primaryKey) && (is_numeric($where) || is_string($where))) {
            $delete->where(static::$primaryKey, $where);
        }

        return $delete->exec()->rowCount();
    }