Firebird and SupportsMixedCaseIdentifiers

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
MJFShark
Expert Boarder
Expert Boarder
Posts: 211
Joined: 04.06.2020, 13:59

Firebird and SupportsMixedCaseIdentifiers

Post by MJFShark »

Currently Firebird returns True for SupportsMixedCaseIdentifiers, but I *think* it should be false? Btw, thanks Jan for your recent updates on using Firebird embedded. I had been meaning to look into this for an internal project and your wiki page helped (although I'm just on windows for it.)

-Mark
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: Firebird and SupportsMixedCaseIdentifiers

Post by marsupilami »

Hello Mark,

Firebird does support mixed case identifiers. >select * from "table1"< is not the same as >select * from "TABLE1"< which is different from >select * from "TaBlE1". This is why I changed the Interbase/Firebird driver to return True for SupportsMixedCaseIdentifiers.
MJFShark wrote: 15.06.2021, 22:00 I had been meaning to look into this for an internal project and your wiki page helped (although I'm just on windows for it.)
The howto was more focussed on getting Firebird to work on Android - to help people get started there with Zeos. Regarding Firebird Embedded on Windows you might want to take a look at the Firebird 4 Migration Guide because it has information on the minimum configuration for Firebird 4.0 Embedded on Windows.

Best regards,

Jan
MJFShark
Expert Boarder
Expert Boarder
Posts: 211
Joined: 04.06.2020, 13:59

Re: Firebird and SupportsMixedCaseIdentifiers

Post by MJFShark »

Hi Jan,

I believe the value for SupportsMixedCaseIdentifiers is specifically for unquoted identifiers. The only database I use where this value is true is MySQL 5.7 on Linux with Get_lower_case_table_names = 0. This value correctly defaults to False in ZDbcMetadata.

Here's the help for it from ZDbcMetadata:

/// <summary>Does the database treat mixed case unquoted SQL identifiers as
/// case sensitive and as a result store them in mixed case?
/// <returns><c>true</c> if so; <c>false</c> otherwise.</returns>
function SupportsMixedCaseIdentifiers: Boolean; virtual;

As far as double quoted identifiers go, I thought that SupportsMixedCaseQuotedIdentifiers was for that (and probably always true, though I don't use all the protocols in Zeos.) This value correctly defaults to True in ZDbcMetadata.

/// <summary>Does the database treat mixed case quoted SQL identifiers as
/// case sensitive and as a result store them in mixed case?</summary>
/// <returns><c>true</c> if so; <c>false</c> otherwise.</returns>
function SupportsMixedCaseQuotedIdentifiers: Boolean; virtual;

So I *think* that SupportsMixedCaseIdentifiers should be False for Firebird, unless unquoted identifiers are case sensitive sometimes, as with MySQL? I do use Firebird both on Windows and Linux and I haven't seen anything case sensitive with unquoted idents.

-Mark
P.S. Yes on the embedded stuff! I got it working without any problems, I was just showing appreciation for your wiki page post. Thanks as always!
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: Firebird and SupportsMixedCaseIdentifiers

Post by marsupilami »

MJFShark wrote: 16.06.2021, 11:36 So I *think* that SupportsMixedCaseIdentifiers should be False for Firebird, unless unquoted identifiers are case sensitive sometimes, as with MySQL?
You are right. Firebird handles all mixed case identifiers as if they were uppercase identifiers.
MJFShark wrote: 16.06.2021, 11:36 The only database I use where this value is true is MySQL 5.7 on Linux with Get_lower_case_table_names = 0.
As a side note: This value can be true for MS SQL Server - and maybe Sybase ASE - depending on the default collation of the database.
For MySQL with lower_case_table_names = 0 this function cannot return the truth because there are different rules for different identifiers then. For MySQL we would have to extend the funtion to tell it what kind of identifier wie are talking about (table name vs. colulmn name vs. ...) and only then it could tell us the truth. Otherwise it is guesswork...
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: Firebird and SupportsMixedCaseIdentifiers

Post by marsupilami »

I changed this for all versions in SVN back to 6.6.
MJFShark
Expert Boarder
Expert Boarder
Posts: 211
Joined: 04.06.2020, 13:59

Re: Firebird and SupportsMixedCaseIdentifiers

Post by MJFShark »

Thanks!

-Mark
Post Reply