Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > ORM Profiler Section > Bugs & Issues> pretty printing disabled
 

Pages: 1
Bugs & Issues
pretty printing disabled
Page:1/1 

  Print all messages in this thread  
Poster Message
waynebrantley
User



Location:
USA
Joined on:
27-Oct-2015 19:29:08
Posted:
3 posts
# Posted on: 27-Oct-2015 19:38:42.  
I get this in OrmProfiler.

/* SQL Statement pretty printing disabled for this query due to parser limitations. */

I am using the SQL2012 compatibility level.
Any query that does a skip/take which results in a
Code:
OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY

being added to the query gives that result.

I imagine this is because the OrmProfiler parser is not aware of this new SQL language that LLBLGen produces.

Any chance there would be an update to fix this?
  Top
Otis
ORM Profiler Team



Location:
The Hague, The Netherlands
Joined on:
22-Aug-2011 10:26:38
Posted:
613 posts
# Posted on: 28-Oct-2015 09:14:53.  
We indeed rely on guduparser to be able to parse the statements to beautify the query. Sadly they don't update the .NET version that often (if at all), it's not updated with 2012 syntax. Same thing happens with e.g. postgresql, where the .NET version lags behind considerably on the java version of the parser. So if an error is detected by the parser because it runs into a statement it doesn't recognize, we fall back to this: display a comment and the query as-is.

To my knowledge there's no sql parser available that can deal with statements of all databases, gudu was the 'best' we could find.


Frans Bouma
ORM Profiler / LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
waynebrantley
User



Location:
USA
Joined on:
27-Oct-2015 19:29:08
Posted:
3 posts
# Posted on: 13-Nov-2015 15:34:51.  
Well, now that we are in 2012 mode, most all our queries fall into this problem.
It looks like they added support for this back in May (to at least oracle, which has same basic format) and their library was updated on 08/19/2015.

Being the build of OrmProfiler is from just over 2 years ago, I am thinking perhaps they do now support this syntax.

Would it be possible for you to check with them or to do an update of your dependency and see if it will now work? Really like this feature of OrmProfiler and hate to just see it disappear.
  Top
Otis
ORM Profiler Team



Location:
The Hague, The Netherlands
Joined on:
22-Aug-2011 10:26:38
Posted:
613 posts
# Posted on: 14-Nov-2015 09:59:50.  
waynebrantley wrote:
Well, now that we are in 2012 mode, most all our queries fall into this problem.
It looks like they added support for this back in May (to at least oracle, which has same basic format) and their library was updated on 08/19/2015.

I checked, but apparently not good enough. I see in the .net changelogs:
Quote:
version 2.6.4(2015-05-29)
* [format option] add new option: analyticFunctionInNewline, default is true.
set to false make over clause at the same line with main function.

* [SQL Server] support offset/fetch clause in order by clause.

So they did add it. Problem is, our subscription is over and they increased the price tenfold, plus they now require a distribution license (before, they didn't), so we're talking 1900,= As we only use it for pretty printing, I find that a little ... steep Regular Smiley

Quote:
Being the build of OrmProfiler is from just over 2 years ago, I am thinking perhaps they do now support this syntax.

Would it be possible for you to check with them or to do an update of your dependency and see if it will now work? Really like this feature of OrmProfiler and hate to just see it disappear.

Yeah me too... Thing is: the tool is feature complete, but is aging. The UI shows it's age though the features themselves work fine. It's a bit of a problem: updating it will solely be about the UI and is that really worth the effort, I don't know. We have to think about it. It's not that it's been discontinued (as it works fine and is a great helper), we've to think about what we'll do with it, i.e. ship it for free with llblgen, integrate it there or otherwise.

(edit) I now do recall the SyntaxEditor we use has sql parsing as well. Not sure we can leverage that (as in, grab the AST, use visitors to pretty print it), but it could be a solution. Not short term though...


Frans Bouma
ORM Profiler / LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
waynebrantley
User



Location:
USA
Joined on:
27-Oct-2015 19:29:08
Posted:
3 posts
# Posted on: 15-Nov-2015 21:48:05.  
I understand all your constraints and thoughts.
(Heck, I would even take a solution that removed that SQL from the statement, let it pretty print it - and then put that back in. It is simple syntax and always at the end...)

Thanks for considering this upgrade.

BTW, I do not consider it feature complete...as I wanted to be able to use it to a remote machine (have the trace info go over TCP/IP) Laugh
  Top
Otis
ORM Profiler Team



Location:
The Hague, The Netherlands
Joined on:
22-Aug-2011 10:26:38
Posted:
613 posts
# Posted on: 19-Nov-2015 11:56:25.  
Regular Smiley That's indeed a nice feature, the problem with it is that it's a security risk as well. So it has to be very secure to profile data on a remote system. The current serialization of data we're using is not suitable for compact distribution, we have to move to protobuf for that so these 2 combined is a serious change, and especially the security aspect of it is something I don't want to handle right now as the last thing I want is a customer system's being hacked because someone hacked the profiler port or intercepted the stream.

Frans Bouma
ORM Profiler / LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
Mihies
User



Location:
Nova Gorica, Slovenia
Joined on:
08-Oct-2012 18:35:02
Posted:
20 posts
# Posted on: 25-Mar-2016 13:40:58.  
Just to chime in.
I'm seeing disabled with PostgreSQL as well.

Can you at least word wrap text in such cases? Otherwise I get a really long line.
Miha Markic [MVP C#, INETA Country Leader for Slovenia, LLBLGenPro Partner, DXSquad, Friend of Red Gate]
Blog:http://blog.rthand.com/
Righthand .net consulting and software development
http://www.rthand.com/
 
Top
Otis
ORM Profiler Team



Location:
The Hague, The Netherlands
Joined on:
22-Aug-2011 10:26:38
Posted:
613 posts
# Posted on: 25-Mar-2016 14:42:39.  
Mihies wrote:
Just to chime in.
I'm seeing disabled with PostgreSQL as well.

Can you at least word wrap text in such cases? Otherwise I get a really long line.


Please download the latest build, as some is done about this, but not everything (as the parser lacks support)


Frans Bouma
ORM Profiler / LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
Mihies
User



Location:
Nova Gorica, Slovenia
Joined on:
08-Oct-2012 18:35:02
Posted:
20 posts
# Posted on: 25-Mar-2016 14:44:15.  
I did it right today. July 15th, 2015? Or is there a newer one?
Miha Markic [MVP C#, INETA Country Leader for Slovenia, LLBLGenPro Partner, DXSquad, Friend of Red Gate]
Blog:http://blog.rthand.com/
Righthand .net consulting and software development
http://www.rthand.com/
 
Top
Otis
ORM Profiler Team



Location:
The Hague, The Netherlands
Joined on:
22-Aug-2011 10:26:38
Posted:
613 posts
# Posted on: 25-Mar-2016 14:49:12.  
No that's the latest. Make sure 'wordwrap' is set to true in the preferences (file-> preferences). Other than that, it's what it is...

Frans Bouma
ORM Profiler / LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
Mihies
User



Location:
Nova Gorica, Slovenia
Joined on:
08-Oct-2012 18:35:02
Posted:
20 posts
# Posted on: 25-Mar-2016 14:51:56.  
Ah, missed that property. I guess it should do the trick.

The funny things is that I might know what caused bad formatting in first place.
Derived models projection was the culprit I htink. Once the projection is removed and "normal" query is used I don't see bad formatting anymore.
Miha Markic [MVP C#, INETA Country Leader for Slovenia, LLBLGenPro Partner, DXSquad, Friend of Red Gate]
Blog:http://blog.rthand.com/
Righthand .net consulting and software development
http://www.rthand.com/
 
Top
Otis
ORM Profiler Team



Location:
The Hague, The Netherlands
Joined on:
22-Aug-2011 10:26:38
Posted:
613 posts
# Posted on: 25-Mar-2016 14:56:45.  
Hmm. what is the difference in sql, if I may ask? Does it say 'due to an error' or something? The sql parser is a bit flaky if the query isn't oracle/sqlserver Dissapointed

Frans Bouma
ORM Profiler / LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
Mihies
User



Location:
Nova Gorica, Slovenia
Joined on:
08-Oct-2012 18:35:02
Posted:
20 posts
# Posted on: 25-Mar-2016 15:04:25.  
It was just displaying the standard /** ... formating disabled ... **/ message below one really long line Regular Smiley

I can get you the sql text if you want to
I can't reproduce it anymore. Go figure. If it happens again, I'll post the sql text here.
Miha Markic [MVP C#, INETA Country Leader for Slovenia, LLBLGenPro Partner, DXSquad, Friend of Red Gate]
Blog:http://blog.rthand.com/
Righthand .net consulting and software development
http://www.rthand.com/
 
Top
Otis
ORM Profiler Team



Location:
The Hague, The Netherlands
Joined on:
22-Aug-2011 10:26:38
Posted:
613 posts
# Posted on: 25-Mar-2016 15:06:28.  
Ok, anyway, the parser keeled over so the manual formatting took over. Whatever made the parser crash, I can't fix that, sadly... Dissapointed

Frans Bouma
ORM Profiler / LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
Mihies
User



Location:
Nova Gorica, Slovenia
Joined on:
08-Oct-2012 18:35:02
Posted:
20 posts
# Posted on: 25-Mar-2016 15:08:46.  
Otis wrote:
Ok, anyway, the parser keeled over so the manual formatting took over. Whatever made the parser crash, I can't fix that, sadly... Dissapointed


Sure, thanks.
Miha Markic [MVP C#, INETA Country Leader for Slovenia, LLBLGenPro Partner, DXSquad, Friend of Red Gate]
Blog:http://blog.rthand.com/
Righthand .net consulting and software development
http://www.rthand.com/
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.09082011 Final.