You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If my template is such (which reads very nicely). The {{NotLast}} tags are our extensions, ignore them
SELECT
{{#each Columns}}
[{{Name}}]{{NotLast ","}}
{{/each}}
FROM
[{{Schema}}].[{{Name}}]
WHERE
{{#each PrimaryKeys}}
[{{Name}}] = @{{Alias}}{{NotLast " AND "}}
{{/each}}
The output looks like this (which isn't great)
SELECT
[EmployeeID],
[LastName],
[FirstName],
[Supervisor],
[Age]
FROM
[dbo].[Employee]
WHERE
[EmployeeID] = @EmployeeID
So, I end up having to write my template like this:
SELECT{{#each Columns}}
[{{Name}}]{{NotLast ","}}{{/each}}
FROM
[{{Schema}}].[{{Name}}]
WHERE{{#each PrimaryKeys}}
[{{Name}}] = @{{Alias}}{{NotLast " AND "}}{{/each}}
Which doesn't read a nice as the original to get my output to look this:
SELECT
[EmployeeID],
[LastName],
[FirstName],
[Supervisor],
[Age]
FROM
[dbo].[Employee]
WHERE
[EmployeeID] = @EmployeeID
It would be totally awesome if handlebars realized a line was nothing but a tag such as {{each}} and didn't write out a blank line, that is, the concept of a tag with no output so our templates could be written in a very easy to understand format. The above is just a very simple sample, it gets very ugly once we start throwing in {{If}} tags and many others ...
The text was updated successfully, but these errors were encountered:
For instance:
If my template is such (which reads very nicely). The {{NotLast}} tags are our extensions, ignore them
The output looks like this (which isn't great)
So, I end up having to write my template like this:
Which doesn't read a nice as the original to get my output to look this:
It would be totally awesome if handlebars realized a line was nothing but a tag such as {{each}} and didn't write out a blank line, that is, the concept of a tag with no output so our templates could be written in a very easy to understand format. The above is just a very simple sample, it gets very ugly once we start throwing in {{If}} tags and many others ...
The text was updated successfully, but these errors were encountered: