List of connection properties?

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
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 766
Joined: 18.11.2018, 17:37
Location: Hungary

List of connection properties?

Post by aehimself »

I started to collect all valid switches you can set on a TZConnection.Properties. Before I am digging myself deep inside this - is there a list about this? Separated by libraries, of course.

Cheers!
Delphi 12.1, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmariadb.dll 3.3.8
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.13
- MSSQL 2012, 2019; sybdb.dll FreeTDS_2435
- SQLite 3.45.2
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: List of connection properties?

Post by marsupilami »

Hello and a happy new year :)

In Zeos 7.3 there are the files core\ZConnProperties.pas and dbc\ZDbcProperties.pas. I seem to rememeber that MySQL has a somewhat generic mechanism. So not all MySQL-related proprties might be in those files.

Best regards,

Jan
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 766
Joined: 18.11.2018, 17:37
Location: Hungary

Re: List of connection properties?

Post by aehimself »

Aaaaand happy new year to you and all the devs of Zeos! Hope it was better for you guys than for me (3mo kid & a dog, none of them are a fan of fireworks...) :D

So there's no list for it at the moment - that's what I thought. I just did a search for "Info.Values" in all source files and start to go through all entries one by one. I'm interested in all protocols, not just MySQL this time, so though VS Code makes it REALLY easy it will take a while to finish :)

I'll let you guys know the result so it can be uploaded to the Wiki. Hopefully people will find it useful :)
Delphi 12.1, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmariadb.dll 3.3.8
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.13
- MSSQL 2012, 2019; sybdb.dll FreeTDS_2435
- SQLite 3.45.2
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: List of connection properties?

Post by marsupilami »

aehimself wrote: 02.01.2020, 19:28 I'll let you guys know the result so it can be uploaded to the Wiki. Hopefully people will find it useful :)
Sounds good. But you should be able to modify the Wiki already - so if you want to, you can do your work in there directly. Also there already is some documentation:
https://sourceforge.net/p/zeoslib/wiki/driver%20parameters/

The list there is very incomplete.

Best regards,

Jan
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: List of connection properties?

Post by Fr0sT »

aehimself wrote: 02.01.2020, 19:28 So there's no list for it at the moment - that's what I thought.
Weird conclusion - there IS a list at the moment! Above-mentioned files contain pretty much generic parameters. Any other ones are driver-specific and are defined in ZPlain*Constants units. This might seem inconsistent but this is the most convenient way to integrate driver-specific props into Zeos. F.ex., if a new MySQL release introduces MYSQL_DO_STUFF parameter, we just add its declaration to TMySqlOption set and that's all, it starts working.
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 766
Joined: 18.11.2018, 17:37
Location: Hungary

Re: List of connection properties?

Post by aehimself »

Fr0sT wrote: 09.01.2020, 08:38Weird conclusion - there IS a list at the moment! Above-mentioned files contain pretty much generic parameters. Any other ones are driver-specific and are defined in ZPlain*Constants units.
My apologies - I meant a list for lazy people (like me :D) who don't want to dig through all source files to know all the supported properties. And in this context, no there is none - yet :)
Delphi 12.1, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmariadb.dll 3.3.8
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.13
- MSSQL 2012, 2019; sybdb.dll FreeTDS_2435
- SQLite 3.45.2
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: List of connection properties?

Post by Fr0sT »

If you mean docs, then yes you're right :)
I guess that instead of having two parallel storages of parameters info (sources and wiki) we should better keep everything in sources and just auto-generate wiki page from them.
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 766
Joined: 18.11.2018, 17:37
Location: Hungary

Re: List of connection properties?

Post by aehimself »

Long story short, I have an application which allows users to set connection parameters. I do not trust users so I would like my application to offer the possibilities so the user can only choose. To be able to do that I need the list; which I will make if there's none.
At the end of the day if I sacrifice my time for my own needs but the result might be useful for others - it's always a nice thing to share.

I completely do agree with you on the generating part, though.
Delphi 12.1, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmariadb.dll 3.3.8
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.13
- MSSQL 2012, 2019; sybdb.dll FreeTDS_2435
- SQLite 3.45.2
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: List of connection properties?

Post by Fr0sT »

Reasonable wish! But you'll have to define a set of available options anyway (to restrict users from doing something bad) so you'll just need proper descriptions for these options.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: List of connection properties?

Post by marsupilami »

@aehimself: I will be very grateful about any documentation in any format.

@frost: I would be happy about a workflow like that. But I don't know about a tool for that kind of source code documentation. These are no properties of classes or anything like that. Do you have any suggestion for doing the kind of documentation process you suggest?

Best regards, Jan
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 766
Joined: 18.11.2018, 17:37
Location: Hungary

Re: List of connection properties?

Post by aehimself »

Fr0sT wrote: 10.01.2020, 12:20Reasonable wish! But you'll have to define a set of available options anyway (to restrict users from doing something bad) so you'll just need proper descriptions for these options.
Indeed, that is exactly my plan. Collect the options, and look up the explainations. Based on those I'll choose which one NOT to publish.
marsupilami wrote: 10.01.2020, 15:33Do you have any suggestion for doing the kind of documentation process you suggest?
- http://dephicodetodoc.sourceforge.net
- https://github.com/pasdoc/pasdoc/wiki
- http://www.doxygen.nl/index.html
- https://www.doc-o-matic.com/en/index.html
- https://synopse.info/fossil/wiki?name=SynProject

These are the most famous ones, I believe we use Doxygen at work; but I have to doublecheck.
Delphi 12.1, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmariadb.dll 3.3.8
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.13
- MSSQL 2012, 2019; sybdb.dll FreeTDS_2435
- SQLite 3.45.2
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: List of connection properties?

Post by Fr0sT »

marsupilami wrote: 10.01.2020, 15:33 @frost: I would be happy about a workflow like that. But I don't know about a tool for that kind of source code documentation. These are no properties of classes or anything like that. Do you have any suggestion for doing the kind of documentation process you suggest?
I don't think any existing tool would fit our needs, I thought about some custom script, maybe Python or Node.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: List of connection properties?

Post by marsupilami »

Hmmm - the question is, do we really need those descriptions in the source code? They can make reading the source code a mess... Why not do something like files. Like having one directory per driver and one file per option? Maybe some special dir for Zeos wide options?

Code: Select all

opiondocs
+-firebird+interbase
| +fb_protocol.txt
| +WireCompression.txt
| +GUIDDomains.txt
| \...
+mysql
| +MYSQL_SSL.txt
| +MaxLobSize.txt
| \...
\...
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: List of connection properties?

Post by Fr0sT »

Dozens of files each containing one or two lines? I don't think it's a good idea
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: List of connection properties?

Post by marsupilami »

Why not? It would Keep everything separate. We also could try to author one document per driver or something like that.

Code: Select all

optiondoc
+firebird_interbase.txt
+ASA.txt
+MySQL_MariaDB.txt
\…
In any case - any documentation is better than no documentaion at all.
Post Reply