xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3session_indirect.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE3SESSION_INDIRECT 3
3.Os
4.Sh NAME
5.Nm sqlite3session_indirect
6.Nd set or clear the indirect change flag
7.Sh SYNOPSIS
8.In sqlite3.h
9.Ft int
10.Fo sqlite3session_indirect
11.Fa "sqlite3_session *pSession"
12.Fa "int bIndirect"
13.Fc
14.Sh DESCRIPTION
15Each change recorded by a session object is marked as either direct
16or indirect.
17A change is marked as indirect if either:
18.Bl -bullet
19.It
20The session object "indirect" flag is set when the change is made,
21or
22.It
23The change is made by an SQL trigger or foreign key action instead
24of directly as a result of a users SQL statement.
25.El
26.Pp
27If a single row is affected by more than one operation within a session,
28then the change is considered indirect if all operations meet the criteria
29for an indirect change above, or direct otherwise.
30.Pp
31This function is used to set, clear or query the session object indirect
32flag.
33If the second argument passed to this function is zero, then the indirect
34flag is cleared.
35If it is greater than zero, the indirect flag is set.
36Passing a value less than zero does not modify the current value of
37the indirect flag, and may be used to query the current state of the
38indirect flag for the specified session object.
39.Pp
40The return value indicates the final state of the indirect flag: 0
41if it is clear, or 1 if it is set.
42.Sh IMPLEMENTATION NOTES
43These declarations were extracted from the
44interface documentation at line 11071.
45.Bd -literal
46SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect);
47.Ed
48