#125 provide sybase support

open
nobody
None
5
2008-04-12
2008-04-12
PatL
No

Tha attached patch is a basic first pass at Sybase support, more features in time. For now, tables, views, procs, primary, foreign keys and triggers are supported fine. Transact SQL is supported in the query viewer and a fairly 'agricultural' patch to the dmlsql2lexer provides a short term fix to at least make it not bark on transact sql code (although I haven't patched the grammer, just the output file). Further work's needed to support query plans, user defined datatypes and display of multiple resultsets from a single procedure call.

Discussion

  • PatL

    PatL - 2008-04-12
     
  • Julen Parra

    Julen Parra - 2008-04-14

    Logged In: YES
    user_id=180901
    Originator: NO

    OK, I have reviewed this patch and all seems OK, so I have applied it. Of course the patch to the dmlsql2lexer is rather fragile, and can be overwritten at any moment, but I have applied it anyway. Also, your parse() method gives an error, as the base parse() is static.

    I installed a Sybase server to test, and saw that many things worked, but the parse() error stopped my tests short.

     
  • Julen Parra

    Julen Parra - 2008-04-14

    Logged In: YES
    user_id=180901
    Originator: NO

    I hit the Submit button in haste. I wanted to thank you for your contributions :o)

     
  • PatL

    PatL - 2008-04-14

    Logged In: YES
    user_id=2049134
    Originator: YES

    Hi,

    Yes, I know there's an issue with the static parse method. That's why one of the other patches I submitted, 1941004, made the SQLLexx parse method non-static. The problem is that as its static, there's no way of overiding it in a subclass. I'm happy to accept any solution you'd prefer though, but the problem is that the base SQLLexx class doesn't support transact-sql so the only obvious soultion I could see was to subclass it. I was a bit wary of making it a singleton though as it seemed safer to initially let multiple SQLLexx objects exist and then lock it down to a singleton rather than the other way around.

    Regards,

    Pat.

     
  • Julen Parra

    Julen Parra - 2008-04-15

    Logged In: YES
    user_id=180901
    Originator: NO

    The lexer patch is also in CVS. I did some caching of the lexer, as there is one call to the lexer for each keystroke.

    Good vibes.

     
  • Julen Parra

    Julen Parra - 2008-04-16

    Logged In: YES
    user_id=180901
    Originator: NO

    I have also, just now, changed the isExplainSupported() in the Sybase adapter. In fact, that function should not be overridden, so I also made it final in DatabaseAdapter. If you wanted to avoid calling the statement explainer, just redefine the getStatementExplainer to return null.

    Good vibes.

     

Log in to post a comment.