Re: Pre-processing during build - Mailing list pgsql-jdbc

From Vladimir Sitnikov
Subject Re: Pre-processing during build
Date
Msg-id CAB=Je-HzC+O=O8DJ2sJWMySePBbLNRO_i+Lhd_JVA1G+tvRLqA@mail.gmail.com
Whole thread Raw
In response to Re: Pre-processing during build  ("Markus KARG" <markus@headcrashing.eu>)
List pgsql-jdbc
> Look at this https://gist.github.com/mkarg/0da7f7dce8d9025511bb please.

Markus,

Your example here does not apply for JDBC driver for the reason
highlighted by Christopher: <<"javac" will complain that (for your
pre-Java-8 drivers) you haven't implemented everything>>.

The problem is _both_ I7 and I8 should be the same interface (they
both should be `java.sql.PreparedStatement`).

We do want to have "PS7 implements java.sql.PreparedStatement" _and_
"PS8 implements java.sql.PreparedStatement".
Can you please show how are you going to cover that?

If we leave "PS7 implements java.sql.PreparedStatement", then javac
would blame us for "not implementing enough methods".

Are you suggesting to use Proxy for all the JDBC interfaces
(Statement, ResultSet, etc, etc)?
I'm afraid that would hit the performance wall.

Well, I thought we have already settled that `java.lang.reflect.Proxy`
is good enough for `Driver`.
However, I do not like the idea of using j.l.r for ResultSet.

Vladimir


pgsql-jdbc by date:

Previous
From: "Markus KARG"
Date:
Subject: Re: Pre-processing during build
Next
From: "Markus KARG"
Date:
Subject: Re: Pre-processing during build