[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r33730 - in trunk: . notes/tree-conflicts subversion/include subversion/libsvn_fs_base subversion/libsvn_fs_base/bdb subversion/libsvn_fs_base/notes subversion/libsvn_fs_base/util subversion/libsvn_fs_fs subversion/libsvn_subr subvers

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 20 Oct 2008 11:30:05 -0700

On Mon, Oct 20, 2008 at 5:22 AM, Bert Huijben <b.huijben_at_competence.biz> wrote:
>> > + SVN_ERR(svn_sqlite__prepare(&stmt, ffd->rep_cache,
>> > + "select revision, offset, size, expanded_size from
>> rep_cache "
>> > + "where hash = :1", pool));
>> I would recommend preparing this statement when you open the db. Then
>> each time this function is called, you can just bind some new values,
>> run the query, and finalize the statement. Definitely more efficient.
> Maybe just store it the first time and reuse it after that?

Yeah. That would be better.

As I started to use our internal SQLite interface, I was hoping to add
an API to do just this. "Prepare <this> statement, if I haven't
already. Okay, now bind <these> values."

It would also be neat if we had a printf-style binding API, rather
than N bind calls.


To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-20 20:30:22 CEST

This is an archived mail posted to the Subversion Dev mailing list.