Skip to content

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