Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: fix function names in comment (#11571)

clonefetch33ffe71b0aa0
diff --git a/backend/common/resource_name.go b/backend/common/resource_name.go
index c3069f9c9f..7d1fd53d44 100644
--- a/backend/common/resource_name.go
+++ b/backend/common/resource_name.go
@@ -508,7 +508,7 @@ func GetProjectAndBranchID(name string) (string, string, error) {
return matches[1], matches[2], nil
}
-// GetWorkspaceProjectVCSConnectorID returns the workspace, project, and VCS connector ID from a resource name.
+// GetProjectVCSConnectorID returns the workspace, project, and VCS connector ID from a resource name.
func GetProjectVCSConnectorID(name string) (string, string, error) {
tokens, err := GetNameParentTokens(name, ProjectNamePrefix, VCSConnectorPrefix)
if err != nil {
diff --git a/backend/component/activity/manager.go b/backend/component/activity/manager.go
index 0412f440dd..c1e870b1d4 100644
--- a/backend/component/activity/manager.go
+++ b/backend/component/activity/manager.go
@@ -44,7 +44,7 @@ func NewManager(store *store.Store) *Manager {
}
}
-// BatchCreateActivitiesForCreateIssue creates activities for running tasks.
+// BatchCreateActivitiesForRunTasks creates activities for running tasks.
func (m *Manager) BatchCreateActivitiesForRunTasks(ctx context.Context, tasks []*store.TaskMessage, issue *store.IssueMessage, comment string, updaterUID int) error {
var creates []*store.ActivityMessage
for _, task := range tasks {
diff --git a/backend/plugin/advisor/mysql/advisor_column_required.go b/backend/plugin/advisor/mysql/advisor_column_required.go
index 5e58321e78..30fd5410f2 100644
--- a/backend/plugin/advisor/mysql/advisor_column_required.go
+++ b/backend/plugin/advisor/mysql/advisor_column_required.go
@@ -77,7 +77,7 @@ type columnRequirementChecker struct {
line map[string]int
}
-// EnterCreateDatabase is called when production createDatabase is entered.
+// EnterCreateTable is called when production createDatabase is entered.
func (checker *columnRequirementChecker) EnterCreateTable(ctx *mysql.CreateTableContext) {
if !mysqlparser.IsTopMySQLRule(&ctx.BaseParserRuleContext) {
return
diff --git a/backend/plugin/advisor/mysql/advisor_table_disallow_partition.go b/backend/plugin/advisor/mysql/advisor_table_disallow_partition.go
index 5df46dd4aa..ce4a0c3c5c 100644
--- a/backend/plugin/advisor/mysql/advisor_table_disallow_partition.go
+++ b/backend/plugin/advisor/mysql/advisor_table_disallow_partition.go
@@ -73,7 +73,7 @@ func (checker *tableDisallowPartitionChecker) EnterQuery(ctx *mysql.QueryContext
checker.text = ctx.GetParser().GetTokenStream().GetTextFromRuleContext(ctx)
}
-// EnterCreateDatabase is called when production createDatabase is entered.
+// EnterCreateTable is called when production createDatabase is entered.
func (checker *tableDisallowPartitionChecker) EnterCreateTable(ctx *mysql.CreateTableContext) {
if !mysqlparser.IsTopMySQLRule(&ctx.BaseParserRuleContext) {
return
diff --git a/backend/plugin/advisor/tidb/advisor_index_type_no_blob.go b/backend/plugin/advisor/tidb/advisor_index_type_no_blob.go
index 8f8b50424c..dab21394fc 100644
--- a/backend/plugin/advisor/tidb/advisor_index_type_no_blob.go
+++ b/backend/plugin/advisor/tidb/advisor_index_type_no_blob.go
@@ -220,7 +220,7 @@ func (v *indexTypeNoBlobChecker) addConstraint(tableName string, line int, const
return pkDataList
}
-// getPKColumnType gets the column type string from v.tablesNewColumns or catalog, returns empty string and non-nil error if cannot find the column in given table.
+// getColumnType gets the column type string from v.tablesNewColumns or catalog, returns empty string and non-nil error if cannot find the column in given table.
func (v *indexTypeNoBlobChecker) getColumnType(tableName string, columnName string) (string, error) {
if colDef, ok := v.tablesNewColumns.get(tableName, columnName); ok {
return v.getBlobStr(colDef.Tp), nil
@@ -235,7 +235,7 @@ func (v *indexTypeNoBlobChecker) getColumnType(tableName string, columnName stri
return "", errors.Errorf("cannot find the type of `%s`.`%s`", tableName, columnName)
}
-// getIntOrBigIntStr returns the type string of tp.
+// getBlobStr returns the type string of tp.
func (*indexTypeNoBlobChecker) getBlobStr(tp *types.FieldType) string {
switch tp.GetType() {
case mysql.TypeTinyBlob: