-
Notifications
You must be signed in to change notification settings - Fork 28
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 constraints
format-clause with support for UNIQUE and PRIMARY KEY
#60
Add constraints
format-clause with support for UNIQUE and PRIMARY KEY
#60
Conversation
@drew-patel thanks for submitting this PR! A couple of suggestions:
|
@scimetfoo Thanks for the feedback and suggestions! All the points are clear. I'll ask questions if I'm unsure about anything while working on them. Will get back to you in a few days with the changes. |
aec0ebd
to
fd0f47f
Compare
constraint
with support for unique
constraints
format-clause with support for UNIQUE and PRIMARY KEY
@scimetfoo I have addressed comments 1-3 as described above. I've only implemented the solution for
Thanks! |
fd0f47f
to
eb8dfd1
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.
Looks good. Please add examples to the readme.
eb8dfd1
to
405c25f
Compare
@scimetfoo Please let me know if the examples are sufficient. Thanks again for the review! |
405c25f
to
bb7332f
Compare
Requires `:with-columns` to have its format clause pulled out into its own function so that it can be used with `constraints`. When `constraints` are present, the columns are constructed by the `constraints` formatter so that columns and constraints can be wrapped by the same set of parens.
bb7332f
to
ca0a76c
Compare
Related issue - #15
defhelper
which adds a top-level:constraints
key to the complete-sql-map:with-columns
into its own function so that it can be reused in theconstraints
format-clause method as well:with-columns
to construct the SQL string:constraints
to construct the columns and constraints string wrapped in the same set of parens