Re: [jira] Commented: (CAY-1300) Format queries in QueryLogger

From: Evgeny Ryabitskiy (evgeny.ryabitski..mail.com)
Date: Mon Nov 02 2009 - 05:29:56 EST

  • Next message: Andrus Adamchik: "Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)"

    Yes, I can add joins and some other keywords. Also I can make keywords
    to upper case and some more tunning.
    I am wondering if there is some SQL format standard like Sun
    conventions for Java?
    It will be nice if you point someone to me...

    Evgeny.

    2009/11/2 Andrus Adamchik <andru..bjectstyle.org>:
    > Agreed - a good idea. This is one of those cases were I feel like we need
    > some minimal IoC to be able to manage Cayenne extensions. Until we have it,
    > -Dcayenne.query.formatting is the way to go.
    >
    > Andrus
    >
    > On Nov 2, 2009, at 5:36 AM, Andrey Razumovsky (JIRA) wrote:
    >
    >>
    >>   [
    >> https://issues.apache.org/jira/browse/CAY-1300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772412#action_12772412
    >> ]
    >>
    >> Andrey Razumovsky commented on CAY-1300:
    >> ----------------------------------------
    >>
    >> The idea is excellent. May I suggest that all JOINs are also formatted to
    >> be placed on new line? Some sort of QueryFormatter will also be fine.  Also
    >> using ThreadLocal for setting "isFormatting" property forces to make this
    >> call at any request to format queries. So I think it'll be a good idea to
    >> have some static default value for "isFormatting", set by a static call or
    >> by adding something like "-Dcayenne.query.formatting=true" to command line
    >>
    >>> Format queries in QueryLogger
    >>> -----------------------------
    >>>
    >>>               Key: CAY-1300
    >>>               URL: https://issues.apache.org/jira/browse/CAY-1300
    >>>           Project: Cayenne
    >>>        Issue Type: New Feature
    >>>        Components: Cayenne Core Library
    >>>          Reporter: Evgeny Ryabitskiy
    >>>           Fix For: 3.0
    >>>
    >>>       Attachments: CAY-1300.patch
    >>>
    >>>
    >>> Sometimes it's hard to read queries from Logs when queries are huge.
    >>> It will be nice if user can enable nice query formatting for debug
    >>> purposes.
    >>
    >> --
    >> This message is automatically generated by JIRA.
    >> -
    >> You can reply to this email to add a comment to the issue online.
    >>
    >>
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Nov 02 2009 - 05:30:28 EST