Page 1 of 3

List of connection properties?

Posted: 31.12.2019, 22:21
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!

Re: List of connection properties?

Posted: 02.01.2020, 09:10
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

Re: List of connection properties?

Posted: 02.01.2020, 19:28
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 :)

Re: List of connection properties?

Posted: 03.01.2020, 07:56
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

Re: List of connection properties?

Posted: 09.01.2020, 08:38
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.

Re: List of connection properties?

Posted: 09.01.2020, 11:43
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 :)

Re: List of connection properties?

Posted: 09.01.2020, 12:31
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.

Re: List of connection properties?

Posted: 10.01.2020, 09:19
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.

Re: List of connection properties?

Posted: 10.01.2020, 12:20
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.

Re: List of connection properties?

Posted: 10.01.2020, 15:33
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

Re: List of connection properties?

Posted: 12.01.2020, 09:26
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.

Re: List of connection properties?

Posted: 13.01.2020, 07:50
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.

Re: List of connection properties?

Posted: 14.01.2020, 16:34
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
| \...
\...

Re: List of connection properties?

Posted: 15.01.2020, 08:29
by Fr0sT
Dozens of files each containing one or two lines? I don't think it's a good idea

Re: List of connection properties?

Posted: 16.01.2020, 14:54
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.