Hello,
Since I needed it and it was not yet implemented I added the sequence collection for Oracle.
Unfortunately I was unable to find how I can connect a sequence to a catalog and a schema (if it can be at all) so those fields are left empty.
Pull request is available on GitHub as usual.
Cheers!
GetSequence metadata for Oracle
Moderators: gto, cipto_kh, EgonHugeist, mdaems
GetSequence metadata for Oracle
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Re: GetSequence metadata for Oracle
I may be misunderstanding, but for Oracle catalog should be empty and schema should be the SEQUENCE_OWNER column of ALL_SEQUENCES.
Also in the pull request is the following incorrect?
to my eye it looks like it should be:
Good job on the new feature!
-Mark
Also in the pull request is the following incorrect?
Code: Select all
if FConSettings.ClientCodePage.Encoding = ceUTF16 then begin
Result.UpdatePAnsiChar(SequenceNameIndex, GetPAnsiChar(SEQ_NAME_INDEX, Len), Len);
end else begin
Result.UpdatePWideChar(SequenceNameIndex, GetPWideChar(SEQ_NAME_INDEX, Len), Len);
end;
Code: Select all
if FConSettings.ClientCodePage.Encoding = ceUTF16 then begin
Result.UpdatePWideChar(SequenceNameIndex, GetPWideChar(SEQ_NAME_INDEX, Len), Len);
end else begin
Result.UpdatePAnsiChar(SequenceNameIndex, GetPAnsiChar(SEQ_NAME_INDEX, Len), Len);
end;
-Mark
Re: GetSequence metadata for Oracle
I started my journey with MySQL and MSSQL and things were a lot more easy to understand there. I will be completely honest, I am totally lost in this Oracle naming madness... as I have no idea what these mean I thought better to leave them empty :)
The filling is the carbon copy of how UncachedGetIndexInfo does it. Tested it in both AL32UTF8 and UTF16 and while all worked fine - there were absolutely no special characters in our sequence names so I simply might have gotten away with it.
If it is bugged this way, it has to be changed there too.
You might be right though as it is the other way around in all other methods...
I'll make some adjustments based on these in a second commit soon, thank you for the heads-up!
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47