Skip to content

Commit

Permalink
Rename sourceConstraints to pathConstraints in function signature
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Jul 3, 2024
1 parent 4d68485 commit 2367637
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ee/katc/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
// that performs the query against the source.
type katcSourceType struct {
name string
dataFunc func(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, sourceConstraints *table.ConstraintList) ([]sourceData, error)
dataFunc func(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, pathConstraints *table.ConstraintList) ([]sourceData, error)
}

// sourceData holds the result of calling `katcSourceType.dataFunc`. It maps the
Expand Down
6 changes: 3 additions & 3 deletions ee/katc/indexeddb_leveldb.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// found at the filepath in `sourcePattern`. It retrieves all rows from the database
// and object store specified in `query`, which it expects to be in the format
// `<db name>.<object store name>`.
func indexeddbLeveldbData(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, sourceConstraints *table.ConstraintList) ([]sourceData, error) {
func indexeddbLeveldbData(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, pathConstraints *table.ConstraintList) ([]sourceData, error) {
results := make([]sourceData, 0)
for _, sourcePath := range sourcePaths {
pathPattern := sourcePatternToGlobbablePattern(sourcePath)
Expand All @@ -32,8 +32,8 @@ func indexeddbLeveldbData(ctx context.Context, slogger *slog.Logger, sourcePaths

// Query databases
for _, db := range leveldbs {
// Check to make sure `db` adheres to sourceConstraints
valid, err := checkPathConstraints(db, sourceConstraints)
// Check to make sure `db` adheres to pathConstraints
valid, err := checkPathConstraints(db, pathConstraints)
if err != nil {
return nil, fmt.Errorf("checking source path constraints: %w", err)
}
Expand Down
6 changes: 3 additions & 3 deletions ee/katc/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

// sqliteData is the dataFunc for sqlite KATC tables
func sqliteData(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, sourceConstraints *table.ConstraintList) ([]sourceData, error) {
func sqliteData(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, pathConstraints *table.ConstraintList) ([]sourceData, error) {
results := make([]sourceData, 0)
for _, sourcePath := range sourcePaths {
pathPattern := sourcePatternToGlobbablePattern(sourcePath)
Expand All @@ -23,8 +23,8 @@ func sqliteData(ctx context.Context, slogger *slog.Logger, sourcePaths []string,
}

for _, sqliteDb := range sqliteDbs {
// Check to make sure `sqliteDb` adheres to sourceConstraints
valid, err := checkPathConstraints(sqliteDb, sourceConstraints)
// Check to make sure `sqliteDb` adheres to pathConstraints
valid, err := checkPathConstraints(sqliteDb, pathConstraints)
if err != nil {
return nil, fmt.Errorf("checking source path constraints: %w", err)
}
Expand Down

0 comments on commit 2367637

Please sign in to comment.