Estimated hours taken: 6
Branches: main
A major cleanup of the ODBC binding. This is incorporates fixes for a number
of problems pointed out by Keri Harris the other day plus some fixes for some
other problems I encountered while working on it.
Also, add support for unixODBC to the ODBC binding.
extras/odbc/odbc.m:
extras/odbc/odbc_test.m:
Convert to four-space indentation throughout.
Use the new foreign-language interface throughout.
Make the type odbc.statement into a foreign_type. This cuts
down on the amount of casting required in the C code.
Use '.' as a module qualifier throughout.
Avoid unnecessary module qualification. Rename some local predicates
to help with this.
Fix places where we don't conform to the C or Mercury coding
standards.
Add support for unixODBC.
Don't use cast expressions as lvalues.
Add missing character escapes.
Avoid warnings about stat shadowing a global declaration.
extras/odbc/Mmakefile:
Support MODBC_UNIX (unixODBC) as a legal value for MODBC_DRIVER.
Remove a link to an old installation of iODBC.
Add the MLLIBS options necessary for building the ODBC binding
on Debian with either iODBC or unixODBC. (I've left the Windows
specific stuff intact, but I have no idea if it works or not.)
Estimated hours taken: 0.5
Branches: main
Fix compilation problems in the extras distribution caused by recent
changes.
extras/stream/stream.m:
Provide a definition for the type stream/1.
extras/*/*.m:
Conform to the recent changes to the standard library.
Estimated hours taken: 2
Handle exceptions thrown by the closure passed to odbc__transaction.
extras/odbc/odbc.m:
Abort the transaction if the closure throws an exception,
and rethrow the exception to the caller.
extras/odbc/odbc_test.m:
Add a transaction which throws an exception to the test.
extras/odbc/Mmakefile:
Minor changes to the set-up for iODBC 2.50.3.
Estimated hours taken: 1
Improve the ODBC interface slightly.
extras/odbc/odbc.m
Rename odbc__execute/4 as odbc__solutions/4.
Add odbc__aggregate/6 similar to std_util:unsorted_aggregate/4.
NEWS
Document the ODBC interface.
runtime/engine.h
runtime/engine.mod
Add wrappers around longjmp and setjmp which save and restore
some state in engine.c and the Mercury registers.
runtime/mercury_trail.h
Add a macro MR_IF_USE_TRAIL which evaluates to its argument
if MR_USE_TRAIL is defined, or to nothing otherwise.
runtime/mercury_string.h
Add a macro make_aligned_string_copy to copy a C string
onto the Mercury heap.
runtime/misc.c
Avoid a seg-fault when printing out info about the nondet stack
in a debug grade.
extras/odbc/Mmakefile
extras/odbc/odbc.m
The interface.
extras/odbc/odbc_test.m
A simple test.