Skip to main content

Module authorizer

Module authorizer 

Source
Available on crate feature __sqlite-shared only.
Expand description

Types for the SQLite authorizer callback.

See sqlite3_set_authorizer and the action code constants.

The authorizer callback receives an AuthorizerContext. It is an enum with one variant per SQLite action code, and every variant carries the arguments for that action under descriptive field names, so there is no need to consult a table of what each positional argument means.

Two fields recur across variants. database is the name of the database ("main", "temp", or an ATTACH alias) an object lives in, when SQLite reports it. accessor is the name of the inner-most trigger or view responsible for the access, or None when the access is directly from top-level SQL. A string argument is None when SQLite passes NULL or a value that is not valid UTF-8.

Structs§

AlterTable
Authorizing an ALTER TABLE statement.
Analyze
Authorizing an ANALYZE statement.
Attach
Authorizing an ATTACH DATABASE statement.
CreateIndex
Authorizing a CREATE INDEX statement.
CreateTable
Authorizing a CREATE TABLE statement.
CreateTempIndex
Authorizing a CREATE TEMP INDEX statement.
CreateTempTable
Authorizing a CREATE TEMP TABLE statement.
CreateTempTrigger
Authorizing a CREATE TEMP TRIGGER statement.
CreateTempView
Authorizing a CREATE TEMP VIEW statement.
CreateTrigger
Authorizing a CREATE TRIGGER statement.
CreateVTable
Authorizing a CREATE VIRTUAL TABLE statement.
CreateView
Authorizing a CREATE VIEW statement.
Delete
Authorizing a DELETE statement.
Detach
Authorizing a DETACH DATABASE statement.
DropIndex
Authorizing a DROP INDEX statement.
DropTable
Authorizing a DROP TABLE statement.
DropTempIndex
Authorizing a DROP TEMP INDEX statement.
DropTempTable
Authorizing a DROP TEMP TABLE statement.
DropTempTrigger
Authorizing a DROP TEMP TRIGGER statement.
DropTempView
Authorizing a DROP TEMP VIEW statement.
DropTrigger
Authorizing a DROP TRIGGER statement.
DropVTable
Authorizing a DROP VIRTUAL TABLE statement.
DropView
Authorizing a DROP VIEW statement.
Function
Authorizing a SQL function call.
Insert
Authorizing an INSERT statement.
Pragma
Authorizing a PRAGMA statement.
Read
Authorizing a column read.
Recursive
Authorizing a recursive SELECT.
Reindex
Authorizing a REINDEX statement.
Savepoint
Authorizing a SAVEPOINT operation.
Select
Authorizing a SELECT statement.
Transaction
Authorizing a transaction control operation (BEGIN, COMMIT, ROLLBACK).
Unknown
An action code SQLite reported that this version of diesel does not model.
Update
Authorizing an UPDATE statement.

Enums§

AuthorizerContext
Context information passed to the authorizer callback.
AuthorizerDecision
Authorizer callback decision.