comp.lang.ada
 help / color / mirror / Atom feed
From: Ching Bon Lam <c.lam_REMOVE_THIS@student.utwente.nl>
Subject: sqlite binding
Date: 07 Jul 2003 12:30:46 GMT
Date: 2003-07-07T12:30:46+00:00	[thread overview]
Message-ID: <Xns93B193A67A651cblamstudentutwenten@194.109.133.20> (raw)

hello everyone,

I've been trying to make some sort of sqlite binding. SQLite itself is at 
http://www.sqlite.org/ . For now i just want to import the core api 
consisting of three functions (taken from sqlite.h):

-- Code -----------------------------------------------------------------

sqlite *sqlite_open(const char *filename, int mode, char **errmsg);

void sqlite_close(sqlite *);

int sqlite_exec(
  sqlite*,          /* An open database */
  const char *sql,  /* SQL to be executed */
  sqlite_callback,  /* Callback function */
  void *,           /* 1st argument to callback function */
  char **errmsg     /* Error msg written here */
);

-------------------------------------------------------------------------

with:

-- Code -----------------------------------------------------------------

typedef struct sqlite sqlite; /* opaque struct */
typedef int (*sqlite_callback)(void*,int,char**, char**);

-------------------------------------------------------------------------

What I did till now is:

-- Code -----------------------------------------------------------------

-- typedef struct sqlite sqlite; /* opaque struct */
subtype sqlite is Interfaces.C.Extensions.opaque_structure_def;

-------------------------------------------------------------------------

i don't know how to do the rest with the tons of pointers as arguments..
if someone would give me some pointers/guidance/hints, i would be really 
grateful.

greetings,
CBL



             reply	other threads:[~2003-07-07 12:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-07 12:30 Ching Bon Lam [this message]
2003-07-07 14:16 ` sqlite binding Andreas Almroth
2003-07-11 15:34 ` Michael Erdmann
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox