* ANNOUNCE: Guile-DBI version 2.1.1 @ 2008-11-10 22:44 Linas Vepstas 2008-11-11 4:32 ` Patch to Guile-DBI: SCM_ASSERT Mike Gran 0 siblings, 1 reply; 5+ messages in thread From: Linas Vepstas @ 2008-11-10 22:44 UTC (permalink / raw To: Guile User Mailing List I was finally able to update the gna.org website for guile-dbi with a new release. What is it? -------------- guile-dbi provides a simple, generic, easy-to-use scheme/guile interface to SQL databases, such as Postgres or MySQL. The system is split into two parts: the DBI (database independent) part, which provides the scheme interfaces, and the DBD (database dependent) plugins, which connect to the actual SQL server. Currently, there are DBD backends for Postgres on MySQL. See http://home.gna.org/guile-dbi/ for more info Recent Fixes ------------------ Applied all patches previously sent to this mailing list. In particular: -- A crash during garbage collection, during db close. -- Misconversion of floating point values. -- An off-by-one error when returning lines from a Postgres database. -- Removal of calls to the deprecated guile gh_ API. -- Documentation updates. Documentation -------------------- See http://home.gna.org/guile-dbi/guile-dbi.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Patch to Guile-DBI: SCM_ASSERT 2008-11-10 22:44 ANNOUNCE: Guile-DBI version 2.1.1 Linas Vepstas @ 2008-11-11 4:32 ` Mike Gran 2008-11-11 14:36 ` Linas Vepstas 0 siblings, 1 reply; 5+ messages in thread From: Mike Gran @ 2008-11-11 4:32 UTC (permalink / raw To: Guile User Mailing List [-- Attachment #1: Type: text/plain, Size: 436 bytes --] ----- Original Message ---- > From: Linas Vepstas <linasvepstas@gmail.com> > > I was finally able to update the gna.org website for guile-dbi > with a new release. > See http://home.gna.org/guile-dbi/guile-dbi.html A patch. SCM_ASSERT usually uses the scheme function name in the assertion error instead of the C function name. Also, in make_g_db_handle, the assertion for the second parameter is incorrect. Thanks, Mike Gran [-- Attachment #2: guile-dbi.c.patch --] [-- Type: application/octet-stream, Size: 3401 bytes --] --- guile-dbi.c.0 2008-11-10 20:15:45.781250000 -0800 +++ guile-dbi.c 2008-11-10 20:23:44.406250000 -0800 @@ -37,15 +37,15 @@ SCM_DEFINE (make_g_db_handle, "dbi-open", 2, 0, 0, (SCM bcknd, SCM conn_string), "Build db_handle smob.") -#define FUNC_NAME s_make_db_handle +#define FUNC_NAME s_make_g_db_handle { struct g_db_handle *g_db_handle = NULL; char* sodbd = NULL; char* bcknd_str = NULL; void (*connect)(gdbi_db_handle_t*); - SCM_ASSERT (scm_is_string (bcknd), bcknd, SCM_ARG1, "make_g_db_handle"); - SCM_ASSERT (scm_is_string (conn_string), bcknd, SCM_ARG2, "make_g_db_handle"); + SCM_ASSERT (scm_is_string (bcknd), bcknd, SCM_ARG1, FUNC_NAME); + SCM_ASSERT (scm_is_string (conn_string), conn_string, SCM_ARG2, FUNC_NAME); g_db_handle = (struct g_db_handle*)scm_gc_malloc(sizeof (struct g_db_handle), "g_db_handle"); @@ -153,12 +153,12 @@ SCM_DEFINE (close_g_db_handle, "dbi-close", 1, 0, 0, (SCM db_handle), "Close db connection.") -#define FUNC_NAME s_close_db_handle +#define FUNC_NAME s_close_g_db_handle { struct g_db_handle *g_db_handle = NULL; void (*dbd_close)(gdbi_db_handle_t*); - SCM_ASSERT (DBI_SMOB_P(db_handle), db_handle, SCM_ARG1, "close_g_db_handle"); + SCM_ASSERT (DBI_SMOB_P(db_handle), db_handle, SCM_ARG1, FUNC_NAME); g_db_handle = (struct g_db_handle*)SCM_SMOB_DATA(db_handle); if (g_db_handle->closed == SCM_BOOL_T) @@ -210,15 +210,15 @@ SCM_DEFINE (query_g_db_handle, "dbi-query", 2, 0, 0, (SCM db_handle, SCM query), "Do a query and set status.") -#define FUNC_NAME s_query_db_handle +#define FUNC_NAME s_query_g_db_handle { struct g_db_handle *g_db_handle = NULL; char *query_str = NULL; void (*dbi_query)(gdbi_db_handle_t*,char*); - SCM_ASSERT (DBI_SMOB_P(db_handle), db_handle, SCM_ARG1, "query_g_db_handle"); - SCM_ASSERT (scm_is_string (query), query, SCM_ARG2, "query_g_db_handle"); + SCM_ASSERT (DBI_SMOB_P(db_handle), db_handle, SCM_ARG1, FUNC_NAME); + SCM_ASSERT (scm_is_string (query), query, SCM_ARG2, FUNC_NAME); g_db_handle = (struct g_db_handle*)SCM_SMOB_DATA(db_handle); query_str = scm_to_locale_string(query); @@ -240,13 +240,13 @@ SCM_DEFINE (getrow_g_db_handle, "dbi-get_row", 1, 0, 0, (SCM db_handle), "Do a query and return a row in form of pair list or false") -#define FUNC_NAME s_getrow_db_handle +#define FUNC_NAME s_getrow_g_db_handle { struct g_db_handle *g_db_handle = NULL; SCM retrow = SCM_EOL; SCM (*dbi_getrow)(gdbi_db_handle_t*); - SCM_ASSERT (DBI_SMOB_P(db_handle), db_handle, SCM_ARG1, "getrow_g_db_handle"); + SCM_ASSERT (DBI_SMOB_P(db_handle), db_handle, SCM_ARG1, FUNC_NAME); g_db_handle = (struct g_db_handle*)SCM_SMOB_DATA(db_handle); __gdbi_dbd_wrap(g_db_handle, __FUNCTION__,(void**) &dbi_getrow); @@ -268,11 +268,11 @@ SCM_DEFINE (getstat_g_db_handle, "dbi-get_status", 1, 0, 0, (SCM db_handle), "Return status pair, code and msg, from dbi smob.") -#define FUNC_NAME s_getstat_db_handle +#define FUNC_NAME s_getstat_g_db_handle { struct g_db_handle *g_db_handle = NULL; - SCM_ASSERT (DBI_SMOB_P(db_handle), db_handle, SCM_ARG1, "getstat_g_db_handle"); + SCM_ASSERT (DBI_SMOB_P(db_handle), db_handle, SCM_ARG1, FUNC_NAME); g_db_handle = (struct g_db_handle*)SCM_SMOB_DATA(db_handle); ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch to Guile-DBI: SCM_ASSERT 2008-11-11 4:32 ` Patch to Guile-DBI: SCM_ASSERT Mike Gran @ 2008-11-11 14:36 ` Linas Vepstas 2008-11-11 16:31 ` Mike Gran 0 siblings, 1 reply; 5+ messages in thread From: Linas Vepstas @ 2008-11-11 14:36 UTC (permalink / raw To: Mike Gran; +Cc: Guile User Mailing List Hi! 2008/11/10 Mike Gran <spk121@yahoo.com>: > A patch. SCM_ASSERT usually uses the scheme function name in the assertion error instead of the C function name. Also, in make_g_db_handle, the assertion for the second parameter is incorrect. Wow! Unexpected -- thanks! I've applied it; now I'll have to spin 2.1.2 someday. Did you find this by code review, or have you been carrying this patch for a while? I was wondering if I was the sole user in the world of this stuff. --linas ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch to Guile-DBI: SCM_ASSERT 2008-11-11 14:36 ` Linas Vepstas @ 2008-11-11 16:31 ` Mike Gran 2008-11-11 16:45 ` Linas Vepstas 0 siblings, 1 reply; 5+ messages in thread From: Mike Gran @ 2008-11-11 16:31 UTC (permalink / raw To: linasvepstas; +Cc: Guile User Mailing List >From: Linas Vepstas <linasvepstas@gmail.com> > Did you find this by code review, or have you been carrying this patch > for a while? I was wondering if I was the sole user in the world of this > stuff. I saw it when browsing the files after you pushed your new release. I've been playing with guile and mysql recently, but mostly with my own interface code. -Mike Gran ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch to Guile-DBI: SCM_ASSERT 2008-11-11 16:31 ` Mike Gran @ 2008-11-11 16:45 ` Linas Vepstas 0 siblings, 0 replies; 5+ messages in thread From: Linas Vepstas @ 2008-11-11 16:45 UTC (permalink / raw To: Mike Gran; +Cc: Guile User Mailing List 2008/11/11 Mike Gran <spk121@yahoo.com>: > I've been playing with guile and mysql recently, but mostly with my own interface code. Well, I believe that the world is better when there are fewer, stronger libraries, as that promotes stability, maintainability, and free-of-bugs-ness. With that thought, I invite you to contribute/rewrite the guile-dbi code as much as you want. You may not want to; I understand; my first impulse was that the code looked pretty darned ugly. But that's an excuse to clean it up, right? FWIW, I'm not actually very interested in maintaining or improving guile-dbi; I'm a lot more interested in just using it (or anything else that does the trick; my needs are very slight). In particular, I have no plans for expansion or redesign; just bug-fixing. --linas ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-11-11 16:45 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-11-10 22:44 ANNOUNCE: Guile-DBI version 2.1.1 Linas Vepstas 2008-11-11 4:32 ` Patch to Guile-DBI: SCM_ASSERT Mike Gran 2008-11-11 14:36 ` Linas Vepstas 2008-11-11 16:31 ` Mike Gran 2008-11-11 16:45 ` Linas Vepstas
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).