Hello,

I have a few remarks concerning the Virtual Table interface as it is currently 
defined in CVS. I am very enthusiastic about the Virtual Table concept but can 
see a few limitations. Time permitting, I kindly ask the core developers to 
give a short feedback that they have taken notice of this.

1. xCreate

Would it be possible to replace the following parameter in xCreate:

  char **argv  -->  sqlite3_value **

This would save applications to parse parameters strings for numbers, decode 
binary information, dequote strings, etc. Since this functionality is already 
buld into SQLite internally and is known to work reliably, it would be nice if 
applications would not have to reinvent the wheel and duplicate the parsing 
code for each virtual table module.

2. xBestIndex / xFilter / sqlite3_index_info

The sqlite3_index_info structure contains char *idxStr; which may be used to 
the application's liking. In addition, int needToFreeIdxStr; can be used to 
instruct SQLite3 to free idxStr.

Would it be possible that SQLite3 could pass idxStr back to the application 
when it needs to be freed instead of freeing it using sqlite3_free? This would 
allow to free complex memory structures which sqlite3_free can not handle. I 
would not mind if idxStr would just be void* so I can store to it whatever I 
need.

3. xRowID / xUpdate

As outlined in the Wiki, the 64bit integer RowID concept is not supported by 
all databases and many potential uses of Virtual Tables. I proposed to add a 
more generic interface to ensure reliable updates for those:

  xGetBookmark
  xFreeBookmark

The Virtual Table Methods wiki contains more details.

Best regards,

Ralf

Reply via email to