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

feat: Add 'concat' method as immutable alternative to 'append' #72

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cassiozen
Copy link

Useful for reusing a base query with multiple different appended statements:

Example:

const baseQuery = SQL`SELECT * FROM books`;

app.get("/", (req, res) => {
  const query = baseQuery.concat(SQL` WHERE id = ${req.params.id}`);
  // Some response
});

References #71

@codecov
Copy link

codecov bot commented Jan 10, 2018

Codecov Report

Merging #72 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master    #72   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines          35     47   +12     
  Branches        6      9    +3     
=====================================
+ Hits           35     47   +12
Impacted Files Coverage Δ
index.js 100% <100%> (ø) ⬆️

@cassiozen cassiozen mentioned this pull request Jan 10, 2018
@skyjur
Copy link

skyjur commented Apr 29, 2018

May I suggest alternative solution #79

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

Successfully merging this pull request may close these issues.

2 participants