Browse Source

explicit bucket aware declaration

pull/3348/head
chrislu 2 years ago
parent
commit
c93f7ffa44
  1. 2
      weed/filer/abstract_sql/abstract_sql_store.go
  2. 2
      weed/filer/mysql2/mysql2_store.go
  3. 2
      weed/filer/postgres2/postgres2_store.go
  4. 2
      weed/filer/ydb/ydb_store.go

2
weed/filer/abstract_sql/abstract_sql_store.go

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

2
weed/filer/mysql2/mysql2_store.go

@ -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{})
}

2
weed/filer/postgres2/postgres2_store.go

@ -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{})
}

2
weed/filer/ydb/ydb_store.go

@ -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
}

Loading…
Cancel
Save