Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader.GetSourceMigrations() could take SourceMigrationFilters parameter #102

Open
lukaszbudnik opened this issue Mar 10, 2020 · 0 comments

Comments

@lukaszbudnik
Copy link
Owner

Coordinator.GetSourceMigrations(*SourceMigrationFilters) operation accepts optional filters inSourceMigrationFilters struct.

Under the hood it is implemented as getting all source migrations from and then filtering them:

func (c *coordinator) GetSourceMigrations(filters *SourceMigrationFilters) []types.Migration {
	allSourceMigrations := c.loader.GetSourceMigrations()
	filteredMigrations := c.filterMigrations(allSourceMigrations, filters)
	return filteredMigrations
}

The implementation could be improved and the specific loader (disk, AWS S3, Azure Blob Storage) could accept*SourceMigrationFilters and return already filtered results - better performance and faster operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant