muddling around in the source for revOpenDatabase()for postgresq
Dr. Hawkins
dochawk at gmail.com
Sat May 9 19:51:06 EDT 2015
[*bump*]
Trying again. Can anyone get me further than this to find the code that
actually opens the connections for mySQL and postgres? I'd try to adapt it
if I knew where to look (continuing my long history of using languages I
don't know . . . [ok, for C & C++, I tend to learn them again, and then
forget all but the most basic syntax when I stop])
On Sat, Apr 4, 2015 at 10:16 AM, Dr. Hawkins <dochawk at gmail.com> wrote:
> 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
> https://github.com/runrev/livecode/blob/830646697a332aadefd5e9af4d439374fe9d031e/revdb/src/revdb.cpp
>
> 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.
> (702) 508-8462
>
--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
More information about the use-livecode
mailing list