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

"Fuller" mode with JOIN keywords on the left of "full" mode's center line #35

Open
derekm opened this issue Oct 2, 2018 · 0 comments
Open

Comments

@derekm
Copy link

derekm commented Oct 2, 2018

C.f.,

    SELECT DISTINCT
           category0_.id AS id1_0_0_,
           segmentati1_.category_id AS category1_9_1_,
           segmentati1_.segmentation_id AS segmenta2_9_1_,
           segmentati2_.id AS id1_8_2_,
           inputtype3_.id AS id1_4_3_,
           operator5_.id AS id1_5_4_,
           configurat6_.key AS key1_1_5_,
           configurat6_.segmentation_id AS segmenta2_1_5_,
           options7_.key AS key1_6_6_,
           ...
      FROM category AS category0_
INNER JOIN segmentation_category AS segmentati1_ ON category0_.id = segmentati1_.category_id
INNER JOIN segmentation AS segmentati2_ ON segmentati1_.segmentation_id = segmentati2_.id
INNER JOIN input_type AS inputtype3_ ON segmentati2_.input_type_id = inputtype3_.id
 LEFT JOIN segmentation_operator AS operators4_ ON segmentati2_.id = operators4_.segmentation_id
 LEFT JOIN operator AS operator5_ ON operators4_.operator_id = operator5_.id
 LEFT JOIN configuration AS configurat6_ ON segmentati2_.id = configurat6_.segmentation_id
 LEFT JOIN option AS options7_ ON segmentati2_.id = options7_.segmentation_id
 LEFT JOIN context AS context8_ ON segmentati2_.context_id = context8_.id
 LEFT JOIN permission AS permission9_ ON segmentati2_.id = permission9_.segmentation_id AND permission9_.mnemonic = '?'
 LEFT JOIN feature AS feature10_ ON segmentati2_.feature_id = feature10_.id
     WHERE category0_.active = true
       AND segmentati2_.active = true
       AND (permission9_.mnemonic IS NULL AND permission9_.segmentation_id IS NULL AND segmentati2_.limited = false OR permission9_.authorized = true)
       AND (feature10_.id IS NULL OR feature10_.active = true AND feature10_.key IN ('?', '?', '?', '?', '?', '?', '?', '?'))
  ORDER BY category0_.ordinality, options7_.display;

vs.

  SELECT DISTINCT
         category0_.id AS id1_0_0_,
         segmentati1_.category_id AS category1_9_1_,
         segmentati1_.segmentation_id AS segmenta2_9_1_,
         segmentati2_.id AS id1_8_2_,
         inputtype3_.id AS id1_4_3_,
         operator5_.id AS id1_5_4_,
         configurat6_.key AS key1_1_5_,
         configurat6_.segmentation_id AS segmenta2_1_5_,
         options7_.key AS key1_6_6_,
         options7_.segmentation_id AS segmenta2_6_6_,
         context8_.id AS id1_2_7_,
         category0_.created_on AS created_2_0_0_,
         category0_.updated_on AS updated_3_0_0_,
         category0_.active AS active4_0_0_,
         category0_.description AS descript5_0_0_,
         category0_.display AS display6_0_0_,
         category0_.key AS key7_0_0_,
         category0_.ordinality AS ordinali8_0_0_,
         segmentati1_.created_on AS created_3_9_1_,
         segmentati1_.updated_on AS updated_4_9_1_,
         segmentati1_.ordinality AS ordinali5_9_1_,
         segmentati1_.category_id AS category1_9_0__,
         segmentati1_.segmentation_id AS segmenta2_9_0__,
         segmentati1_.ordinality AS ordinali5_0__,
         segmentati2_.created_on AS created_2_8_2_,
         segmentati2_.updated_on AS updated_3_8_2_,
         segmentati2_.active AS active4_8_2_,
         segmentati2_.attribute AS attribut5_8_2_,
         segmentati2_.context_id AS context12_8_2_,
         segmentati2_.description AS descript6_8_2_,
         segmentati2_.display AS display7_8_2_,
         segmentati2_.feature_id AS feature13_8_2_,
         segmentati2_.input_type_id AS input_t14_8_2_,
         segmentati2_.key AS key8_8_2_,
         segmentati2_.limited AS limited9_8_2_,
         segmentati2_.options_src AS options10_8_2_,
         segmentati2_.title AS title11_8_2_,
         inputtype3_.created_on AS created_2_4_3_,
         inputtype3_.updated_on AS updated_3_4_3_,
         inputtype3_.active AS active4_4_3_,
         inputtype3_.json_value AS json_val5_4_3_,
         inputtype3_.name AS name6_4_3_,
         operator5_.created_on AS created_2_5_4_,
         operator5_.updated_on AS updated_3_5_4_,
         operator5_.display AS display4_5_4_,
         operator5_.key AS key5_5_4_,
         operators4_.segmentation_id AS segmenta1_10_1__,
         operators4_.operator_id AS operator2_10_1__,
         configurat6_.created_on AS created_3_1_5_,
         configurat6_.updated_on AS updated_4_1_5_,
         configurat6_.bool_value AS bool_val5_1_5_,
         configurat6_.string_value AS string_v6_1_5_,
         configurat6_.segmentation_id AS segmenta2_1_2__,
         configurat6_.key AS key1_1_2__,
         options7_.created_on AS created_3_6_6_,
         options7_.updated_on AS updated_4_6_6_,
         options7_.display AS display5_6_6_,
         options7_.segmentation_id AS segmenta2_6_3__,
         options7_.key AS key1_6_3__,
         context8_.created_on AS created_2_2_7_,
         context8_.updated_on AS updated_3_2_7_,
         context8_.key AS key4_2_7_
    FROM category AS category0_
         INNER JOIN segmentation_category AS segmentati1_ ON category0_.id = segmentati1_.category_id
         INNER JOIN segmentation AS segmentati2_ ON segmentati1_.segmentation_id = segmentati2_.id
         INNER JOIN input_type AS inputtype3_ ON segmentati2_.input_type_id = inputtype3_.id
         LEFT JOIN segmentation_operator AS operators4_ ON segmentati2_.id = operators4_.segmentation_id
         LEFT JOIN operator AS operator5_ ON operators4_.operator_id = operator5_.id
         LEFT JOIN configuration AS configurat6_ ON segmentati2_.id = configurat6_.segmentation_id
         LEFT JOIN option AS options7_ ON segmentati2_.id = options7_.segmentation_id
         LEFT JOIN context AS context8_ ON segmentati2_.context_id = context8_.id
         LEFT JOIN permission AS permission9_ ON segmentati2_.id = permission9_.segmentation_id AND permission9_.mnemonic = '?'
         LEFT JOIN feature AS feature10_ ON segmentati2_.feature_id = feature10_.id
   WHERE category0_.active = true
     AND segmentati2_.active = true
     AND (permission9_.mnemonic IS NULL AND permission9_.segmentation_id IS NULL AND segmentati2_.limited = false OR permission9_.authorized = true)
     AND (feature10_.id IS NULL OR feature10_.active = true AND feature10_.key IN ('?', '?', '?', '?', '?', '?', '?', '?'))
ORDER BY category0_.ordinality, options7_.display;
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

No branches or pull requests

1 participant