mridoni / gixsql

GixSQL is an ESQL preprocessor and a series of runtime libraries to enable GnuCOBOL to access PostgreSQL, ODBC, MySQL, Oracle and SQLite databases.
GNU General Public License v3.0
16 stars 8 forks source link

Make "setOpened" private, let gixsql assume full ownership of the cursor state #115

Closed mridoni closed 2 years ago

mridoni commented 2 years ago

It basically depends on who (the driver or the "main" library) has ownership of the cursor's state. I guess the main library should have and set it appropriately depending on the return code from cursor_open/close_cursor. At that point setOpened can be made private in Cursor and removed from the "interface" in ICursor, since the drivers will no longer be using it.

Originally posted by @mridoni in https://github.com/mridoni/gixsql/issues/110#issuecomment-1226890954

mridoni commented 2 years ago

046dfa96c7ad631cc45cefa4585cca335b9563e4 should fix this