No. As the creator of a statement, you are expected to know either the position or the name of any SQL parameters contained therein. Determining which indexes are legal does not help in determining what has been bound, not even if anything has been bound. Please note that sqlite3_reset() does not clear the bindings.
What is the underlying use case? -----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von test user Gesendet: Sonntag, 21. Juli 2019 21:04 An: sqlite-users@mailinglists.sqlite.org Betreff: [EXTERNAL] [sqlite] Determining valid statement placeholders. Is there a `sqlite3` C FFI API that allows me to determine which index values are valid to bind to? The `sqlite3_bind_parameter_*` APIs (count, name, index) do not actually provide the valid indexes. For example: "?, ?10" would have two valid indexes: (1, 10). But how can I know that indexes 2-9 are invalid from the API? I have tried binding null to 2-9, but get SQLITE_OK. I want to be able to check clients have provided all data needed for a query instead having SQLite bind null by default for placeholders with no data binding. Thanks. _______________________________________________ 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 | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users