No, because the dialect is not supported. :-)
> The Problem is that we get an "No dialect known for jdbc:oracle"
> message and when I look into the source [1] I see that an Oracle
> Dialect is not implemented.
Nope. Its probably not very difficult to add, based on the PostgreSQL
dialect. Gerrit Code Review uses very little SQL features so it should
be easy to support Oracle.
No triggers. :-)
The only really special thing Gerrit uses is sequence objects... which
Oracle supports. Its syntax for those differs from PostgreSQL when
obtaining the next value. So the dialect has to differ slightly to
handle fetching the next value from the sequence.
My Oracle is rusty, I haven't used an Oracle database since 8i came
out, and I didn't trust myself to write an Oracle dialect strictly
from memory with nothing to test against. So this has to come from the
community. :-)
The same is valid for MaxDB which we had to support at SAP.
> [1] chapter "Update Counts in the Oracle Implementation of Standard
> Batching"). The best way to prevent unwanted exceptions I found, was
> to change the method execute of the class
> com.google.gwtorm.jdbc.JdbcAccess to also accept return state -2. [2]
This was the first thing which a colleague of mine tried. I don't remember
all the details but although it seemed to work it started failing
later with some
scenarios which I can't remember right now.
You can take a look at the change [1] where the gwtorm support for JDBC drivers
returning SUCCESS_NO_INFO is prepared for review.
Actually, it would be great if you also review this change as it is
what you will
also need to easier add Oracle dialect.
[1] https://gerrit-review.googlesource.com/#/c/25647/
> 3. Oracle does not allow identifiers longer than 30 characters for
> columns and other names. The table ACCOUNTS however has two columns
The same issue with MaxDB. Ironically, this was a change from SAP
that introduced these long column names :-(
The best would be to change these field names to something shorter
than 30 characters.
Saša Živkov
I see issue 25647 was merged which should now make the Oracle dialectchanges even simpler. My organization is interested in getting Gerrit towork on Oracle as well. Lars, did you proceed to use your patch locallyand if so, how has it been working?--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
Oracle and PostgreSQL are similar enough from Gerrit's perspective
that one could look at how the PostgreSQL dialect works in gwtorm and
duplicate it for Oracle. I don't have access to an Oracle installation
to test against, but would be willing to do the basic copy and pasting
needed to get it bootstrapped for someone else to test. :-)
On Wed, Jul 10, 2013 at 10:30 PM, David Ostrovsky <david.o...@gmail.com> wrote:
Am Mittwoch, 3. Juli 2013 17:37:12 UTC+2 schrieb Shawn Pearce:done [1], even with running tests ;-)Oracle and PostgreSQL are similar enough from Gerrit's perspective
that one could look at how the PostgreSQL dialect works in gwtorm and
duplicate it for Oracle. I don't have access to an Oracle installation
to test against, but would be willing to do the basic copy and pasting
needed to get it bootstrapped for someone else to test. :-)
I didn't try to run it against Gerrit, will try later.
[1] https://gerrit-review.googlesource.com/47691/Please also take a look at [2]. This is an attempt to make SqlDialectsand DataSourceTypes pluggable so we can support additional databaseswithout having to change the gwtorm and gerrit core.
On Friday, July 12, 2013 1:47:58 PM UTC+2, zivkov wrote:On Wed, Jul 10, 2013 at 10:30 PM, David Ostrovsky <david.o...@gmail.com> wrote:
Am Mittwoch, 3. Juli 2013 17:37:12 UTC+2 schrieb Shawn Pearce:done [1], even with running tests ;-)Oracle and PostgreSQL are similar enough from Gerrit's perspective
that one could look at how the PostgreSQL dialect works in gwtorm and
duplicate it for Oracle. I don't have access to an Oracle installation
to test against, but would be willing to do the basic copy and pasting
needed to get it bootstrapped for someone else to test. :-)
I didn't try to run it against Gerrit, will try later.
[1] https://gerrit-review.googlesource.com/47691/Please also take a look at [2]. This is an attempt to make SqlDialectsand DataSourceTypes pluggable so we can support additional databaseswithout having to change the gwtorm and gerrit core.Thanks. I see your point. I personally think that gwtorm have broader spectrum as to be only theORM layer for Gerrit Review. It was called gwtorm and not gerrit-orm for a reason ;-)
So providing just Gerrit users the ability to use a db from vendor foo (through "proprietary" Gerrit plugins)would unnecessary limit the potential user base of gwtorm. IOW to support more db vendors in gwtormnatively has a value of its own.
Concerning the extension in Gerrit itself, for example for Oracle: 86 lines of code [1] were needed (well,documentation and indexes extra). And no proprietary jars are needed to compile time, only to runtimewhen Oracle is used. So who cares?
In any event for supporting Oracle and MaxDB in Gerrit we first need to migrate the ReviewDB schemato satisfy the identifier length limitation [2]. And for that we need new gwtorm features, like renametable [3] and rename (nested) column [4].
--