Hi everyone!
Ross and I have had a very thorough thread going on about libdrizzle
and some questions have come out of it. Here are a couple decisions
we would like feedback on:
libdrizzle will optionally allocate memory for your objects if you
do not. For example, you can do:
/* User allocated. */
drizzle_st drizzle;
drizzle_create(&drizzle);
or:
/* libdrizzle allocated */
drizzle_st *drizzle;
drizzle= drizzle_create(NULL)
What do folks think about this interface? Would having two functions
be preferable to just one? For example:
drizzle_st drizzle;
drizzle_init(&drizzle)?
and:
drizzle_st *drizzle;
drizzle= drizzle_new(void); /* Calls malloc() and drizzle_init() */
Next, should the default behavior of drizzle_query be to wait for
the result header or return immediately and require another function
to read the result header? This is currently a behavior flag so you
choose either one, but we still need a default behavior. For example:
drizzle_query("SELECT ...", result);
/* Start using result. */
or:
drizzle_query("SELECT ...", result);
/* Do something else here since we didn't block on the result read(). */
drizzle_result_read(result);
/* Start using result. */
The latter case is better for applications that may want to perform
some other work before blocking on the result read().
Thanks!
-Eric
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp