muddling around in the source for revOpenDatabase()for postgresq
dochawk at gmail.com
Sat Apr 4 13:16:53 EDT 2015
After letting ideas percolate in my head for a few months, I realized that
it would probably only take a couple or few lines of code to let
revOpenDatabase() open a postgres database with the ssl option.
So I started poking around github. It seems like the first piece of code
is for *revdb.cpp* at e
It looks to me like the connection is opened at line 840, after loading a
module for the particular db type at 837. (but then, my C/C++ is beyond
stale at this point; 15 years since I used it)
And that's where the trail went dead. I can't tell if LoadDatabaseDriver
is part of livecode, C++, or something else (github colors it as a
codeword, but it seems to be defined in this code at line 236, and doesn't
appear elsewhere in livecode)
however, it appears to me (did I mention my C is past rusty?) that the
optional sixth argument to revOpenDatabase() simply gets passed on to the
loaded driver; it didn't look to me like there's a trap anywhere to only do
this for mySql and Valentina).
But I can't figure out what it's doing to load the module, or read C++ well
enough to figure out how the arguments are passing.
A postgres server may be set in its configuration file to accept ssl,
nossl, or both.
Dr. Richard E. Hawkins, Esq.
More information about the Use-livecode