Sybase ASE Support

87 views
Skip to first unread message

psevestre

unread,
Aug 21, 2011, 11:45:28 PM8/21/11
to jOOQ User Group
Hi,

I'm currently evaluating jOOQ for a number of projects for the
organization I consultt for but it seems that its support for Sybase
actualy aplies to Sybase Anywhere. Are there any plans to support
Sybase ASE in the horizon ?

From what I could see in the source code, the generator expects to
find schema information in some "standard" tables, but ASE does not
support those tables. Instead, one usually uses the system proc
"sp_help" in order to gather schema information.

In such scenario, which steps should I follow in order to support a
new database dialect ?


Regards,

Philippe

Lukas Eder

unread,
Aug 22, 2011, 2:08:35 AM8/22/11
to jooq...@googlegroups.com
Hello Philippe,

Thanks for considering jOOQ. As you mentioned, jOOQ currently supports
Sybase SQL Anywhere 12 as documented on the home page. There had
currently not been any plans to also support Sybase Adaptive Server
Enterprise as there had not been any need by jOOQ users, so far. The
SQL Anywhere support was contributed by Espen Stromsnes who also has
professional experience with Sybase. I will put support for Sybase ASE
on the roadmap:
https://sourceforge.net/apps/trac/jooq/ticket/800

If you wish to implement Sybase ASE support early, these are the steps
you may want to consider:
https://sourceforge.net/apps/trac/jooq/wiki/Contribute#Hints

You can get some inspiration from the
org.jooq.util.sqlite.SQLiteDatabase implementation. SQLite does not
have any dictionary tables either (or "standard" tables as you called
them). Instead, it provides a stored function returning a result set
holding table/column/key information. That sounds similar to your
"sp_help" procedure.

As with SQLite, the most important data you should gather is about
tables and primary keys. Once you have that, you can already get
started with jOOQ. The second thing to do is to adapt dialect
integration in jOOQ's core classes. I'm not sure if Sybase ASE and
Sybase SQL Anywhere have the same SQL dialect. Usually, a new dialect
needs an average of around 10 dialect "tweaks", when advanced SQL is
involved (nested selects, limits, etc). I can further assist you, when
you get this far.

If you provide me with some information how to set up a free
developer's license of Sybase ASE, I can also increase the priority of
officially supporting Sybase ASE in jOOQ, and take your contribution
into consideration.

Cheers
Lukas

2011/8/22 psevestre <psev...@gmail.com>:

Philippe Sevestre

unread,
Aug 23, 2011, 10:21:37 AM8/23/11
to jooq...@googlegroups.com
Hi Lukas,

Thanks for your answer. 

I'll take a look at the suggested dialect and see if I can adapt it to ASE.
As for the development edition for Sybase, you can download a trial version in the following link:



Regards,

Philippe.

Lukas Eder

unread,
Aug 23, 2011, 3:36:55 PM8/23/11
to jooq...@googlegroups.com
Thank you Philippe. I will have a look at it some time next week.

Cheers
Lukas

2011/8/23 Philippe Sevestre <ph...@lighthouse.com.br>:

Lukas Eder

unread,
Sep 4, 2011, 9:46:27 AM9/4/11
to jooq...@googlegroups.com, psev...@gmail.com
Hi Philippe,

I have had some time to take a look into Sybase ASE. Generating tables
and columns seems easy using "sp_help", although selecting data from
sysobjects and syscolumns seems even more useful, as documented here:

http://stackoverflow.com/questions/1429898/from-a-sybase-database-how-i-can-get-table-description-field-names-and-types

However, I'm still having some trouble in discovering primary / unique
keys. I raised an issue here.

http://stackoverflow.com/questions/7299550/discover-primary-unique-keys-in-sybase-ase

Once this is done, I can realise basic Sybase ASE support in a first
step. Stored procedure support in a second step.
Have you had some success with your own attempts at looking into a contribution?

Cheers
Lukas

2011/8/22 psevestre <psev...@gmail.com>:

Lukas Eder

unread,
Sep 12, 2011, 2:30:52 PM9/12/11
to jooq...@googlegroups.com, psev...@gmail.com
Hello,

Most issues had been resolved and Sybase ASE is now officially
supported with jOOQ 1.6.6

Cheers
Lukas

Reply all
Reply to author
Forward
0 new messages