[vlc-devel] [PATCH] Prepared statements for SQL

jpd at videolan.org jpd at videolan.org
Wed Oct 21 15:04:50 CEST 2009

On Tue, Oct 20, 2009 at 07:18:03PM +0200, Laurent Aimar wrote:
> > +#define VLC_SQL_ROW 1
> > +#define VLC_SQL_DONE 2
>  What are they used for? A doxy comment would be usefull.

Also: enums.

>  What are BLOB and NULL?

Also: NULL should probably be the first in list (so it has value 0).

> I am not sure how to improve this, but it begins to make sql_t having
> an awful lot of functions, and also to be hard to know which ones work
> together. Anyone has an idea?

Prepared statements take a few extra functions, but perhaps one can
merge functionality with the non-prepared versions. Though if that
causes lots of extra complexity, then perhaps not.

>  I don't understand what i_length is. If it is strlen(psz_fmt), then
> it is useless, otherwise a more explicit documentation is needed.

The sql functions likely take a non-zero-terminated string, making
psz_fmt a bit of a misnomer. This also needs documenting, of course.

More information about the vlc-devel mailing list