>  기사  >  데이터 베이스  >  SQLite 授权动作编码(AuthorizerAction Codes)_MySQL

SQLite 授权动作编码(AuthorizerAction Codes)_MySQL

PHP中文网
PHP中文网원래의
2016-05-27 19:11:441285검색

/*******************************************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      ModuleName     */
#define SQLITE_DROP_VTABLE          30  /* Table Name      ModuleName     */
#define SQLITE_FUNCTION             31   /* NULL            Function Name   */
#define SQLITE_SAVEPOINT            32  /* Operation       SavepointName  */
#define SQLITE_COPY                  0   /* No longer used */
#define SQLITE_RECURSIVE            33  /* NULL            NULL            */


 

sqlite3_set_authorizer接口注册一个回调函数,该回调函数将被调用去授权执行SQL语句。回调函数的第二个参数是一个整型,指定了那些操作是被授权的,这些整型的动作编码(integer action codes)是回调函数可以通过的。

 

这些动作编号值指定了哪种操作是被允许的。第三和第四个参数是否为NULL,还是其他的参数,完全依赖于第二个参数的设置,第五个参数是数据库的名称(main,temp,或者其他)if applicable.第六个参数尝试访问的内置触发器或者视图,当然如果为NULL,表示尝试访问来自于最高级的SQL编码(The 6th parameter to the authorizer callback is the nameof the inner-most trigger or view that is responsible for the access attempt orNULL if this access attempt is directly from top-level SQL code).

以上就是SQLite 授权动作编码(AuthorizerAction Codes)_MySQL的内容,更多相关内容请关注PHP中文网(www.php.cn)!


성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.