-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
107 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
server/controller/db/mysql/migration/rawsql/issu/6.6.1.13.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CREATE TABLE IF NOT EXISTS ch_statistic_tag ( | ||
`db` VARCHAR(128) NOT NULL, | ||
`table` VARCHAR(256) NOT NULL, | ||
`type` VARCHAR(128) NOT NULL, | ||
`name` VARCHAR(256) NOT NULL, | ||
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | ||
PRIMARY KEY (`db`, `table`, `type`, `name`) | ||
)ENGINE=innodb DEFAULT CHARSET=utf8; | ||
TRUNCATE TABLE ch_statistic_tag; | ||
|
||
-- update db_version to latest, remeber update DB_VERSION_EXPECT in migrate/version.go | ||
UPDATE db_version SET version='6.6.1.13'; | ||
-- modify end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (c) 2024 Yunshan Networks | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package tagrecorder | ||
|
||
import ( | ||
"github.com/deepflowio/deepflow/server/controller/db/mysql" | ||
mysqlmodel "github.com/deepflowio/deepflow/server/controller/db/mysql/model" | ||
) | ||
|
||
type ChStatisticTag struct { | ||
UpdaterComponent[mysqlmodel.ChStatisticTag, StatisticTagKey] | ||
} | ||
|
||
func NewChStatisticTag() *ChStatisticTag { | ||
updater := &ChStatisticTag{ | ||
newUpdaterComponent[mysqlmodel.ChStatisticTag, StatisticTagKey]( | ||
RESOURCE_TYPE_STATISTIC_TAG, | ||
), | ||
} | ||
updater.updaterDG = updater | ||
return updater | ||
} | ||
|
||
func (r *ChStatisticTag) generateNewData(db *mysql.DB) (map[StatisticTagKey]mysqlmodel.ChStatisticTag, bool) { | ||
|
||
return nil, false | ||
} | ||
|
||
func (r *ChStatisticTag) generateKey(dbItem mysqlmodel.ChStatisticTag) StatisticTagKey { | ||
return StatisticTagKey{Db: dbItem.Db, Table: dbItem.Table, Type: dbItem.Type, Name: dbItem.Name} | ||
} | ||
|
||
func (r *ChStatisticTag) generateUpdateInfo(oldItem, newItem mysqlmodel.ChStatisticTag) (map[string]interface{}, bool) { | ||
|
||
return nil, false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters