Oracle RAW(16)

Jun 20, 2013 at 12:34 AM
Edited Jun 20, 2013 at 2:23 PM
Hi Martin,
Here I am again :) I am writing a cross-db query tool and your library is key in some of the things I need to do. I have built my own libs in the past but you cover more adapters, so I said what the heck, let's stop reinventing the wheel for a change!

Anyways, I am using the Microsoft Oracle provider and I noticed RAW(16) are returned as plan RAW, without any length or size. I use those to store GUIDs in Oracle and without the size (16) I cannot determine if the column should be considered a BLOB or a GUID. If you look at your select in OracleSchemaReader.cs, you select CHAR_LENGTH. For RAWs the length is in DATA_LENGTH.

OracleDataTypeMapper.cs seems to understand the text "RAW(16)", so I was thinking of returning that from the other SELECT statement (with a case statement or something so that if it's raw and data_length is 16, it returns RAW(16) in the "DATA_TYPE" column, otherwise it keeps RAW).

Any suggestions on how to proceed?
Jun 21, 2013 at 8:37 AM
Try the latest checkin - 27366.
I read both DATA_LENGTH and CHAR_LENGTH. If there is no CHAR_LENGTH (i.e. not a char or varchar type) it uses DATA_LENGTH and puts it into the DataColumn.Length.
When we write a datatype like RAW, the length is now available.
Jun 24, 2013 at 2:23 PM
Hi, I didn't get to trying your new build yet (definitely today or tomorrow) but thanks for the quick fix!
Any chance you could release a new NuGet release as well or you want me to test your fix first (which I am gladly gonna do anyways) ?
Jun 24, 2013 at 7:19 PM
I will do the 1.2.9 release later this week, so you'll have it in a few days. But please test just in case there's any problems - thanks!
Jun 25, 2013 at 12:15 AM
Thanks again, seems to be working fine!
Jun 25, 2013 at 7:00 PM
Pushed out just now. Thanks for the input!