On Fri, May 8, 2015 at 7:01 PM, Stephen Broberg
wrote:
> (e.g., insert, update, delete, select, etc.). Specifically, I?d like to
> know whether a statement that either has run or is about to be run (via
> sqlite3_step) is a read-only (select) or write (pretty much everything
> else) operation.
On Fri, May 8, 2015 at 8:20 PM, Simon Slavin wrote:
> Suppose you have this statement
>
> DELETE FROM myTable WHERE id=600
>
> and there are no rows with id=600. I presume that the function will return
> FALSE but a literal reading of the description says that it will return TRUE.
> If I'm
On 8 May 2015, at 6:43pm, Peter Aronson wrote:
> Well, there's sqlite3_stmt_readonly which appears to do pretty much what
> you're asking for: https://www.sqlite.org/c3ref/stmt_readonly.html.
Suppose you have this statement
DELETE FROM myTable WHERE id=600
and there are no rows with
Using versions 3.8.5 and 3.7.7.1:
Is there something in the SQLite C API that will tell what type of statement a
prepared sqlite3_stmt is (e.g., insert, update, delete, select, etc.).
Specifically, I?d like to know whether a statement that either has run or is
about to be run (via
On Fri, May 8, 2015 at 11:20 AM, Simon Slavin wrote:
> On 8 May 2015, at 6:43pm, Peter Aronson wrote:
>> Well, there's sqlite3_stmt_readonly which appears to do pretty much what
>> you're asking for: https://www.sqlite.org/c3ref/stmt_readonly.html.
>
> Suppose you have this statement
>
> DELETE
Well, there's sqlite3_stmt_readonly which appears to do pretty much what
you're asking for: https://www.sqlite.org/c3ref/stmt_readonly.html. Or,
if you want more detailed control, there's the whole authorizer
interface: https://www.sqlite.org/c3ref/set_authorizer.html.
Peter
On 5/8/2015
sqlite3_stmt_readonly(stmt)? This hits INSERT/UPDATE/DELETE, but not
BEGIN/COMMIT/ROLLBACK.
Or sqlite3_sql(stmt) if you want to do it heuristically by inspecting
the statement.
I think a "BEGIN READONLY" would be a sensible transaction type.
Having a wrapper API force the developer to select
7 matches
Mail list logo