explicit bucket aware declaration

This commit is contained in:
chrislu 2022-07-21 18:23:53 -07:00
parent 6147b61b0a
commit c93f7ffa44
4 changed files with 8 additions and 0 deletions

View File

@ -32,6 +32,8 @@ type AbstractSqlStore struct {
dbsLock sync.Mutex
}
var _ filer.BucketAware = (*AbstractSqlStore)(nil)
func (store *AbstractSqlStore) CanDropWholeBucket() bool {
return store.SupportBucketTable
}

View File

@ -18,6 +18,8 @@ const (
CONNECTION_URL_PATTERN = "%s:%s@tcp(%s:%d)/%s?charset=utf8"
)
var _ filer.BucketAware = (*MysqlStore2)(nil)
func init() {
filer.Stores = append(filer.Stores, &MysqlStore2{})
}

View File

@ -17,6 +17,8 @@ const (
CONNECTION_URL_PATTERN = "host=%s port=%d sslmode=%s connect_timeout=30"
)
var _ filer.BucketAware = (*PostgresStore2)(nil)
func init() {
filer.Stores = append(filer.Stores, &PostgresStore2{})
}

View File

@ -320,6 +320,8 @@ func (store *YdbStore) Shutdown() {
_ = store.DB.Close(context.Background())
}
var _ filer.BucketAware = (*YdbStore)(nil)
func (store *YdbStore) CanDropWholeBucket() bool {
return store.SupportBucketTable
}