1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
.Dd January 24, 2024
.Dt SQLITE_CREATE_INDEX 3
.Os
.Sh NAME
.Nm SQLITE_CREATE_INDEX ,
.Nm SQLITE_CREATE_TABLE ,
.Nm SQLITE_CREATE_TEMP_INDEX ,
.Nm SQLITE_CREATE_TEMP_TABLE ,
.Nm SQLITE_CREATE_TEMP_TRIGGER ,
.Nm SQLITE_CREATE_TEMP_VIEW ,
.Nm SQLITE_CREATE_TRIGGER ,
.Nm SQLITE_CREATE_VIEW ,
.Nm SQLITE_DELETE ,
.Nm SQLITE_DROP_INDEX ,
.Nm SQLITE_DROP_TABLE ,
.Nm SQLITE_DROP_TEMP_INDEX ,
.Nm SQLITE_DROP_TEMP_TABLE ,
.Nm SQLITE_DROP_TEMP_TRIGGER ,
.Nm SQLITE_DROP_TEMP_VIEW ,
.Nm SQLITE_DROP_TRIGGER ,
.Nm SQLITE_DROP_VIEW ,
.Nm SQLITE_INSERT ,
.Nm SQLITE_PRAGMA ,
.Nm SQLITE_READ ,
.Nm SQLITE_SELECT ,
.Nm SQLITE_TRANSACTION ,
.Nm SQLITE_UPDATE ,
.Nm SQLITE_ATTACH ,
.Nm SQLITE_DETACH ,
.Nm SQLITE_ALTER_TABLE ,
.Nm SQLITE_REINDEX ,
.Nm SQLITE_ANALYZE ,
.Nm SQLITE_CREATE_VTABLE ,
.Nm SQLITE_DROP_VTABLE ,
.Nm SQLITE_FUNCTION ,
.Nm SQLITE_SAVEPOINT ,
.Nm SQLITE_COPY ,
.Nm SQLITE_RECURSIVE
.Nd authorizer action codes
.Sh SYNOPSIS
.In sqlite3.h
.Fd #define SQLITE_CREATE_INDEX
.Fd #define SQLITE_CREATE_TABLE
.Fd #define SQLITE_CREATE_TEMP_INDEX
.Fd #define SQLITE_CREATE_TEMP_TABLE
.Fd #define SQLITE_CREATE_TEMP_TRIGGER
.Fd #define SQLITE_CREATE_TEMP_VIEW
.Fd #define SQLITE_CREATE_TRIGGER
.Fd #define SQLITE_CREATE_VIEW
.Fd #define SQLITE_DELETE
.Fd #define SQLITE_DROP_INDEX
.Fd #define SQLITE_DROP_TABLE
.Fd #define SQLITE_DROP_TEMP_INDEX
.Fd #define SQLITE_DROP_TEMP_TABLE
.Fd #define SQLITE_DROP_TEMP_TRIGGER
.Fd #define SQLITE_DROP_TEMP_VIEW
.Fd #define SQLITE_DROP_TRIGGER
.Fd #define SQLITE_DROP_VIEW
.Fd #define SQLITE_INSERT
.Fd #define SQLITE_PRAGMA
.Fd #define SQLITE_READ
.Fd #define SQLITE_SELECT
.Fd #define SQLITE_TRANSACTION
.Fd #define SQLITE_UPDATE
.Fd #define SQLITE_ATTACH
.Fd #define SQLITE_DETACH
.Fd #define SQLITE_ALTER_TABLE
.Fd #define SQLITE_REINDEX
.Fd #define SQLITE_ANALYZE
.Fd #define SQLITE_CREATE_VTABLE
.Fd #define SQLITE_DROP_VTABLE
.Fd #define SQLITE_FUNCTION
.Fd #define SQLITE_SAVEPOINT
.Fd #define SQLITE_COPY
.Fd #define SQLITE_RECURSIVE
.Sh DESCRIPTION
The
.Fn sqlite3_set_authorizer
interface registers a callback function that is invoked to authorize
certain SQL statement actions.
The second parameter to the callback is an integer code that specifies
what action is being authorized.
These are the integer action codes that the authorizer callback may
be passed.
.Pp
These action code values signify what kind of operation is to be authorized.
The 3rd and 4th parameters to the authorization callback function will
be parameters or NULL depending on which of these codes is used as
the second parameter.
The 5th parameter to the authorizer callback is the name of the database
("main", "temp", etc.) if applicable.
The 6th parameter to the authorizer callback is the name of the inner-most
trigger or view that is responsible for the access attempt or NULL
if this access attempt is directly from top-level SQL code.
.Sh IMPLEMENTATION NOTES
These declarations were extracted from the
interface documentation at line 3234.
.Bd -literal
/******************************************* 3rd ************ 4th ***********/
#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */
#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */
#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */
#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */
#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */
#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */
#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */
#define SQLITE_CREATE_VIEW 8 /* View Name NULL */
#define SQLITE_DELETE 9 /* Table Name NULL */
#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */
#define SQLITE_DROP_TABLE 11 /* Table Name NULL */
#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */
#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */
#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */
#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */
#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */
#define SQLITE_DROP_VIEW 17 /* View Name NULL */
#define SQLITE_INSERT 18 /* Table Name NULL */
#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */
#define SQLITE_READ 20 /* Table Name Column Name */
#define SQLITE_SELECT 21 /* NULL NULL */
#define SQLITE_TRANSACTION 22 /* Operation NULL */
#define SQLITE_UPDATE 23 /* Table Name Column Name */
#define SQLITE_ATTACH 24 /* Filename NULL */
#define SQLITE_DETACH 25 /* Database Name NULL */
#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */
#define SQLITE_REINDEX 27 /* Index Name NULL */
#define SQLITE_ANALYZE 28 /* Table Name NULL */
#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */
#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */
#define SQLITE_FUNCTION 31 /* NULL Function Name */
#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */
#define SQLITE_COPY 0 /* No longer used */
#define SQLITE_RECURSIVE 33 /* NULL NULL */
.Ed
.Sh SEE ALSO
.Xr sqlite3_set_authorizer 3
|