Thread: getArray/setArray - desperately need to know how the implementation is done
getArray/setArray - desperately need to know how the implementation is done
From
"Narayan Murthy K S"
Date:
All,
I need to store and retrieve arrays as they are . JDBC 2.0 provides methods getArray/setArray which facilitates this. But i couldn't find out how exactly it is implemented.
ie. if i have arrays like :
int [] , String [].....
how do i actually use the getArray() and setArray() methods to store these .
thanks,
Narayan Murthy
Attachment
Don't know if arrays are handled by the pgsql driver or not, but if not you could always de/serialise the array to/from a blob. t > I need to store and retrieve arrays as they are . JDBC 2.0 provides methods getArray/setArray which facilitates this. Buti couldn't find out how exactly it is implemented.
The reason why i am going for the getArray/setArray methods, is to make use of the Arrays provided by postgres - so that i could use the same in querying an array field. This i think would not be possible if i were to store the array by serializing it. The "pgjdbc2.jar" jdbc driver api that i picked up from the Postgres JDBC site does provide an implementation of the java.sql.Array interface. But i couldn't figure out how exactly i could use this implementation. Infact there is no documentation from the Postgres JDBC site on the usage of these api's. Has someone used these API's, and made use of the Array implementation here. If so please do let me know of its usage. Narayan Murthy. ----- Original Message ----- From: "Toby Doig" <binky@flirble.org> Cc: "pgsql-jdbc" <pgsql-jdbc@postgresql.org> Sent: Tuesday, October 22, 2002 5:37 PM Subject: Re: [JDBC] getArray/setArray - desperately need to know how the > Don't know if arrays are handled by the pgsql driver or not, but if not > you could always de/serialise the array to/from a blob. > > t > > > I need to store and retrieve arrays as they are . JDBC 2.0 provides methods getArray/setArray which facilitates this. But i couldn't find out how exactly it is implemented. > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org