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

Good use of the template literal plug for SQL #28

Open
cemalokten opened this issue Oct 8, 2021 · 0 comments
Open

Good use of the template literal plug for SQL #28

cemalokten opened this issue Oct 8, 2021 · 0 comments

Comments

@cemalokten
Copy link

Like how you used the plugin along with /* SQL */ to increase readability

const queryStr = /* sql */ `
    SELECT
      place.place_name,
      place.postcode,
      place.rating,
      users.username,
      reviews.review
    FROM place
    LEFT JOIN reviews
      ON reviews.place_id = place.place_id
    LEFT JOIN users
      ON reviews.author_id = users.author_id
  `;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant