> Select AddOne( <whatever> );

Yes, that might be the best option indeed.
Still though it needs then to detect what the function does to supply the
right arguments and to construct
the right statement in code.
I solved my problem in a different way.

RBS



On Mon, Dec 12, 2016 at 12:12 PM, Hick Gunter <h...@scigames.at> wrote:

> Select AddOne( <whatever> );
>
> -----Ursprüngliche Nachricht-----
> Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von Bart Smissaert
> Gesendet: Sonntag, 11. Dezember 2016 22:39
> An: General Discussion of SQLite Database <sqlite-users@mailinglists.
> sqlite.org>
> Betreff: [sqlite] Run non-data producing statement just once to test UDF
>
> Say I have a UDF called AddOne in a statement like this:
>
> update table1 set field1 = AddOne(field1)
>
> and say the table table1 has some million rows.
>
> Now I want to test this statement to test the UDF but I want to do this
> for only one row.
> How do I do this?
>
> limit 1 only applies to data producing statements. Adding a where clause,
> say where rowid = 1 is a bit tricky (all this has to be done in code) and
> there may not be a rowid of 1 and I can't do a sqlite3_step as that would
> run for all the rows.
> There is no such problem with select statements as I can just run one
> sqlite3_step and just fetch no data and do a sqlite3_reset.
>
> Any suggestions?
>
>
> RBS
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___________________________________________
>  Gunter Hick
> Software Engineer
> Scientific Games International GmbH
> FN 157284 a, HG Wien
> Klitschgasse 2-4, A-1130 Vienna, Austria
> Tel: +43 1 80100 0
> E-Mail: h...@scigames.at
>
> This communication (including any attachments) is intended for the use of
> the intended recipient(s) only and may contain information that is
> confidential, privileged or legally protected. Any unauthorized use or
> dissemination of this communication is strictly prohibited. If you have
> received this communication in error, please immediately notify the sender
> by return e-mail message and delete all copies of the original
> communication. Thank you for your cooperation.
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to