DBI/SQL backend

David Reiser dbreiser at earthlink.net
Thu Jun 12 09:48:51 EDT 2008


On Jun 11, 2008, at 8:58 PM, Phil Longstaff wrote:

> I think the DBI/SQL backend is ready to try.  It is in the gda-dev2
> branch.  The GDA backend has been disabled and a DBI backend is  
> enabled.
> It assumes that the include files are in /usr/include/dbi/dbi.h and  
> the
> driver files are in /usr/lib/dbd.  The only driver that the DBI  
> backend
> supports is sqlite3.  I am using libdbi-0.8.2.  I assume later  
> versions
> will work.  I don't know about earlier versions.  There is a  
> compilation
> check that the header file is present, but no version check.
>
> No new URI types have been added.  If you try to open a file, it will
> check if it is an sqlite3 file, and will load it with sqlite3.  If it
> can't, it will revert to xml.  Save As will save a file as an sqlite3
> file.  The "Connect to Database" menu entry is still enabled but will
> (probably) fail.
>
> I don't have a windows compilation environment, so I haven't tried  
> it on
> windows.
>
> Please feel free to try it out and report any problems.  This is not  
> yet
> ready for your real data, though it would be a good test to load your
> xml file and save-as an sqlite3 file.
>
> Phil


with --enable-error-on-warning set, I get:

  gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -DG_LOG_DOMAIN= 
\"gnc.backend.sql\" -I/sw/include -I.. -I../.. -DLOCALE_DIR=\"/opt/ 
gnucash-gda/share/locale\" -I../../../src/backend -I../../../src/ 
engine -I../../../src/core-utils -I../../../lib/libc -I../../../lib/ 
libqof/qof -I../../../lib/libqof/qof -I/sw/include/glib-2.0 -I/sw/lib/ 
glib-2.0/include -I/opt/include/libgda-4.0 -I/sw/include/glib-2.0 -I/ 
sw/lib/glib-2.0/include -I/sw/include/libxml2 -I/sw/include -I/sw/ 
include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/orbit-2.0 -I/ 
sw/include/gconf/2 -DORBIT2=1 -Wall -Wmissing-prototypes -Werror - 
Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -g - 
Wno-unused -MT gnc-backend-util-sql.lo -MD -MP -MF .deps/gnc-backend- 
util-sql.Tpo -c gnc-backend-util-sql.c  -fno-common -DPIC -o .libs/gnc- 
backend-util-sql.o
cc1: warnings being treated as errors
gnc-backend-util-sql.c: In function ‘gnc_sql_get_sql_value’:
gnc-backend-util-sql.c:1411: warning: format ‘%d’ expects type ‘int’,  
but argument 5 has type ‘GType’
make[5]: *** [gnc-backend-util-sql.lo] Error 1

Dave
--
David Reiser
dbreiser at earthlink.net






More information about the gnucash-devel mailing list