diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2001-12-06 17:36:21 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2001-12-06 17:36:21 +0000 |
commit | 9339b8ad47f5ae70ac1567a3b87caadd78ed022a (patch) | |
tree | 46ee93b378bebbef132154a237a735cf3eb4f7d8 /src/guile-sql.h | |
download | gamma-9339b8ad47f5ae70ac1567a3b87caadd78ed022a.tar.gz gamma-9339b8ad47f5ae70ac1567a3b87caadd78ed022a.tar.bz2 |
Initial revision
Diffstat (limited to 'src/guile-sql.h')
-rw-r--r-- | src/guile-sql.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/guile-sql.h b/src/guile-sql.h new file mode 100644 index 0000000..64fd0eb --- /dev/null +++ b/src/guile-sql.h @@ -0,0 +1,33 @@ +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> +#include <libguile.h> + +#define MAX_IFACES 32 + +struct sql_connect { + int iface; + char *hostname; + struct in_addr hostaddr; + int port; + char *username; + char *database; + void *data; +}; + +struct sql_result { + SCM owner; + void *data; +}; + +struct sql_iface { + char *name; + SCM (*mark) (struct sql_connect *); + scm_sizet (*free) (struct sql_connect *); + SCM (*connect) (char *hostname, int port, + char *dbname, char *user, char *pass, char *why); + void (*close) (struct sql_connect *); + SCM (*query) (struct sql_connect *, char *query); +}; + +extern struct sql_iface sql_iftab[]; |