Re: Pre-processing during build

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: Markus KARG <markus(at)headcrashing(dot)eu>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Pre-processing during build
Date: 2015-06-18 21:26:32
Message-ID: CAB=Je-HzC+O=O8DJ2sJWMySePBbLNRO_i+Lhd_JVA1G+tvRLqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Markus KARG 2015-06-18 21:28:42 Re: Pre-processing during build
Previous Message Markus KARG 2015-06-18 21:15:04 Re: Pre-processing during build