dev@glassfish.java.net

Re: What are unused ExpressionOperators good for?

From: Tom Ware <tom.ware_at_oracle.com>
Date: Mon, 08 Jan 2007 10:39:11 -0500

Hi Markus,

  In general, TopLink users are expected to have some knowledge of which
functions their chosen database supports. As a result, both the
Expression and ExpressionOperator class contain implementations of
functions that are not available on all databases.

  In general, we support as many of the functions as possible on each
platform. To get an idea of where we have spent the most effort doing
that, you can have a look at the following page. It provides a list of
the cerified databases for the non-open source TopLink product. The
DatabasePlatforms in Essentials are for the most part, the same as the
ones used to support the functionality on this list.

http://www.oracle.com/technology/products/ias/toplink/technical/support/database1013.html

  For the non-certified databases, we also, try to support as much as
possible, but the testing has not been as extensive.

  SQLAnywhere is on the non-certified list. As a result, the
expectation, is that we should cover as much as possible but a
reasonable list to start with would be as many as possible of the
functions initialized in
DatasourcePlatform.initializePlatformOperators() and in
ExpressionOperator.initializeOperators(). There are probably one or two
there that you will not be able to support (LeftTrim2 for instance), but
it is a good list to start with.

  We have some internal tests that test expressions (we would like to
move them to the Open source project, but have not been able to do that
yet). When you have completed your DatabasePlatform, I will run it
through those tests and provide you some feedback about the results. At
that point, we can decide whether there is anything missing.

  I realize, this is not quite as concrete an answer as you are likely
looking for, but hopefully it helps.

-Tom

Markus KARG wrote:

>As I was implementing SQLAnywhere platform I have seen that
>ExpressionOperator provides several factory methods like "reverse()".
>"reverse()" in fact is not instantiated inside of
>"DatabasePlatform.initializePlatformOperators()", but only from
>"SQLServer.initializePlatformOperators()" and
>"SybasePlatform.initializePlatformOperators()". So I am wondering how
>this mechanism works. Is this an optional operator that I CAN implement
>(while not beeing forced to)? What is the correct "implementation
>politics" for a platform? Actually SQLAnywhere has a REVERSE function,
>so I could implement it easily. On the other hand, what is the benefit
>of implementing it (the tests do not complain about me not having
>implemented it)?
>
>Can you please explain this?
>
>Thanks a lot
>Markus
>
>