xref: /netbsd-src/external/public-domain/sqlite/man/SQLITE_PREPARE_PERSISTENT.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE_PREPARE_PERSISTENT 3
3.Os
4.Sh NAME
5.Nm SQLITE_PREPARE_PERSISTENT ,
6.Nm SQLITE_PREPARE_NORMALIZE ,
7.Nm SQLITE_PREPARE_NO_VTAB
8.Nd prepare flags
9.Sh SYNOPSIS
10.In sqlite3.h
11.Fd #define SQLITE_PREPARE_PERSISTENT
12.Fd #define SQLITE_PREPARE_NORMALIZE
13.Fd #define SQLITE_PREPARE_NO_VTAB
14.Sh DESCRIPTION
15These constants define various flags that can be passed into "prepFlags"
16parameter of the
17.Fn sqlite3_prepare_v3
18and
19.Fn sqlite3_prepare16_v3
20interfaces.
21.Pp
22New flags may be added in future releases of SQLite.
23.Bl -tag -width Ds
24.It SQLITE_PREPARE_PERSISTENT
25The SQLITE_PREPARE_PERSISTENT flag is a hint to the query planner that
26the prepared statement will be retained for a long time and probably
27reused many times.
28Without this flag,
29.Fn sqlite3_prepare_v3
30and
31.Fn sqlite3_prepare16_v3
32assume that the prepared statement will be used just once or at most
33a few times and then destroyed using
34.Fn sqlite3_finalize
35relatively soon.
36The current implementation acts on this hint by avoiding the use of
37lookaside memory so as not to deplete the limited store
38of lookaside memory.
39Future versions of SQLite may act on this hint differently.
40.It SQLITE_PREPARE_NORMALIZE
41The SQLITE_PREPARE_NORMALIZE flag is a no-op.
42This flag used to be required for any prepared statement that wanted
43to use the
44.Fn sqlite3_normalized_sql
45interface.
46However, the
47.Fn sqlite3_normalized_sql
48interface is now available to all prepared statements, regardless of
49whether or not they use this flag.
50.It SQLITE_PREPARE_NO_VTAB
51The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler to return an
52error (error code SQLITE_ERROR) if the statement uses any virtual tables.
53.El
54.Pp
55.Sh IMPLEMENTATION NOTES
56These declarations were extracted from the
57interface documentation at line 4137.
58.Bd -literal
59#define SQLITE_PREPARE_PERSISTENT              0x01
60#define SQLITE_PREPARE_NORMALIZE               0x02
61#define SQLITE_PREPARE_NO_VTAB                 0x04
62.Ed
63.Sh SEE ALSO
64.Xr sqlite3_finalize 3 ,
65.Xr sqlite3_prepare 3 ,
66.Xr sqlite3_sql 3
67