issue - placeWhereConditionOnNewLine doesn't work with "WHERE Match" (graph tables)

missing line break between Where and MATCH

formatted sql

<div>Select</div><div>&nbsp;&nbsp;&nbsp;&nbsp;Object1.[RepoObject_fullname]&nbsp;As&nbsp;ReferencingObjectName</div><div>&nbsp;&nbsp;,&nbsp;Object1.[RepoObject_type]</div><div>&nbsp;&nbsp;,&nbsp;Object2.[RepoObject_fullname]&nbsp;As&nbsp;ReferencedObjectName</div><div>&nbsp;&nbsp;,&nbsp;Object2.[RepoObject_type]</div><div>--,&nbsp;Object1.[RepoObject_guid]</div><div>--,&nbsp;Object2.[RepoObject_guid]</div><div>From</div><div>&nbsp;&nbsp;&nbsp;&nbsp;[graph].[RepoObject]&nbsp;As&nbsp;Object1</div><div>&nbsp;&nbsp;,&nbsp;[graph].[ReferencedObject]&nbsp;As&nbsp;referenced</div><div>&nbsp;&nbsp;,&nbsp;[graph].[RepoObject]&nbsp;As&nbsp;Object2</div><div><b>Where&nbsp;MATCH(</b></div><div>&nbsp;&nbsp;&nbsp;&nbsp;Object1-(referenced)->Object2)</div><div>&nbsp;&nbsp;&nbsp;&nbsp;And&nbsp;Object1.[RepoObject_type]&nbsp;In&nbsp;(&nbsp;'u',&nbsp;'v'&nbsp;)</div><div>&nbsp;&nbsp;&nbsp;&nbsp;And&nbsp;Object2.[RepoObject_type]&nbsp;In&nbsp;(&nbsp;'u',&nbsp;'v'&nbsp;)</div><div>Order&nbsp;By</div><div>&nbsp;&nbsp;&nbsp;&nbsp;Object1.[RepoObject_fullname]</div><div>&nbsp;&nbsp;,&nbsp;Object2.[RepoObject_fullname]<br></div>

options are

<div>&nbsp;&nbsp;"dml":&nbsp;{</div><div>&nbsp;&nbsp;&nbsp;&nbsp;"clauses":&nbsp;{},</div><div>&nbsp;&nbsp;&nbsp;&nbsp;"listItems":&nbsp;{},</div><div>&nbsp;&nbsp;&nbsp;&nbsp;"addNewLineAfterDistinctAndTopClauses":&nbsp;true,</div><div>&nbsp;&nbsp;&nbsp;&nbsp;"collapseStatementsShorterThan":&nbsp;75,</div><div>&nbsp;&nbsp;&nbsp;&nbsp;"collapseShortSubqueries":&nbsp;true,</div><div>&nbsp;&nbsp;&nbsp;&nbsp;"collapseSubqueriesShorterThan":&nbsp;75,</div><div>&nbsp;&nbsp;&nbsp;&nbsp;"listItems":&nbsp;{</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placeGroupByAndOrderByOnNewLine":&nbsp;"always",</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placeFromTableOnNewLine":&nbsp;"always",</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>"placeWhereConditionOnNewLine":&nbsp;"always"</b></div><div>&nbsp;&nbsp;&nbsp;&nbsp;}</div><div>&nbsp;&nbsp;},</div>
Tagged:

Answers

  • aisbergaisberg Posts: 15 Bronze 1
    the post is not shown as in the editor, I try again:

      "dml": {
        "clauses": {},
        "listItems": {},
        "addNewLineAfterDistinctAndTopClauses": true,
        "collapseStatementsShorterThan": 75,
        "collapseShortSubqueries": true,
        "collapseSubqueriesShorterThan": 75,
        "listItems": {
          "placeGroupByAndOrderByOnNewLine": "always",
          "placeFromTableOnNewLine": "always",
          "placeWhereConditionOnNewLine": "always"
        }
      },

    Select
        Object1.[RepoObject_fullname] As ReferencingObjectName
      , Object1.[RepoObject_type]
      , Object2.[RepoObject_fullname] As ReferencedObjectName
      , Object2.[RepoObject_type]
    --, Object1.[RepoObject_guid]
    --, Object2.[RepoObject_guid]
    From
        [graph].[RepoObject] As Object1
      , [graph].[ReferencedObject] As referenced
      , [graph].[RepoObject] As Object2
    Where MATCH(
        Object1-(referenced)->Object2)
        And Object1.[RepoObject_type] In ( 'u', 'v' )
        And Object2.[RepoObject_type] In ( 'u', 'v' )
    Order By
        Object1.[RepoObject_fullname]
      , Object2.[RepoObject_fullname]

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file