benlaan / sqlformat

.NET SQL Parser and Formatter Tool and SSMS Plugin
http://sqlformat.benlaan.com
BSD 3-Clause "New" or "Revised" License
73 stars 27 forks source link

Formatting takes a long time (Gave up after an hour) #29

Open meekys opened 7 years ago

meekys commented 7 years ago

Now I can't say I expect this to format "nicely", but it's got to be better than how NHibernate generates it.

exec spexecutesql N' SELECT count(*) as y0 FROM dbo.SomeView this WHERE (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((this.Code = @p0 or this.Code = @p1) or this.Code = @p2) or this.Code = @p3) or this.Code = @p4) or this.Code = @p5) or this.Code = @p6) or this.Code = @p7) or this.Code = @p8) or this.Code = @p9) or this.Code = @p10) or this.Code = @p11) or this.Code = @p12) or this.Code = @p13) or this.Code = @p14) or this.Code = @p15) or this.Code = @p16) or this.Code = @p17) or this.Code = @p18) or this.Code = @p19) or this.Code = @p20) or this.Code = @p21) or this.Code = @p22) or this.Code = @p23) or this.Code = @p24) or this.Code = @p25) or this.Code = @p26) or this.Code = @p27) or this.Code = @p28) or this.Code = @p29) or this.Code = @p30) or this.Code = @p31) or this.Code = @p32) or this.Code = @p33) or this.Code = @p34) or this.Code = @p35) or this.Code = @p36) or this.Code = @p37) or this.Code = @p38) or this.Code = @p39) or this.Code = @p40) or this.Code = @p41) or this.Code = @p42) or this.Code = @p43) or this.Code = @p44) or this.Code = @p45) or this.Code = @p46) or this.Code = @p47) or this.Code = @p48) or this.Code = @p49) or this.Code = @p50) or this.Code = @p51) or this.Code = @p52) or this.Code = @p53) or this.Code = @p54) or this.Code = @p55) or this.Code = @p56) or this.Code = @p57) or this.Code = @p58) or this.Code = @p59) or this.Code = @p60) or this.Code = @p61) or this.Code = @p62) or this.Code = @p63) or this.Code = @p64) or this.Code = @p65) or this.Code = @p66) or this.Code = @p67) or this.Code = @p68) or this.Code = @p69) or this.Code = @p70) or this.Code = @p71) or this.Code = @p72) or this.Code = @p73) or this.Code = @p74) or this.Code = @p75) or this.Code = @p76) or this.Code = @p77) or this.Code = @p78) or this.Code = @p79) or this.Code = @p80) or this.Code = @p81) or this.Code = @p82) or this.Code = @p83) or this.Code = @p84) or this.Code = @p85) or this.Code = @p86) or this.Code = @p87) or this.Code = @p88) or this.Code = @p89) or this.Code = @p90) or this.Code = @p91) or this.Code = @p92) or this.Code = @p93) or this.Code = @p94) or this.Code = @p95) or this.Code = @p96) or this.Code = @p97) or this.Code = @p98) or this.Code = @p99) or this.Code = @p100) or this.Code = @p101) or this.Code = @p102) or this_.Code = @p103)',N'@p0 nvarchar(4000),@p1 nvarchar(4000),@p2 nvarchar(4000),@p3 nvarchar(4000),@p4 nvarchar(4000),@p5 nvarchar(4000),@p6 nvarchar(4000),@p7 nvarchar(4000),@p8 nvarchar(4000),@p9 nvarchar(4000),@p10 nvarchar(4000),@p11 nvarchar(4000),@p12 nvarchar(4000),@p13 nvarchar(4000),@p14 nvarchar(4000),@p15 nvarchar(4000),@p16 nvarchar(4000),@p17 nvarchar(4000),@p18 nvarchar(4000),@p19 nvarchar(4000),@p20 nvarchar(4000),@p21 nvarchar(4000),@p22 nvarchar(4000),@p23 nvarchar(4000),@p24 nvarchar(4000),@p25 nvarchar(4000),@p26 nvarchar(4000),@p27 nvarchar(4000),@p28 nvarchar(4000),@p29 nvarchar(4000),@p30 nvarchar(4000),@p31 nvarchar(4000),@p32 nvarchar(4000),@p33 nvarchar(4000),@p34 nvarchar(4000),@p35 nvarchar(4000),@p36 nvarchar(4000),@p37 nvarchar(4000),@p38 nvarchar(4000),@p39 nvarchar(4000),@p40 nvarchar(4000),@p41 nvarchar(4000),@p42 nvarchar(4000),@p43 nvarchar(4000),@p44 nvarchar(4000),@p45 nvarchar(4000),@p46 nvarchar(4000),@p47 nvarchar(4000),@p48 nvarchar(4000),@p49 nvarchar(4000),@p50 nvarchar(4000),@p51 nvarchar(4000),@p52 nvarchar(4000),@p53 nvarchar(4000),@p54 nvarchar(4000),@p55 nvarchar(4000),@p56 nvarchar(4000),@p57 nvarchar(4000),@p58 nvarchar(4000),@p59 nvarchar(4000),@p60 nvarchar(4000),@p61 nvarchar(4000),@p62 nvarchar(4000),@p63 nvarchar(4000),@p64 nvarchar(4000),@p65 nvarchar(4000),@p66 nvarchar(4000),@p67 nvarchar(4000),@p68 nvarchar(4000),@p69 nvarchar(4000),@p70 nvarchar(4000),@p71 nvarchar(4000),@p72 nvarchar(4000),@p73 nvarchar(4000),@p74 nvarchar(4000),@p75 nvarchar(4000),@p76 nvarchar(4000),@p77 nvarchar(4000),@p78 nvarchar(4000),@p79 nvarchar(4000),@p80 nvarchar(4000),@p81 nvarchar(4000),@p82 nvarchar(4000),@p83 nvarchar(4000),@p84 nvarchar(4000),@p85 nvarchar(4000),@p86 nvarchar(4000),@p87 nvarchar(4000),@p88 nvarchar(4000),@p89 nvarchar(4000),@p90 nvarchar(4000),@p91 nvarchar(4000),@p92 nvarchar(4000),@p93 nvarchar(4000),@p94 nvarchar(4000),@p95 nvarchar(4000),@p96 nvarchar(4000),@p97 nvarchar(4000),@p98 nvarchar(4000),@p99 nvarchar(4000),@p100 nvarchar(4000),@p101 nvarchar(4000),@p102 nvarchar(4000),@p103 nvarchar(4000)',@p0=N'CODE',@p1=N'CODE',@p2=N'CODE',@p3=N'CODE',@p4=N'CODE',@p5=N'CODE',@p6=N'CODE',@p7=N'CODE',@p8=N'CODE',@p9=N'CODE',@p10=N'CODE',@p11=N'CODE',@p12=N'CODE',@p13=N'CODE',@p14=N'CODE',@p15=N'CODE',@p16=N'CODE',@p17=N'CODE',@p18=N'CODE',@p19=N'CODE',@p20=N'CODE',@p21=N'CODE',@p22=N'CODE',@p23=N'CODE',@p24=N'CODE',@p25=N'CODE',@p26=N'CODE',@p27=N'CODE',@p28=N'CODE',@p29=N'CODE',@p30=N'CODE',@p31=N'CODE',@p32=N'CODE',@p33=N'CODE',@p34=N'CODE',@p35=N'CODE',@p36=N'CODE',@p37=N'CODE',@p38=N'CODE',@p39=N'CODE',@p40=N'CODE',@p41=N'CODE',@p42=N'CODE',@p43=N'CODE',@p44=N'CODE',@p45=N'CODE',@p46=N'CODE',@p47=N'CODE',@p48=N'CODE',@p49=N'CODE',@p50=N'CODE',@p51=N'CODE',@p52=N'CODE',@p53=N'CODE',@p54=N'CODE',@p55=N'CODE',@p56=N'CODE',@p57=N'CODE',@p58=N'CODE',@p59=N'CODE',@p60=N'CODE',@p61=N'CODE',@p62=N'CODE',@p63=N'CODE',@p64=N'CODE',@p65=N'CODE',@p66=N'CODE',@p67=N'CODE',@p68=N'CODE',@p69=N'CODE',@p70=N'CODE',@p71=N'CODE',@p72=N'CODE',@p73=N'CODE',@p74=N'CODE',@p75=N'CODE',@p76=N'CODE',@p77=N'CODE',@p78=N'CODE',@p79=N'CODE',@p80=N'CODE',@p81=N'CODE',@p82=N'CODE',@p83=N'CODE',@p84=N'CODE',@p85=N'CODE',@p86=N'CODE',@p87=N'CODE',@p88=N'CODE',@p89=N'CODE',@p90=N'CODE',@p91=N'CODE',@p92=N'CODE',@p93=N'CODE',@p94=N'CODE',@p95=N'CODE',@p96=N'CODE',@p97=N'CODE',@p98=N'CODE',@p99=N'CODE',@p100=N'CODE',@p101=N'CODE',@p102=N'CODE',@p103=N'CODE'