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

[WIP] Control indenting in SQL generated #15314

Closed
wants to merge 1 commit into from

Conversation

krzycho1024
Copy link

Fixes aspnet#15256

@dnfclas
Copy link

dnfclas commented Apr 10, 2019

CLA assistant check
All CLA requirements met.

@@ -116,8 +117,14 @@ public virtual IndentedStringBuilder AppendLines([NotNull] object o, bool skipFi

if (line.Length != 0)
{
if (isSql)
{
_indentPending = quoteCount % 2 != 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels error-prone to me. Let me think about it some more...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifiers can contain quotes. We're going to need to rely on stronger semantics than just counting quotes.

CREATE TABLE [Patient] (
    [Id] int NOT NULL PRIMARY KEY,
    [Can't eat] bit NOT NULL,
    [Can't sleep] bit NOT NULL
);

@bricelam bricelam changed the title Control indenting in SQL generated [WIP] Control indenting in SQL generated Aug 13, 2019
@bricelam bricelam closed this Oct 9, 2019
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.

3 participants