Rename Exclude -> Blacklist

This commit is contained in:
Aaron L 2016-09-08 22:41:57 -07:00
commit 16b6a2b176
10 changed files with 40 additions and 41 deletions

View file

@ -6,7 +6,7 @@ import "github.com/pkg/errors"
// Interface for a database driver. Functionality required to support a specific
// database type (eg, MySQL, Postgres etc.)
type Interface interface {
TableNames(schema string, whitelist, exclude []string) ([]string, error)
TableNames(schema string, whitelist, blacklist []string) ([]string, error)
Columns(schema, tableName string) ([]Column, error)
PrimaryKeyInfo(schema, tableName string) (*PrimaryKey, error)
ForeignKeyInfo(schema, tableName string) ([]ForeignKey, error)
@ -25,11 +25,11 @@ type Interface interface {
}
// Tables returns the metadata for all tables, minus the tables
// specified in the exclude slice.
func Tables(db Interface, schema string, whitelist, exclude []string) ([]Table, error) {
// specified in the blacklist.
func Tables(db Interface, schema string, whitelist, blacklist []string) ([]Table, error) {
var err error
names, err := db.TableNames(schema, whitelist, exclude)
names, err := db.TableNames(schema, whitelist, blacklist)
if err != nil {
return nil, errors.Wrap(err, "unable to get table names")
}