xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3session_config.3 (revision aef5eb5f59cdfe8314f1b5f78ac04eb144e44010)
1.Dd December 19, 2018
2.Dt SQLITE3SESSION_CONFIG 3
3.Os
4.Sh NAME
5.Nm sqlite3session_config
6.Nd Configure global parameters
7.Sh SYNOPSIS
8.Ft int
9.Fo sqlite3session_config
10.Fa "int op"
11.Fa "void *pArg"
12.Fc
13.Sh DESCRIPTION
14The sqlite3session_config() interface is used to make global configuration
15changes to the sessions module in order to tune it to the specific
16needs of the application.
17.Pp
18The sqlite3session_config() interface is not threadsafe.
19If it is invoked while any other thread is inside any other sessions
20method then the results are undefined.
21Furthermore, if it is invoked after any sessions related objects have
22been created, the results are also undefined.
23.Pp
24The first argument to the sqlite3session_config() function must be
25one of the SQLITE_SESSION_CONFIG_XXX constants defined below.
26The interpretation of the (void*) value passed as the second parameter
27and the effect of calling this function depends on the value of the
28first parameter.
29.Bl -tag -width Ds
30.It SQLITE_SESSION_CONFIG_STRMSIZEBy default, the sessions module streaming
31interfaces attempt to input and output data in approximately 1 KiB
32chunks.
33This operand may be used to set and query the value of this configuration
34setting.
35The pointer passed as the second argument must point to a value of
36type (int).
37If this value is greater than 0, it is used as the new streaming data
38chunk size for both input and output.
39Before returning, the (int) value pointed to by pArg is set to the
40final value of the streaming interface chunk size.
41.El
42.Pp
43This function returns SQLITE_OK if successful, or an SQLite error code
44otherwise.
45