node-sql-template-strings
node-sql-template-strings copied to clipboard
feat: Add 'concat' method as immutable alternative to 'append'
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 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%> (ΓΈ) |
:arrow_up: |
May I suggest alternative solution https://github.com/felixfbecker/node-sql-template-strings/pull/79