Skip to content

Commit

Permalink
remove some useless lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lcwangchao committed Mar 26, 2024
1 parent 77c4a18 commit 3c23a06
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/ddl/schematracker/info_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,28 +152,24 @@ func (i *InfoStore) AllTableNamesOfSchema(schema model.CIStr) ([]string, error)

// InfoStoreAdaptor convert InfoStore to InfoSchema, it only implements a part of InfoSchema interface to be
// used by DDL interface.
// nolint:unused
type InfoStoreAdaptor struct {
infoschema.InfoSchema
inner *InfoStore
}

// SchemaByName implements the InfoSchema interface.
// nolint:unused
func (i InfoStoreAdaptor) SchemaByName(schema model.CIStr) (*model.DBInfo, bool) {
dbInfo := i.inner.SchemaByName(schema)
return dbInfo, dbInfo != nil
}

// TableExists implements the InfoSchema interface.
// nolint:unused
func (i InfoStoreAdaptor) TableExists(schema, table model.CIStr) bool {
tableInfo, _ := i.inner.TableByName(schema, table)
return tableInfo != nil
}

// TableByName implements the InfoSchema interface.
// nolint:unused
func (i InfoStoreAdaptor) TableByName(schema, table model.CIStr) (t table.Table, err error) {
tableInfo, err := i.inner.TableByName(schema, table)
if err != nil {
Expand All @@ -183,7 +179,6 @@ func (i InfoStoreAdaptor) TableByName(schema, table model.CIStr) (t table.Table,
}

// TableInfoByName implements the InfoSchema interface.
// nolint:unused
func (i InfoStoreAdaptor) TableInfoByName(schema, table model.CIStr) (*model.TableInfo, error) {
return i.inner.TableByName(schema, table)
}

0 comments on commit 3c23a06

Please sign in to comment.