On 2021-08-19 16:43, Dmitry Yemanov wrote:
19.08.2021 17:30, Mark Rotteveel wrote:
If we want/need some API to correctly identify the type of statement even when RETURNING is present, we would need to add yet another info item (e.g. isc_info_sql_stmt_type2 or isc_info_sql_real_stmt_type, or something like that and then maybe deprecate isc_info_sql_stmt_type in favour of the new statement type item and isc_info_sql_stmt_flags).

Perhaps, although I'm not sure why the client application would need
to know the statement type at all ;-) It still may be confusing, e.g.
MERGE actually performing as INSERT/UPDATE/DELETE.

True, though I can think of some cases where it might be interesting to know the type of a statement, but there the concern would probably be more between select vs dml vs ddl vs start/end transaction vs etc, and not specifically insert vs update vs delete vs merge.

This might be more relevant to me as a driver developer than for an application developer, and I can address most of that by doing a simple parse of (the prefix of) a statement (which I already need to do for some other functionality anyway).

Mark


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to