Re: Need java.sql.Array impl for PreparedStatement.setArray()
Posted by: Mark Matthews
Date: July 01, 2005 11:11AM

Thomas Mayr wrote:
> Hello Mark Matthews,
>
> Oracle for example provides an implementation for
> the interface java.sql.Array! I'm looking for this
> feature as well. I read the Connector/J
> documentation but I didn't find a hint that the
> result set methods getArray(), updateArray() and
> the PreparedStatement methods setArray are not
> implemented! Where is this missing feature
> documented??
>
> Thanks Thomas.


Thomas,

1) Implementing Array is _optional_ according to the JDBC specification
2) You can determine whether a database supports the Array type through DataBaseMetadata.getTypeInfo().
3) Oracle's implementation is _not_ standards-compliant as far as I can tell (either SQL or JDBC). I interpret the specification as Array being a concrete type, so a driver and/or database that is SQL standard-compliant would see its use in an IN () statement matching a _column_ of the array type, not a list of values (which is how Oracle treats it as far as I know)

I'll make sure we document the fact that we don't implement it, however for _any_ vendor's driver your authoritative source would be DatabaseMetaData.getTypeInfo() _not_ the documentation (for example, with MySQL, support will be there when the server supports it, so whether or not it is supported in the future will depend on what version of the server the driver is connected to).

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.