PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LTP GCOV extension - code coverage report
Current view: directory - pdo_sqlite/sqlite/src - keywordhash.h
Test: PHP Code Coverage
Date: 2009-11-19 Instrumented lines: 9
Code covered: 77.8 % Executed lines: 7
Legend: not executed executed

       1                 : /***** This file contains automatically generated code ******
       2                 : **
       3                 : ** The code in this file has been automatically generated by
       4                 : **
       5                 : **     $Header$
       6                 : **
       7                 : ** The code in this file implements a function that determines whether
       8                 : ** or not a given identifier is really an SQL keyword.  The same thing
       9                 : ** might be implemented more directly using a hand-written hash table.
      10                 : ** But by using this automatically generated code, the size of the code
      11                 : ** is substantially reduced.  This is important for embedded applications
      12                 : ** on platforms with limited memory.
      13                 : */
      14                 : /* Hash score: 165 */
      15            7454 : static int keywordCode(const char *z, int n){
      16                 :   static const char zText[536] =
      17                 :     "ABORTABLEFTEMPORARYADDATABASELECTHENDEFAULTRANSACTIONATURALTER"
      18                 :     "AISEACHECKEYAFTEREFERENCESCAPELSEXCEPTRIGGEREGEXPLAINITIALLYANALYZE"
      19                 :     "XCLUSIVEXISTSANDEFERRABLEATTACHAVINGLOBEFOREIGNOREINDEXAUTOINCREMENT"
      20                 :     "BEGINNERENAMEBETWEENOTNULLIKEBYCASCADEFERREDELETECASECASTCOLLATE"
      21                 :     "COLUMNCOMMITCONFLICTCONSTRAINTERSECTCREATECROSSCURRENT_DATECURRENT_TIMESTAMP"
      22                 :     "LANDESCDETACHDISTINCTDROPRAGMATCHFAILIMITFROMFULLGROUPDATEIFIMMEDIATE"
      23                 :     "INSERTINSTEADINTOFFSETISNULLJOINORDEREPLACEOUTERESTRICTPRIMARY"
      24                 :     "QUERYRIGHTROLLBACKROWHENUNIONUNIQUEUSINGVACUUMVALUESVIEWHEREVIRTUAL"
      25                 :   ;
      26                 :   static const unsigned char aHash[127] = {
      27                 :       91,  79, 106,  90,   0,   4,   0,   0, 113,   0,  82,   0,   0,
      28                 :       94,  43,  75,  92,   0, 105, 108,  96,  89,   0,  10,   0,   0,
      29                 :      112,   0, 116, 102,   0,  28,  47,   0,  40,   0,   0,  64,  70,
      30                 :        0,  62,  19,   0, 104,  35, 103,   0, 107,  73,   0,   0,  33,
      31                 :        0,  60,  36,   0,   8,   0, 114,  37,  12,   0,  76,  39,  25,
      32                 :       65,   0,   0,  31,  80,  52,  30,  49,  20,  87,   0,  34,   0,
      33                 :       74,  26,   0,  71,   0,   0,   0,  63,  46,  66,  22,  86,  29,
      34                 :       68,  85,   0,   1,   0,   9, 100,  57,  18,   0, 111,  81,  98,
      35                 :       53,   6,  84,   0,   0,  48,  93,   0, 101,   0,  69,   0,   0,
      36                 :       15,   0, 115,  50,  55,   0,   2,  54,   0, 110,
      37                 :   };
      38                 :   static const unsigned char aNext[116] = {
      39                 :        0,   0,   0,   0,   0,   3,   0,   0,   0,   0,   0,   0,   0,
      40                 :        0,   0,   0,   0,   0,   0,   0,   0,  17,   0,   0,   0,   0,
      41                 :        0,  11,   0,   0,   0,   0,   5,  13,   7,   0,   0,   0,   0,
      42                 :        0,   0,   0,   0,   0,   0,  42,   0,   0,   0,   0,   0,   0,
      43                 :        0,  16,   0,  23,  51,   0,   0,   0,   0,  44,   0,  58,   0,
      44                 :        0,   0,   0,   0,   0,   0,   0,  72,  41,   0,  24,  59,  21,
      45                 :        0,  78,   0,   0,  67,   0,   0,  83,  45,   0,   0,   0,   0,
      46                 :        0,   0,   0,   0,  38,  95,  97,   0,   0,  99,   0,  32,   0,
      47                 :       14,  27,  77,   0,  56,  88,   0,   0,   0,  61,   0, 109,
      48                 :   };
      49                 :   static const unsigned char aLen[116] = {
      50                 :        5,   5,   4,   4,   9,   2,   3,   8,   2,   6,   4,   3,   7,
      51                 :       11,   2,   7,   5,   5,   4,   5,   3,   5,  10,   6,   4,   6,
      52                 :        7,   6,   7,   9,   3,   7,   9,   6,   3,  10,   6,   6,   4,
      53                 :        6,   3,   7,   6,   7,   5,  13,   2,   2,   5,   5,   6,   7,
      54                 :        3,   7,   4,   4,   2,   7,   3,   8,   6,   4,   4,   7,   6,
      55                 :        6,   8,  10,   9,   6,   5,  12,  12,  17,   4,   4,   6,   8,
      56                 :        2,   4,   6,   5,   4,   5,   4,   4,   5,   6,   2,   9,   6,
      57                 :        7,   4,   2,   6,   3,   6,   4,   5,   7,   5,   8,   7,   5,
      58                 :        5,   8,   3,   4,   5,   6,   5,   6,   6,   4,   5,   7,
      59                 :   };
      60                 :   static const unsigned short int aOffset[116] = {
      61                 :        0,   4,   7,  10,  10,  14,  19,  21,  26,  27,  32,  34,  36,
      62                 :       42,  51,  52,  57,  61,  65,  67,  71,  74,  78,  86,  91,  94,
      63                 :       99, 105, 108, 113, 118, 122, 128, 136, 142, 144, 154, 159, 164,
      64                 :      167, 169, 169, 173, 177, 179, 184, 186, 188, 197, 200, 204, 210,
      65                 :      216, 216, 219, 222, 226, 228, 229, 233, 240, 246, 250, 254, 261,
      66                 :      267, 273, 281, 288, 297, 303, 308, 320, 320, 336, 340, 344, 350,
      67                 :      351, 358, 361, 365, 370, 373, 378, 382, 386, 389, 395, 397, 406,
      68                 :      412, 419, 422, 422, 425, 428, 434, 438, 442, 449, 453, 461, 468,
      69                 :      473, 478, 486, 488, 492, 497, 503, 508, 514, 520, 523, 528,
      70                 :   };
      71                 :   static const unsigned char aCode[116] = {
      72                 :     TK_ABORT,      TK_TABLE,      TK_JOIN_KW,    TK_TEMP,       TK_TEMP,       
      73                 :     TK_OR,         TK_ADD,        TK_DATABASE,   TK_AS,         TK_SELECT,     
      74                 :     TK_THEN,       TK_END,        TK_DEFAULT,    TK_TRANSACTION,TK_ON,         
      75                 :     TK_JOIN_KW,    TK_ALTER,      TK_RAISE,      TK_EACH,       TK_CHECK,      
      76                 :     TK_KEY,        TK_AFTER,      TK_REFERENCES, TK_ESCAPE,     TK_ELSE,       
      77                 :     TK_EXCEPT,     TK_TRIGGER,    TK_LIKE_KW,    TK_EXPLAIN,    TK_INITIALLY,  
      78                 :     TK_ALL,        TK_ANALYZE,    TK_EXCLUSIVE,  TK_EXISTS,     TK_AND,        
      79                 :     TK_DEFERRABLE, TK_ATTACH,     TK_HAVING,     TK_LIKE_KW,    TK_BEFORE,     
      80                 :     TK_FOR,        TK_FOREIGN,    TK_IGNORE,     TK_REINDEX,    TK_INDEX,      
      81                 :     TK_AUTOINCR,   TK_TO,         TK_IN,         TK_BEGIN,      TK_JOIN_KW,    
      82                 :     TK_RENAME,     TK_BETWEEN,    TK_NOT,        TK_NOTNULL,    TK_NULL,       
      83                 :     TK_LIKE_KW,    TK_BY,         TK_CASCADE,    TK_ASC,        TK_DEFERRED,   
      84                 :     TK_DELETE,     TK_CASE,       TK_CAST,       TK_COLLATE,    TK_COLUMNKW,   
      85                 :     TK_COMMIT,     TK_CONFLICT,   TK_CONSTRAINT, TK_INTERSECT,  TK_CREATE,     
      86                 :     TK_JOIN_KW,    TK_CTIME_KW,   TK_CTIME_KW,   TK_CTIME_KW,   TK_PLAN,       
      87                 :     TK_DESC,       TK_DETACH,     TK_DISTINCT,   TK_IS,         TK_DROP,       
      88                 :     TK_PRAGMA,     TK_MATCH,      TK_FAIL,       TK_LIMIT,      TK_FROM,       
      89                 :     TK_JOIN_KW,    TK_GROUP,      TK_UPDATE,     TK_IF,         TK_IMMEDIATE,  
      90                 :     TK_INSERT,     TK_INSTEAD,    TK_INTO,       TK_OF,         TK_OFFSET,     
      91                 :     TK_SET,        TK_ISNULL,     TK_JOIN,       TK_ORDER,      TK_REPLACE,    
      92                 :     TK_JOIN_KW,    TK_RESTRICT,   TK_PRIMARY,    TK_QUERY,      TK_JOIN_KW,    
      93                 :     TK_ROLLBACK,   TK_ROW,        TK_WHEN,       TK_UNION,      TK_UNIQUE,     
      94                 :     TK_USING,      TK_VACUUM,     TK_VALUES,     TK_VIEW,       TK_WHERE,      
      95                 :     TK_VIRTUAL,    
      96                 :   };
      97                 :   int h, i;
      98            7454 :   if( n<2 ) return TK_ID;
      99            7377 :   h = ((charMap(z[0])*4) ^
     100                 :       (charMap(z[n-1])*3) ^
     101                 :       n) % 127;
     102           11101 :   for(i=((int)aHash[h])-1; i>=0; i=((int)aNext[i])-1){
     103            6623 :     if( aLen[i]==n && sqlite3StrNICmp(&zText[aOffset[i]],z,n)==0 ){
     104            2899 :       return aCode[i];
     105                 :     }
     106                 :   }
     107            4478 :   return TK_ID;
     108                 : }
     109               0 : int sqlite3KeywordCode(const unsigned char *z, int n){
     110               0 :   return keywordCode((char*)z, n);
     111                 : }

Generated by: LTP GCOV extension version 1.5

Generated at Thu, 19 Nov 2009 08:20:16 +0000 (5 days ago)

Copyright © 2005-2009 The PHP Group
All rights reserved.