-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add update subpath #107
base: main
Are you sure you want to change the base?
Add update subpath #107
Conversation
e2e79fa
to
833371b
Compare
833371b
to
da48712
Compare
2f10bb4
to
9ad8784
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
29a2f4e
to
2ee54aa
Compare
subpathsPredicate := "" | ||
if len(qb.objectQuery.Subpaths) > 0 { | ||
subpathsPredicate = "AND o.path LIKE ALL(__subpaths__::text[])" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this option isn't mutually exclusive with ignores
right -- you could use both at once? And we'll just let PG decide which conditions to use the index for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use both at once, ignoring a subset of the files under the subpaths. I initially wanted to use it like (haskell's lens)[https://github.com/ekmett/lens/wiki/Overview] functionality where the subpaths focus you on a specific set of the project and let you manipulate just that. With that in mind I thought keeping the ignores made sense.
Adding a
subpath
to object queries. This is similar to kuberentes' subpath construct for volume mounts where a subpath can be used to specify a particular directory within the volume to mount. The same idea applies here where a set subpath prefixes can be used to narrow down the query to rebuild or update just the objects in the selected subpath and not the whole project.