Ivan Shmakov <i...@gray.siamics.net> wrote: > I wonder, is it possible to create sqlite3_value * from scratch > from within SQLite library's user code?
There's a circuitous route that leads there. You can prepare a statement of the form "select ?;", bind the parameter with one of sqlite3_bind_* functions, then step it once, and retrieve the value right back with sqlite3_column_value. Note that the resulting sqlite3_value is "unprotected" (see http://sqlite.org/c3ref/value.html) and can only be used in limited ways. And of course it's only valid until the "select ?;" statement is reset or finalized. > Given some way to construct a sqlite3_value wrapping object, I > could instead rely on sqlite3_bind_value () alone, thus > eliminating the necessity of type specifiers in the interface. Well, a hypothetical API that constructs sqlite3_value from raw data would have to take the type specifier anyway, wouldn't it? You would just be moving the same logic to another place. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users