Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

.setFields with 'exclude' option with an array of fields to exclude #238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oleiba
Copy link

@oleiba oleiba commented May 25, 2016

This is for setFields as part of squel.update() chaining.
This is useful for when I have an object I am working with, which corresponds to some SQL table schema.
Eventually we would want to do:
squel.update().setFields(obj).toString()
but with the option of excluding some fields from obj.
Obviously, we would prefer a more convenient way than creating an object with a subset of fields every time we would want such functionality.
So eventually we would have squel.update().setFields(obj, {exclude: ['some_field']})

@hiddentao
Copy link
Owner

Nice work! But why has the change only been made in the built output and not the source code? Plus, tests are needed for PRs.

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

Successfully merging this pull request may close these issues.

None yet

2 participants