| From: | Greg Johnson <gregj(at)interprose(dot)com> |
|---|---|
| To: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Multi-Demensional Array Support. |
| Date: | 2005-02-22 17:43:37 |
| Message-ID: | 1109094217.6541.24.camel@watto.interprose.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
I started hacking in multi-dimensional array support into the driver.
However, with the getArray() function I have to return an ArrayList of
ArrayLists (or Object[] of Object[]) instead of the native type Object
[][] for example. I was wondering what you guys/gals thoughts are on the
this?
As an application developer I personally would like to get ArrayLists of
ArrayLists back.
It seems that unless you what to have a whole bunch of nasty "if" logic
that is the only way to implement multi-dimensional arrays cleanly.
Example:
if array_dims==1
returnVal = String[];
if array_dims==2
returnVal = String[][];
else if array_dims==3
returnVal = String[][][];
.. but I am not java guru so if there is a better way let me know.
Also, is there a reason why a regular expression is not used to parse
out the array string returned from postgresql?
Thanks, I hope I can help out!
Greg
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oliver Jowett | 2005-02-22 21:30:50 | Re: Performance tweaks |
| Previous Message | Scott Marlowe | 2005-02-22 17:28:54 | Re: |