/ Check-in [972e75bb]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Version 3.7.12.1
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | apple-osx
Files: files | file ages | folders
SHA1: 972e75bb5d7349297b94cec2f19561ee105a22cf
User & Date: drh 2012-05-22 13:11:12
Context
2012-05-31
00:21
Only call fchown when running as root and supporting files mismatch the database owner & perms check-in: ed53b645 user: adam tags: apple-osx
2012-05-22
13:11
Version 3.7.12.1 check-in: 972e75bb user: drh tags: apple-osx
02:45
Version 3.7.12.1 check-in: 6d326d44 user: drh tags: trunk, release, version-3.7.12.1
2012-05-17
14:17
Stylistic fixes: limit source code line length to 80 characters. C89-style comments only, not C++/C99 style. check-in: 4068abe0 user: drh tags: apple-osx
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to VERSION.

     1         -3.7.12
            1  +3.7.12.1

Changes to configure.

     1      1   #! /bin/sh
     2      2   # Guess values for system-dependent variables and create Makefiles.
     3         -# Generated by GNU Autoconf 2.62 for sqlite 3.7.12.
            3  +# Generated by GNU Autoconf 2.62 for sqlite 3.7.12.1.
     4      4   #
     5      5   # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
     6      6   # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
     7      7   # This configure script is free software; the Free Software Foundation
     8      8   # gives unlimited permission to copy, distribute and modify it.
     9      9   ## --------------------- ##
    10     10   ## M4sh Initialization.  ##
................................................................................
   739    739   MFLAGS=
   740    740   MAKEFLAGS=
   741    741   SHELL=${CONFIG_SHELL-/bin/sh}
   742    742   
   743    743   # Identity of this package.
   744    744   PACKAGE_NAME='sqlite'
   745    745   PACKAGE_TARNAME='sqlite'
   746         -PACKAGE_VERSION='3.7.12'
   747         -PACKAGE_STRING='sqlite 3.7.12'
          746  +PACKAGE_VERSION='3.7.12.1'
          747  +PACKAGE_STRING='sqlite 3.7.12.1'
   748    748   PACKAGE_BUGREPORT=''
   749    749   
   750    750   # Factoring default headers for most tests.
   751    751   ac_includes_default="\
   752    752   #include <stdio.h>
   753    753   #ifdef HAVE_SYS_TYPES_H
   754    754   # include <sys/types.h>
................................................................................
  1481   1481   #
  1482   1482   # Report the --help message.
  1483   1483   #
  1484   1484   if test "$ac_init_help" = "long"; then
  1485   1485     # Omit some internal or obsolete options to make the list less imposing.
  1486   1486     # This message is too long to be a string in the A/UX 3.1 sh.
  1487   1487     cat <<_ACEOF
  1488         -\`configure' configures sqlite 3.7.12 to adapt to many kinds of systems.
         1488  +\`configure' configures sqlite 3.7.12.1 to adapt to many kinds of systems.
  1489   1489   
  1490   1490   Usage: $0 [OPTION]... [VAR=VALUE]...
  1491   1491   
  1492   1492   To assign environment variables (e.g., CC, CFLAGS...), specify them as
  1493   1493   VAR=VALUE.  See below for descriptions of some of the useful variables.
  1494   1494   
  1495   1495   Defaults for the options are specified in brackets.
................................................................................
  1546   1546     --build=BUILD     configure for building on BUILD [guessed]
  1547   1547     --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  1548   1548   _ACEOF
  1549   1549   fi
  1550   1550   
  1551   1551   if test -n "$ac_init_help"; then
  1552   1552     case $ac_init_help in
  1553         -     short | recursive ) echo "Configuration of sqlite 3.7.12:";;
         1553  +     short | recursive ) echo "Configuration of sqlite 3.7.12.1:";;
  1554   1554      esac
  1555   1555     cat <<\_ACEOF
  1556   1556   
  1557   1557   Optional Features:
  1558   1558     --disable-option-checking  ignore unrecognized --enable/--with options
  1559   1559     --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  1560   1560     --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
  1662   1662       cd "$ac_pwd" || { ac_status=$?; break; }
  1663   1663     done
  1664   1664   fi
  1665   1665   
  1666   1666   test -n "$ac_init_help" && exit $ac_status
  1667   1667   if $ac_init_version; then
  1668   1668     cat <<\_ACEOF
  1669         -sqlite configure 3.7.12
         1669  +sqlite configure 3.7.12.1
  1670   1670   generated by GNU Autoconf 2.62
  1671   1671   
  1672   1672   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
  1673   1673   2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
  1674   1674   This configure script is free software; the Free Software Foundation
  1675   1675   gives unlimited permission to copy, distribute and modify it.
  1676   1676   _ACEOF
  1677   1677     exit
  1678   1678   fi
  1679   1679   cat >config.log <<_ACEOF
  1680   1680   This file contains any messages produced by compilers while
  1681   1681   running configure, to aid debugging if configure makes a mistake.
  1682   1682   
  1683         -It was created by sqlite $as_me 3.7.12, which was
         1683  +It was created by sqlite $as_me 3.7.12.1, which was
  1684   1684   generated by GNU Autoconf 2.62.  Invocation command line was
  1685   1685   
  1686   1686     $ $0 $@
  1687   1687   
  1688   1688   _ACEOF
  1689   1689   exec 5>>config.log
  1690   1690   {
................................................................................
 14028  14028   
 14029  14029   exec 6>&1
 14030  14030   
 14031  14031   # Save the log message, to keep $[0] and so on meaningful, and to
 14032  14032   # report actual input values of CONFIG_FILES etc. instead of their
 14033  14033   # values after options handling.
 14034  14034   ac_log="
 14035         -This file was extended by sqlite $as_me 3.7.12, which was
        14035  +This file was extended by sqlite $as_me 3.7.12.1, which was
 14036  14036   generated by GNU Autoconf 2.62.  Invocation command line was
 14037  14037   
 14038  14038     CONFIG_FILES    = $CONFIG_FILES
 14039  14039     CONFIG_HEADERS  = $CONFIG_HEADERS
 14040  14040     CONFIG_LINKS    = $CONFIG_LINKS
 14041  14041     CONFIG_COMMANDS = $CONFIG_COMMANDS
 14042  14042     $ $0 $@
................................................................................
 14081  14081   $config_commands
 14082  14082   
 14083  14083   Report bugs to <bug-autoconf@gnu.org>."
 14084  14084   
 14085  14085   _ACEOF
 14086  14086   cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 14087  14087   ac_cs_version="\\
 14088         -sqlite config.status 3.7.12
        14088  +sqlite config.status 3.7.12.1
 14089  14089   configured by $0, generated by GNU Autoconf 2.62,
 14090  14090     with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 14091  14091   
 14092  14092   Copyright (C) 2008 Free Software Foundation, Inc.
 14093  14093   This config.status script is free software; the Free Software Foundation
 14094  14094   gives unlimited permission to copy, distribute and modify it."
 14095  14095   

Changes to src/build.c.

   498    498   ** Remove the memory data structures associated with the given
   499    499   ** Table.  No changes are made to disk by this routine.
   500    500   **
   501    501   ** This routine just deletes the data structure.  It does not unlink
   502    502   ** the table data structure from the hash table.  But it does destroy
   503    503   ** memory structures of the indices and foreign keys associated with 
   504    504   ** the table.
          505  +**
          506  +** The db parameter is optional.  It is needed if the Table object 
          507  +** contains lookaside memory.  (Table objects in the schema do not use
          508  +** lookaside memory, but some ephemeral Table objects do.)  Or the
          509  +** db parameter can be used with db->pnBytesFreed to measure the memory
          510  +** used by the Table object.
   505    511   */
   506    512   void sqlite3DeleteTable(sqlite3 *db, Table *pTable){
   507    513     Index *pIndex, *pNext;
          514  +  TESTONLY( int nLookaside; ) /* Used to verify lookaside not used for schema */
   508    515   
   509    516     assert( !pTable || pTable->nRef>0 );
   510    517   
   511    518     /* Do not delete the table until the reference count reaches zero. */
   512    519     if( !pTable ) return;
   513    520     if( ((!db || db->pnBytesFreed==0) && (--pTable->nRef)>0) ) return;
          521  +
          522  +  /* Record the number of outstanding lookaside allocations in schema Tables
          523  +  ** prior to doing any free() operations.  Since schema Tables do not use
          524  +  ** lookaside, this number should not change. */
          525  +  TESTONLY( nLookaside = (db && (pTable->tabFlags & TF_Ephemeral)==0) ?
          526  +                         db->lookaside.nOut : 0 );
   514    527   
   515    528     /* Delete all indices associated with this table. */
   516    529     for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){
   517    530       pNext = pIndex->pNext;
   518    531       assert( pIndex->pSchema==pTable->pSchema );
   519    532       if( !db || db->pnBytesFreed==0 ){
   520    533         char *zName = pIndex->zName; 
................................................................................
   539    552   #ifndef SQLITE_OMIT_CHECK
   540    553     sqlite3ExprListDelete(db, pTable->pCheck);
   541    554   #endif
   542    555   #ifndef SQLITE_OMIT_VIRTUALTABLE
   543    556     sqlite3VtabClear(db, pTable);
   544    557   #endif
   545    558     sqlite3DbFree(db, pTable);
          559  +
          560  +  /* Verify that no lookaside memory was used by schema tables */
          561  +  assert( nLookaside==0 || nLookaside==db->lookaside.nOut );
   546    562   }
   547    563   
   548    564   /*
   549    565   ** Unlink the given table from the hash tables and the delete the
   550    566   ** table structure with all its indices and foreign keys.
   551    567   */
   552    568   void sqlite3UnlinkAndDeleteTable(sqlite3 *db, int iDb, const char *zTabName){
................................................................................
  1487   1503       memset(&sSrc, 0, sizeof(sSrc));
  1488   1504       sSrc.nSrc = 1;
  1489   1505       sSrc.a[0].zName = p->zName;
  1490   1506       sSrc.a[0].pTab = p;
  1491   1507       sSrc.a[0].iCursor = -1;
  1492   1508       sNC.pParse = pParse;
  1493   1509       sNC.pSrcList = &sSrc;
  1494         -    sNC.isCheck = 1;
         1510  +    sNC.ncFlags = NC_IsCheck;
  1495   1511       pList = p->pCheck;
  1496   1512       for(i=0; i<pList->nExpr; i++){
  1497   1513         if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
  1498   1514           return;
  1499   1515         }
  1500   1516       }
  1501   1517     }

Changes to src/expr.c.

  3774   3774     if( sqlite3ExprCompare(pA->pRight, pB->pRight) ) return 2;
  3775   3775     if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList) ) return 2;
  3776   3776     if( pA->iTable!=pB->iTable || pA->iColumn!=pB->iColumn ) return 2;
  3777   3777     if( ExprHasProperty(pA, EP_IntValue) ){
  3778   3778       if( !ExprHasProperty(pB, EP_IntValue) || pA->u.iValue!=pB->u.iValue ){
  3779   3779         return 2;
  3780   3780       }
  3781         -  }else if( pA->op!=TK_COLUMN && pA->op!=TK_AGG_COLUMN && pA->u.zToken ){
         3781  +  }else if( pA->op!=TK_COLUMN && ALWAYS(pA->op!=TK_AGG_COLUMN) && pA->u.zToken){
  3782   3782       if( ExprHasProperty(pB, EP_IntValue) || NEVER(pB->u.zToken==0) ) return 2;
  3783   3783       if( strcmp(pA->u.zToken,pB->u.zToken)!=0 ){
  3784   3784         return 2;
  3785   3785       }
  3786   3786     }
  3787   3787     if( (pA->flags & EP_ExpCollate)!=(pB->flags & EP_ExpCollate) ) return 1;
  3788   3788     if( (pA->flags & EP_ExpCollate)!=0 && pA->pColl!=pB->pColl ) return 2;
................................................................................
  3961   3961               break;
  3962   3962             } /* endif pExpr->iTable==pItem->iCursor */
  3963   3963           } /* end loop over pSrcList */
  3964   3964         }
  3965   3965         return WRC_Prune;
  3966   3966       }
  3967   3967       case TK_AGG_FUNCTION: {
  3968         -      if( !sqlite3FunctionUsesOtherSrc(pExpr, pSrcList) ){
         3968  +      if( (pNC->ncFlags & NC_InAggFunc)==0
         3969  +       && !sqlite3FunctionUsesOtherSrc(pExpr, pSrcList)
         3970  +      ){
  3969   3971           /* Check to see if pExpr is a duplicate of another aggregate 
  3970   3972           ** function that is already in the pAggInfo structure
  3971   3973           */
  3972   3974           struct AggInfo_func *pItem = pAggInfo->aFunc;
  3973   3975           for(i=0; i<pAggInfo->nFunc; i++, pItem++){
  3974   3976             if( sqlite3ExprCompare(pItem->pExpr, pExpr)==0 ){
  3975   3977               break;
................................................................................
  3998   4000           }
  3999   4001           /* Make pExpr point to the appropriate pAggInfo->aFunc[] entry
  4000   4002           */
  4001   4003           assert( !ExprHasAnyProperty(pExpr, EP_TokenOnly|EP_Reduced) );
  4002   4004           ExprSetIrreducible(pExpr);
  4003   4005           pExpr->iAgg = (i16)i;
  4004   4006           pExpr->pAggInfo = pAggInfo;
  4005         -        return WRC_Prune;
  4006   4007         }
         4008  +      return WRC_Prune;
  4007   4009       }
  4008   4010     }
  4009   4011     return WRC_Continue;
  4010   4012   }
  4011   4013   static int analyzeAggregatesInSelect(Walker *pWalker, Select *pSelect){
  4012   4014     UNUSED_PARAMETER(pWalker);
  4013   4015     UNUSED_PARAMETER(pSelect);

Changes to src/malloc.c.

   487    487     if( db ){
   488    488       if( db->pnBytesFreed ){
   489    489         *db->pnBytesFreed += sqlite3DbMallocSize(db, p);
   490    490         return;
   491    491       }
   492    492       if( isLookaside(db, p) ){
   493    493         LookasideSlot *pBuf = (LookasideSlot*)p;
          494  +#if SQLITE_DEBUG
          495  +      /* Trash all content in the buffer being freed */
          496  +      memset(p, 0xaa, db->lookaside.sz);
          497  +#endif
   494    498         pBuf->pNext = db->lookaside.pFree;
   495    499         db->lookaside.pFree = pBuf;
   496    500         db->lookaside.nOut--;
   497    501         return;
   498    502       }
   499    503     }
   500    504     assert( sqlite3MemdebugHasType(p, MEMTYPE_DB) );

Changes to src/prepare.c.

   705    705     rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
   706    706     if( rc==SQLITE_SCHEMA ){
   707    707       sqlite3_finalize(*ppStmt);
   708    708       rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
   709    709     }
   710    710     sqlite3BtreeLeaveAll(db);
   711    711     sqlite3_mutex_leave(db->mutex);
          712  +  assert( rc==SQLITE_OK || *ppStmt==0 );
   712    713     return rc;
   713    714   }
   714    715   
   715    716   /*
   716    717   ** Rerun the compilation of a statement after a schema change.
   717    718   **
   718    719   ** If the statement is successfully recompiled, return SQLITE_OK. Otherwise,

Changes to src/resolve.c.

   307    307           char *zAs = pEList->a[j].zName;
   308    308           if( zAs!=0 && sqlite3StrICmp(zAs, zCol)==0 ){
   309    309             Expr *pOrig;
   310    310             assert( pExpr->pLeft==0 && pExpr->pRight==0 );
   311    311             assert( pExpr->x.pList==0 );
   312    312             assert( pExpr->x.pSelect==0 );
   313    313             pOrig = pEList->a[j].pExpr;
   314         -          if( !pNC->allowAgg && ExprHasProperty(pOrig, EP_Agg) ){
          314  +          if( (pNC->ncFlags&NC_AllowAgg)==0 && ExprHasProperty(pOrig, EP_Agg) ){
   315    315               sqlite3ErrorMsg(pParse, "misuse of aliased aggregate %s", zAs);
   316    316               return WRC_Abort;
   317    317             }
   318    318             resolveAlias(pParse, pEList, j, pExpr, "");
   319    319             cnt = 1;
   320    320             pMatch = 0;
   321    321             assert( zTab==0 && zDb==0 );
................................................................................
   552    552               pNC->nErr++;
   553    553             }
   554    554             pExpr->op = TK_NULL;
   555    555             return WRC_Prune;
   556    556           }
   557    557         }
   558    558   #endif
   559         -      if( is_agg && !pNC->allowAgg ){
          559  +      if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){
   560    560           sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
   561    561           pNC->nErr++;
   562    562           is_agg = 0;
   563    563         }else if( no_such_func ){
   564    564           sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
   565    565           pNC->nErr++;
   566    566         }else if( wrong_num_args ){
   567    567           sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
   568    568                nId, zId);
   569    569           pNC->nErr++;
   570    570         }
   571    571         if( is_agg ){
   572    572           pExpr->op = TK_AGG_FUNCTION;
   573         -        pNC->hasAgg = 1;
          573  +        pNC->ncFlags |= NC_HasAgg;
   574    574         }
   575         -      if( is_agg ) pNC->allowAgg = 0;
          575  +      if( is_agg ) pNC->ncFlags &= ~NC_AllowAgg;
   576    576         sqlite3WalkExprList(pWalker, pList);
   577         -      if( is_agg ) pNC->allowAgg = 1;
          577  +      if( is_agg ) pNC->ncFlags |= NC_AllowAgg;
   578    578         /* FIX ME:  Compute pExpr->affinity based on the expected return
   579    579         ** type of the function 
   580    580         */
   581    581         return WRC_Prune;
   582    582       }
   583    583   #ifndef SQLITE_OMIT_SUBQUERY
   584    584       case TK_SELECT:
................................................................................
   585    585       case TK_EXISTS:  testcase( pExpr->op==TK_EXISTS );
   586    586   #endif
   587    587       case TK_IN: {
   588    588         testcase( pExpr->op==TK_IN );
   589    589         if( ExprHasProperty(pExpr, EP_xIsSelect) ){
   590    590           int nRef = pNC->nRef;
   591    591   #ifndef SQLITE_OMIT_CHECK
   592         -        if( pNC->isCheck ){
          592  +        if( (pNC->ncFlags & NC_IsCheck)!=0 ){
   593    593             sqlite3ErrorMsg(pParse,"subqueries prohibited in CHECK constraints");
   594    594           }
   595    595   #endif
   596    596           sqlite3WalkSelect(pWalker, pExpr->x.pSelect);
   597    597           assert( pNC->nRef>=nRef );
   598    598           if( nRef!=pNC->nRef ){
   599    599             ExprSetProperty(pExpr, EP_VarSelect);
   600    600           }
   601    601         }
   602    602         break;
   603    603       }
   604    604   #ifndef SQLITE_OMIT_CHECK
   605    605       case TK_VARIABLE: {
   606         -      if( pNC->isCheck ){
          606  +      if( (pNC->ncFlags & NC_IsCheck)!=0 ){
   607    607           sqlite3ErrorMsg(pParse,"parameters prohibited in CHECK constraints");
   608    608         }
   609    609         break;
   610    610       }
   611    611   #endif
   612    612     }
   613    613     return (pParse->nErr || pParse->db->mallocFailed) ? WRC_Abort : WRC_Continue;
................................................................................
   681    681   
   682    682     /* Resolve all names in the ORDER BY term expression
   683    683     */
   684    684     memset(&nc, 0, sizeof(nc));
   685    685     nc.pParse = pParse;
   686    686     nc.pSrcList = pSelect->pSrc;
   687    687     nc.pEList = pEList;
   688         -  nc.allowAgg = 1;
          688  +  nc.ncFlags = NC_AllowAgg;
   689    689     nc.nErr = 0;
   690    690     db = pParse->db;
   691    691     savedSuppErr = db->suppressErr;
   692    692     db->suppressErr = 1;
   693    693     rc = sqlite3ResolveExprNames(&nc, pE);
   694    694     db->suppressErr = savedSuppErr;
   695    695     if( rc ) return 0;
................................................................................
   983    983           sqlite3ResolveExprNames(&sNC, p->pOffset) ){
   984    984         return WRC_Abort;
   985    985       }
   986    986     
   987    987       /* Set up the local name-context to pass to sqlite3ResolveExprNames() to
   988    988       ** resolve the result-set expression list.
   989    989       */
   990         -    sNC.allowAgg = 1;
          990  +    sNC.ncFlags = NC_AllowAgg;
   991    991       sNC.pSrcList = p->pSrc;
   992    992       sNC.pNext = pOuterNC;
   993    993     
   994    994       /* Resolve names in the result set. */
   995    995       pEList = p->pEList;
   996    996       assert( pEList!=0 );
   997    997       for(i=0; i<pEList->nExpr; i++){
................................................................................
  1029   1029       }
  1030   1030     
  1031   1031       /* If there are no aggregate functions in the result-set, and no GROUP BY 
  1032   1032       ** expression, do not allow aggregates in any of the other expressions.
  1033   1033       */
  1034   1034       assert( (p->selFlags & SF_Aggregate)==0 );
  1035   1035       pGroupBy = p->pGroupBy;
  1036         -    if( pGroupBy || sNC.hasAgg ){
         1036  +    if( pGroupBy || (sNC.ncFlags & NC_HasAgg)!=0 ){
  1037   1037         p->selFlags |= SF_Aggregate;
  1038   1038       }else{
  1039         -      sNC.allowAgg = 0;
         1039  +      sNC.ncFlags &= ~NC_AllowAgg;
  1040   1040       }
  1041   1041     
  1042   1042       /* If a HAVING clause is present, then there must be a GROUP BY clause.
  1043   1043       */
  1044   1044       if( p->pHaving && !pGroupBy ){
  1045   1045         sqlite3ErrorMsg(pParse, "a GROUP BY clause is required before HAVING");
  1046   1046         return WRC_Abort;
................................................................................
  1061   1061         return WRC_Abort;
  1062   1062       }
  1063   1063   
  1064   1064       /* The ORDER BY and GROUP BY clauses may not refer to terms in
  1065   1065       ** outer queries 
  1066   1066       */
  1067   1067       sNC.pNext = 0;
  1068         -    sNC.allowAgg = 1;
         1068  +    sNC.ncFlags |= NC_AllowAgg;
  1069   1069   
  1070   1070       /* Process the ORDER BY clause for singleton SELECT statements.
  1071   1071       ** The ORDER BY clause for compounds SELECT statements is handled
  1072   1072       ** below, after all of the result-sets for all of the elements of
  1073   1073       ** the compound have been resolved.
  1074   1074       */
  1075   1075       if( !isCompound && resolveOrderGroupBy(&sNC, p, p->pOrderBy, "ORDER") ){
................................................................................
  1149   1149   **
  1150   1150   ** The "x" term of the order by is replaced by "a+b" to render:
  1151   1151   **
  1152   1152   **      SELECT a+b AS x, c+d AS y FROM t1 ORDER BY a+b;
  1153   1153   **
  1154   1154   ** Function calls are checked to make sure that the function is 
  1155   1155   ** defined and that the correct number of arguments are specified.
  1156         -** If the function is an aggregate function, then the pNC->hasAgg is
         1156  +** If the function is an aggregate function, then the NC_HasAgg flag is
  1157   1157   ** set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION.
  1158   1158   ** If an expression contains aggregate functions then the EP_Agg
  1159   1159   ** property on the expression is set.
  1160   1160   **
  1161   1161   ** An error message is left in pParse if anything is amiss.  The number
  1162   1162   ** if errors is returned.
  1163   1163   */
  1164   1164   int sqlite3ResolveExprNames( 
  1165   1165     NameContext *pNC,       /* Namespace to resolve expressions in. */
  1166   1166     Expr *pExpr             /* The expression to be analyzed. */
  1167   1167   ){
  1168         -  int savedHasAgg;
         1168  +  u8 savedHasAgg;
  1169   1169     Walker w;
  1170   1170   
  1171   1171     if( pExpr==0 ) return 0;
  1172   1172   #if SQLITE_MAX_EXPR_DEPTH>0
  1173   1173     {
  1174   1174       Parse *pParse = pNC->pParse;
  1175   1175       if( sqlite3ExprCheckHeight(pParse, pExpr->nHeight+pNC->pParse->nHeight) ){
  1176   1176         return 1;
  1177   1177       }
  1178   1178       pParse->nHeight += pExpr->nHeight;
  1179   1179     }
  1180   1180   #endif
  1181         -  savedHasAgg = pNC->hasAgg;
  1182         -  pNC->hasAgg = 0;
         1181  +  savedHasAgg = pNC->ncFlags & NC_HasAgg;
         1182  +  pNC->ncFlags &= ~NC_HasAgg;
  1183   1183     w.xExprCallback = resolveExprStep;
  1184   1184     w.xSelectCallback = resolveSelectStep;
  1185   1185     w.pParse = pNC->pParse;
  1186   1186     w.u.pNC = pNC;
  1187   1187     sqlite3WalkExpr(&w, pExpr);
  1188   1188   #if SQLITE_MAX_EXPR_DEPTH>0
  1189   1189     pNC->pParse->nHeight -= pExpr->nHeight;
  1190   1190   #endif
  1191   1191     if( pNC->nErr>0 || w.pParse->nErr>0 ){
  1192   1192       ExprSetProperty(pExpr, EP_Error);
  1193   1193     }
  1194         -  if( pNC->hasAgg ){
         1194  +  if( pNC->ncFlags & NC_HasAgg ){
  1195   1195       ExprSetProperty(pExpr, EP_Agg);
  1196   1196     }else if( savedHasAgg ){
  1197         -    pNC->hasAgg = 1;
         1197  +    pNC->ncFlags |= NC_HasAgg;
  1198   1198     }
  1199   1199     return ExprHasProperty(pExpr, EP_Error);
  1200   1200   }
  1201   1201   
  1202   1202   
  1203   1203   /*
  1204   1204   ** Resolve all names in all expressions of a SELECT and in all

Changes to src/select.c.

  3145   3145     }
  3146   3146     pTab = p->pSrc->a[0].pTab;
  3147   3147     pExpr = p->pEList->a[0].pExpr;
  3148   3148     assert( pTab && !pTab->pSelect && pExpr );
  3149   3149   
  3150   3150     if( IsVirtual(pTab) ) return 0;
  3151   3151     if( pExpr->op!=TK_AGG_FUNCTION ) return 0;
         3152  +  if( pAggInfo->nFunc==0 ) return 0;
  3152   3153     if( (pAggInfo->aFunc[0].pFunc->flags&SQLITE_FUNC_COUNT)==0 ) return 0;
  3153   3154     if( pExpr->flags&EP_Distinct ) return 0;
  3154   3155   
  3155   3156     return pTab;
  3156   3157   }
  3157   3158   
  3158   3159   /*
................................................................................
  4135   4136       sqlite3ExprAnalyzeAggList(&sNC, pOrderBy);
  4136   4137       if( pHaving ){
  4137   4138         sqlite3ExprAnalyzeAggregates(&sNC, pHaving);
  4138   4139       }
  4139   4140       sAggInfo.nAccumulator = sAggInfo.nColumn;
  4140   4141       for(i=0; i<sAggInfo.nFunc; i++){
  4141   4142         assert( !ExprHasProperty(sAggInfo.aFunc[i].pExpr, EP_xIsSelect) );
         4143  +      sNC.ncFlags |= NC_InAggFunc;
  4142   4144         sqlite3ExprAnalyzeAggList(&sNC, sAggInfo.aFunc[i].pExpr->x.pList);
         4145  +      sNC.ncFlags &= ~NC_InAggFunc;
  4143   4146       }
  4144   4147       if( db->mallocFailed ) goto select_end;
  4145   4148   
  4146   4149       /* Processing for aggregates with GROUP BY is very different and
  4147   4150       ** much more complex than aggregates without a GROUP BY.
  4148   4151       */
  4149   4152       if( pGroupBy ){

Changes to src/shell.c.

  2180   2180           new_colv[1] = 0;
  2181   2181           callback(&data, 1, new_argv, new_colv);
  2182   2182           rc = SQLITE_OK;
  2183   2183         }else{
  2184   2184           zShellStatic = azArg[1];
  2185   2185           rc = sqlite3_exec(p->db,
  2186   2186             "SELECT sql FROM "
  2187         -          "  (SELECT sql sql, type type, tbl_name tbl_name, name name"
         2187  +          "  (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x"
  2188   2188             "     FROM sqlite_master UNION ALL"
  2189         -          "   SELECT sql, type, tbl_name, name FROM sqlite_temp_master) "
         2189  +          "   SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_master) "
  2190   2190             "WHERE lower(tbl_name) LIKE shellstatic()"
  2191   2191             "  AND type!='meta' AND sql NOTNULL "
  2192         -          "ORDER BY substr(type,2,1), name",
         2192  +          "ORDER BY substr(type,2,1), "
         2193  +                  " CASE type WHEN 'view' THEN rowid ELSE name END",
  2193   2194             callback, &data, &zErrMsg);
  2194   2195           zShellStatic = 0;
  2195   2196         }
  2196   2197       }else{
  2197   2198         rc = sqlite3_exec(p->db,
  2198   2199            "SELECT sql FROM "
  2199         -         "  (SELECT sql sql, type type, tbl_name tbl_name, name name"
         2200  +         "  (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x"
  2200   2201            "     FROM sqlite_master UNION ALL"
  2201         -         "   SELECT sql, type, tbl_name, name FROM sqlite_temp_master) "
         2202  +         "   SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_master) "
  2202   2203            "WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%'"
  2203         -         "ORDER BY substr(type,2,1), name",
         2204  +         "ORDER BY substr(type,2,1),"
         2205  +                  " CASE type WHEN 'view' THEN rowid ELSE name END",
  2204   2206            callback, &data, &zErrMsg
  2205   2207         );
  2206   2208       }
  2207   2209       if( zErrMsg ){
  2208   2210         fprintf(stderr,"Error: %s\n", zErrMsg);
  2209   2211         sqlite3_free(zErrMsg);
  2210   2212         rc = 1;

Changes to src/sqliteInt.h.

  2012   2012   ** NameContext list corresponds to searching through successively outer
  2013   2013   ** subqueries looking for a match.
  2014   2014   */
  2015   2015   struct NameContext {
  2016   2016     Parse *pParse;       /* The parser */
  2017   2017     SrcList *pSrcList;   /* One or more tables used to resolve names */
  2018   2018     ExprList *pEList;    /* Optional list of named expressions */
         2019  +  AggInfo *pAggInfo;   /* Information about aggregates at this level */
         2020  +  NameContext *pNext;  /* Next outer name context.  NULL for outermost */
  2019   2021     int nRef;            /* Number of names resolved by this context */
  2020   2022     int nErr;            /* Number of errors encountered while resolving names */
  2021         -  u8 allowAgg;         /* Aggregate functions allowed here */
  2022         -  u8 hasAgg;           /* True if aggregates are seen */
  2023         -  u8 isCheck;          /* True if resolving names in a CHECK constraint */
  2024         -  AggInfo *pAggInfo;   /* Information about aggregates at this level */
  2025         -  NameContext *pNext;  /* Next outer name context.  NULL for outermost */
         2023  +  u8 ncFlags;          /* Zero or more NC_* flags defined below */
  2026   2024   };
  2027   2025   
         2026  +/*
         2027  +** Allowed values for the NameContext, ncFlags field.
         2028  +*/
         2029  +#define NC_AllowAgg  0x01    /* Aggregate functions are allowed here */
         2030  +#define NC_HasAgg    0x02    /* One or more aggregate functions seen */
         2031  +#define NC_IsCheck   0x04    /* True if resolving names in a CHECK constraint */
         2032  +#define NC_InAggFunc 0x08    /* True if analyzing arguments to an agg func */
         2033  +
  2028   2034   /*
  2029   2035   ** An instance of the following structure contains all information
  2030   2036   ** needed to generate code for a single SELECT statement.
  2031   2037   **
  2032   2038   ** nLimit is set to -1 if there is no LIMIT clause.  nOffset is set to 0.
  2033   2039   ** If there is a LIMIT clause, the parser sets nLimit to the value of the
  2034   2040   ** limit and nOffset to the value of the offset (or 0 if there is not

Changes to src/test_quota.c.

    40     40   #define sqlite3_mutex_enter(X)
    41     41   #define sqlite3_mutex_try(X)      SQLITE_OK
    42     42   #define sqlite3_mutex_leave(X)
    43     43   #define sqlite3_mutex_held(X)     ((void)(X),1)
    44     44   #define sqlite3_mutex_notheld(X)  ((void)(X),1)
    45     45   #endif /* SQLITE_THREADSAFE==0 */
    46     46   
           47  +
           48  +/*
           49  +** Figure out if we are dealing with Unix, Windows, or some other
           50  +** operating system.  After the following block of preprocess macros,
           51  +** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER 
           52  +** will defined to either 1 or 0.  One of the four will be 1.  The other 
           53  +** three will be 0.
           54  +*/
           55  +#if defined(SQLITE_OS_OTHER)
           56  +# if SQLITE_OS_OTHER==1
           57  +#   undef SQLITE_OS_UNIX
           58  +#   define SQLITE_OS_UNIX 0
           59  +#   undef SQLITE_OS_WIN
           60  +#   define SQLITE_OS_WIN 0
           61  +#   undef SQLITE_OS_OS2
           62  +#   define SQLITE_OS_OS2 0
           63  +# else
           64  +#   undef SQLITE_OS_OTHER
           65  +# endif
           66  +#endif
           67  +#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
           68  +# define SQLITE_OS_OTHER 0
           69  +# ifndef SQLITE_OS_WIN
           70  +#   if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) \
           71  +                       || defined(__MINGW32__) || defined(__BORLANDC__)
           72  +#     define SQLITE_OS_WIN 1
           73  +#     define SQLITE_OS_UNIX 0
           74  +#     define SQLITE_OS_OS2 0
           75  +#   elif defined(__EMX__) || defined(_OS2) || defined(OS2) \
           76  +                          || defined(_OS2_) || defined(__OS2__)
           77  +#     define SQLITE_OS_WIN 0
           78  +#     define SQLITE_OS_UNIX 0
           79  +#     define SQLITE_OS_OS2 1
           80  +#   else
           81  +#     define SQLITE_OS_WIN 0
           82  +#     define SQLITE_OS_UNIX 1
           83  +#     define SQLITE_OS_OS2 0
           84  +#  endif
           85  +# else
           86  +#  define SQLITE_OS_UNIX 0
           87  +#  define SQLITE_OS_OS2 0
           88  +# endif
           89  +#else
           90  +# ifndef SQLITE_OS_WIN
           91  +#  define SQLITE_OS_WIN 0
           92  +# endif
           93  +#endif
           94  +
           95  +#if SQLITE_OS_UNIX
           96  +# include <unistd.h>
           97  +#endif
           98  +#if SQLITE_OS_WIN
           99  +# include <windows.h>
          100  +# include <io.h>
          101  +#endif
          102  +
    47    103   
    48    104   /************************ Object Definitions ******************************/
    49    105   
    50    106   /* Forward declaration of all object types */
    51    107   typedef struct quotaGroup quotaGroup;
    52    108   typedef struct quotaConn quotaConn;
    53    109   typedef struct quotaFile quotaFile;
................................................................................
   355    411         pFile->ppPrev = &pGroup->pFiles;
   356    412         pGroup->pFiles = pFile;
   357    413         pFile->pGroup = pGroup;
   358    414       }
   359    415     }
   360    416     return pFile;
   361    417   }
   362         -
   363         -/*
   364         -** Figure out if we are dealing with Unix, Windows, or some other
   365         -** operating system.  After the following block of preprocess macros,
   366         -** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER 
   367         -** will defined to either 1 or 0.  One of the four will be 1.  The other 
   368         -** three will be 0.
   369         -*/
   370         -#if defined(SQLITE_OS_OTHER)
   371         -# if SQLITE_OS_OTHER==1
   372         -#   undef SQLITE_OS_UNIX
   373         -#   define SQLITE_OS_UNIX 0
   374         -#   undef SQLITE_OS_WIN
   375         -#   define SQLITE_OS_WIN 0
   376         -#   undef SQLITE_OS_OS2
   377         -#   define SQLITE_OS_OS2 0
   378         -# else
   379         -#   undef SQLITE_OS_OTHER
   380         -# endif
   381         -#endif
   382         -#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
   383         -# define SQLITE_OS_OTHER 0
   384         -# ifndef SQLITE_OS_WIN
   385         -#   if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) \
   386         -                       || defined(__MINGW32__) || defined(__BORLANDC__)
   387         -#     define SQLITE_OS_WIN 1
   388         -#     define SQLITE_OS_UNIX 0
   389         -#     define SQLITE_OS_OS2 0
   390         -#   elif defined(__EMX__) || defined(_OS2) || defined(OS2) \
   391         -                          || defined(_OS2_) || defined(__OS2__)
   392         -#     define SQLITE_OS_WIN 0
   393         -#     define SQLITE_OS_UNIX 0
   394         -#     define SQLITE_OS_OS2 1
   395         -#   else
   396         -#     define SQLITE_OS_WIN 0
   397         -#     define SQLITE_OS_UNIX 1
   398         -#     define SQLITE_OS_OS2 0
   399         -#  endif
   400         -# else
   401         -#  define SQLITE_OS_UNIX 0
   402         -#  define SQLITE_OS_OS2 0
   403         -# endif
   404         -#else
   405         -# ifndef SQLITE_OS_WIN
   406         -#  define SQLITE_OS_WIN 0
   407         -# endif
   408         -#endif
   409         -
   410         -#if SQLITE_OS_UNIX
   411         -# include <unistd.h>
   412         -#endif
   413         -#if SQLITE_OS_WIN
   414         -# include <windows.h>
   415         -# include <io.h>
   416         -#endif
   417         -
   418    418   /*
   419    419   ** Translate UTF8 to MBCS for use in fopen() calls.  Return a pointer to the
   420    420   ** translated text..  Call quota_mbcs_free() to deallocate any memory
   421    421   ** used to store the returned pointer when done.
   422    422   */
   423    423   static char *quota_utf8_to_mbcs(const char *zUtf8){
   424    424   #if SQLITE_OS_WIN

Changes to src/vdbetrace.c.

   166    166   #if defined(SQLITE_ENABLE_TREE_EXPLAIN)
   167    167   
   168    168   /*
   169    169   ** Allocate a new Explain object
   170    170   */
   171    171   void sqlite3ExplainBegin(Vdbe *pVdbe){
   172    172     if( pVdbe ){
          173  +    Explain *p;
   173    174       sqlite3BeginBenignMalloc();
   174         -    Explain *p = sqlite3_malloc( sizeof(Explain) );
          175  +    p = sqlite3_malloc( sizeof(Explain) );
   175    176       if( p ){
   176    177         memset(p, 0, sizeof(*p));
   177    178         p->pVdbe = pVdbe;
   178    179         sqlite3_free(pVdbe->pExplain);
   179    180         pVdbe->pExplain = p;
   180    181         sqlite3StrAccumInit(&p->str, p->zBase, sizeof(p->zBase),
   181    182                             SQLITE_MAX_LENGTH);

Added test/fuzz-oss1.test.

            1  +# 2012 May 21
            2  +#
            3  +# The author disclaims copyright to this source code.  In place of
            4  +# a legal notice, here is a blessing:
            5  +#
            6  +#    May you do good and not evil.
            7  +#    May you find forgiveness for yourself and forgive others.
            8  +#    May you share freely, never taking more than you give.
            9  +#
           10  +# NB:  Portions of this file are extracted from open-source projects
           11  +# covered by permissive licenses.  Use of this file for testing is clearly
           12  +# allowed.  However, do not incorporate the text of this one file into
           13  +# end-products without checking the licenses on the open-source projects
           14  +# from which this code was extracted.  This warning applies to this one
           15  +# file only - not the bulk of the SQLite source code and tests.
           16  +#
           17  +#***********************************************************************
           18  +#
           19  +# This file contains large and complex schemas obtained from open-source
           20  +# software projects.  The schemas are parsed just to make sure that nothing
           21  +# breaks in the parser logic.
           22  +#
           23  +# These tests merely verify that the parse occurs without error.
           24  +# No attempt is made to verify correct operation of the resulting schema
           25  +# and statements.
           26  +#
           27  +
           28  +set testdir [file dirname $argv0]
           29  +source $testdir/tester.tcl
           30  +
           31  +# Schema and query extracted from Skrooge.org.  
           32  +#
           33  +do_test fuzz-oss1-skrooge {
           34  +  db eval {
           35  +CREATE TABLE parameters (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_uuid_parent TEXT NOT NULL DEFAULT '',t_name TEXT NOT NULL,t_value TEXT NOT NULL DEFAULT '',b_blob BLOB,d_lastmodifdate DATE NOT NULL DEFAULT CURRENT_TIMESTAMP,i_tmp INTEGER NOT NULL DEFAULT 0);
           36  +CREATE TABLE doctransaction (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL,t_mode VARCHAR(1) DEFAULT 'U' CHECK (t_mode IN ('U', 'R')),d_date DATE NOT NULL,t_savestep VARCHAR(1) DEFAULT 'N' CHECK (t_savestep IN ('Y', 'N')),i_parent INTEGER, t_refreshviews VARCHAR(1) DEFAULT 'Y' CHECK (t_refreshviews IN ('Y', 'N')));
           37  +CREATE TABLE doctransactionitem (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, rd_doctransaction_id INTEGER NOT NULL,i_object_id INTEGER NOT NULL,t_object_table TEXT NOT NULL,t_action VARCHAR(1) DEFAULT 'I' CHECK (t_action IN ('I', 'U', 'D')),t_sqlorder TEXT NOT NULL DEFAULT '');
           38  +CREATE TABLE doctransactionmsg (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, rd_doctransaction_id INTEGER NOT NULL,t_message TEXT NOT NULL DEFAULT '',t_popup VARCHAR(1) DEFAULT 'Y' CHECK (t_popup IN ('Y', 'N')));
           39  +CREATE TABLE unit(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL,t_symbol TEXT NOT NULL DEFAULT '',t_country TEXT NOT NULL DEFAULT '',t_type VARCHAR(1) NOT NULL DEFAULT 'C' CHECK (t_type IN ('1', '2', 'C', 'S', 'I', 'O')),t_internet_code TEXT NOT NULL DEFAULT '',i_nbdecimal INT NOT NULL DEFAULT 2,rd_unit_id INTEGER NOT NULL DEFAULT 0, t_source TEXT NOT NULL DEFAULT '');
           40  +CREATE TABLE unitvalue(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,rd_unit_id INTEGER NOT NULL,d_date DATE NOT NULL,f_quantity FLOAT NOT NULL CHECK (f_quantity>=0));
           41  +CREATE TABLE bank (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL DEFAULT '',t_bank_number TEXT NOT NULL DEFAULT '',t_icon TEXT NOT NULL DEFAULT '');
           42  +CREATE TABLE interest(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,rd_account_id INTEGER NOT NULL,d_date DATE NOT NULL,f_rate FLOAT NOT NULL CHECK (f_rate>=0),t_income_value_date_mode VARCHAR(1) NOT NULL DEFAULT 'F' CHECK (t_income_value_date_mode IN ('F', '0', '1', '2', '3', '4', '5')),t_expenditure_value_date_mode VARCHAR(1) NOT NULL DEFAULT 'F' CHECK (t_expenditure_value_date_mode IN ('F', '0', '1', '2', '3', '4', '5')),t_base VARCHAR(3) NOT NULL DEFAULT '24' CHECK (t_base IN ('24', '360', '365')));
           43  +CREATE TABLE operation(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,i_group_id INTEGER NOT NULL DEFAULT 0,i_number INTEGER DEFAULT 0 CHECK (i_number>=0),d_date DATE NOT NULL DEFAULT '0000-00-00',rd_account_id INTEGER NOT NULL,t_mode TEXT NOT NULL DEFAULT '',r_payee_id INTEGER NOT NULL DEFAULT 0,t_comment TEXT NOT NULL DEFAULT '',rc_unit_id INTEGER NOT NULL,t_status VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_status IN ('N', 'P', 'Y')),t_bookmarked VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_bookmarked IN ('Y', 'N')),t_imported VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_imported IN ('Y', 'N', 'P', 'T')),t_template VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_template IN ('Y', 'N')),t_import_id TEXT NOT NULL DEFAULT '',i_tmp INTEGER NOT NULL DEFAULT 0,r_recurrentoperation_id INTEGER NOT NULL DEFAULT 0);
           44  +CREATE TABLE operationbalance(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,f_balance FLOAT NOT NULL DEFAULT 0,r_operation_id INTEGER NOT NULL);
           45  +CREATE TABLE refund (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL DEFAULT '',t_comment TEXT NOT NULL DEFAULT '',t_close VARCHAR(1) DEFAULT 'N' CHECK (t_close IN ('Y', 'N')));
           46  +CREATE TABLE payee (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL DEFAULT '',t_address TEXT NOT NULL DEFAULT '', t_bookmarked VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_bookmarked IN ('Y', 'N')));
           47  +CREATE TABLE suboperation(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_comment TEXT NOT NULL DEFAULT '',rd_operation_id INTEGER NOT NULL,r_category_id INTEGER NOT NULL DEFAULT 0,f_value FLOAT NOT NULL DEFAULT 0.0,i_tmp INTEGER NOT NULL DEFAULT 0,r_refund_id INTEGER NOT NULL DEFAULT 0, t_formula TEXT NOT NULL DEFAULT '');
           48  +CREATE TABLE rule (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_description TEXT NOT NULL DEFAULT '',t_definition TEXT NOT NULL DEFAULT '',t_action_description TEXT NOT NULL DEFAULT '',t_action_definition TEXT NOT NULL DEFAULT '',t_action_type VARCHAR(1) DEFAULT 'S' CHECK (t_action_type IN ('S', 'U', 'A')),t_bookmarked VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_bookmarked IN ('Y', 'N')),f_sortorder FLOAT);
           49  +CREATE TABLE budget (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,rc_category_id INTEGER NOT NULL DEFAULT 0,t_including_subcategories TEXT NOT NULL DEFAULT 'N' CHECK (t_including_subcategories IN ('Y', 'N')),f_budgeted FLOAT NOT NULL DEFAULT 0.0,f_budgeted_modified FLOAT NOT NULL DEFAULT 0.0,f_transferred FLOAT NOT NULL DEFAULT 0.0,i_year INTEGER NOT NULL DEFAULT 2010,i_month INTEGER NOT NULL DEFAULT 0 CHECK (i_month>=0 AND i_month<=12));
           50  +CREATE TABLE budgetcategory(id INTEGER NOT NULL DEFAULT 0,id_category INTEGER NOT NULL DEFAULT 0);
           51  +CREATE TABLE budgetrule (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,rc_category_id INTEGER NOT NULL DEFAULT 0,t_category_condition TEXT NOT NULL DEFAULT 'Y' CHECK (t_category_condition IN ('Y', 'N')),t_year_condition TEXT NOT NULL DEFAULT 'Y' CHECK (t_year_condition IN ('Y', 'N')),i_year INTEGER NOT NULL DEFAULT 2010,i_month INTEGER NOT NULL DEFAULT 0 CHECK (i_month>=0 AND i_month<=12),t_month_condition TEXT NOT NULL DEFAULT 'Y' CHECK (t_month_condition IN ('Y', 'N')),i_condition INTEGER NOT NULL DEFAULT 0 CHECK (i_condition IN (-1,0,1)),f_quantity FLOAT NOT NULL DEFAULT 0.0,t_absolute TEXT NOT NULL DEFAULT 'Y' CHECK (t_absolute IN ('Y', 'N')),rc_category_id_target INTEGER NOT NULL DEFAULT 0,t_category_target TEXT NOT NULL DEFAULT 'Y' CHECK (t_category_target IN ('Y', 'N')),t_rule TEXT NOT NULL DEFAULT 'N' CHECK (t_rule IN ('N', 'C', 'Y')));
           52  +CREATE TABLE "recurrentoperation" (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,d_date DATE NOT NULL DEFAULT '0000-00-00',rd_operation_id INTEGER NOT NULL,i_period_increment INTEGER NOT NULL DEFAULT 1 CHECK (i_period_increment>=0),t_period_unit TEXT NOT NULL DEFAULT 'M' CHECK (t_period_unit IN ('D', 'W', 'M', 'Y')),t_auto_write VARCHAR(1) DEFAULT 'Y' CHECK (t_auto_write IN ('Y', 'N')),i_auto_write_days INTEGER NOT NULL DEFAULT 5 CHECK (i_auto_write_days>=0),t_warn VARCHAR(1) DEFAULT 'Y' CHECK (t_warn IN ('Y', 'N')),i_warn_days INTEGER NOT NULL DEFAULT 5 CHECK (i_warn_days>=0),t_times VARCHAR(1) DEFAULT 'N' CHECK (t_times IN ('Y', 'N')),i_nb_times INTEGER NOT NULL DEFAULT 1 CHECK (i_nb_times>=0));
           53  +CREATE TABLE "category" (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL DEFAULT '' CHECK (t_name NOT LIKE '% > %'),t_fullname TEXT,rd_category_id INT,t_bookmarked VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_bookmarked IN ('Y', 'N')));
           54  +CREATE TABLE "account"(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL,t_number TEXT NOT NULL DEFAULT '',t_agency_number TEXT NOT NULL DEFAULT '',t_agency_address TEXT NOT NULL DEFAULT '',t_comment TEXT NOT NULL DEFAULT '',t_close VARCHAR(1) DEFAULT 'N' CHECK (t_close IN ('Y', 'N')),t_type VARCHAR(1) NOT NULL DEFAULT 'C' CHECK (t_type IN ('C', 'D', 'A', 'I', 'L', 'W', 'O')),t_bookmarked VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_bookmarked IN ('Y', 'N')),rd_bank_id INTEGER NOT NULL);
           55  +CREATE TABLE "node" (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL DEFAULT '' CHECK (t_name NOT LIKE '% > %'),t_fullname TEXT,t_icon TEXT DEFAULT '',f_sortorder FLOAT,t_autostart VARCHAR(1) DEFAULT 'N' CHECK (t_autostart IN ('Y', 'N')),t_data TEXT,rd_node_id INT CONSTRAINT fk_id REFERENCES node(id) ON DELETE CASCADE);
           56  +CREATE TABLE vm_category_display_tmp(
           57  +  id INT,
           58  +  t_name TEXT,
           59  +  t_fullname TEXT,
           60  +  rd_category_id INT,
           61  +  t_bookmarked TEXT,
           62  +  i_NBOPERATIONS,
           63  +  f_REALCURRENTAMOUNT
           64  +);
           65  +CREATE TABLE vm_budget_tmp(
           66  +  id INT,
           67  +  rc_category_id INT,
           68  +  t_including_subcategories TEXT,
           69  +  f_budgeted REAL,
           70  +  f_budgeted_modified REAL,
           71  +  f_transferred REAL,
           72  +  i_year INT,
           73  +  i_month INT,
           74  +  t_CATEGORY,
           75  +  t_PERIOD,
           76  +  f_CURRENTAMOUNT,
           77  +  t_RULES
           78  +);
           79  +CREATE INDEX idx_doctransaction_parent ON doctransaction (i_parent);
           80  +CREATE INDEX idx_doctransactionitem_i_object_id ON doctransactionitem (i_object_id);
           81  +CREATE INDEX idx_doctransactionitem_t_object_table ON doctransactionitem (t_object_table);
           82  +CREATE INDEX idx_doctransactionitem_t_action ON doctransactionitem (t_action);
           83  +CREATE INDEX idx_doctransactionitem_rd_doctransaction_id ON doctransactionitem (rd_doctransaction_id);
           84  +CREATE INDEX idx_doctransactionitem_optimization ON doctransactionitem (rd_doctransaction_id, i_object_id, t_object_table, t_action, id);
           85  +CREATE INDEX idx_unit_unit_id ON unitvalue(rd_unit_id);
           86  +CREATE INDEX idx_account_bank_id ON account(rd_bank_id);
           87  +CREATE INDEX idx_account_type ON account(t_type);
           88  +CREATE INDEX idx_category_category_id ON category(rd_category_id);
           89  +CREATE INDEX idx_category_t_fullname ON category(t_fullname);
           90  +CREATE INDEX idx_operation_account_id ON operation (rd_account_id);
           91  +CREATE INDEX idx_operation_tmp1_found_transfert ON operation (rc_unit_id, d_date);
           92  +CREATE INDEX idx_operation_grouped_operation_id ON operation (i_group_id);
           93  +CREATE INDEX idx_operation_i_number ON operation (i_number);
           94  +CREATE INDEX idx_operation_i_tmp ON operation (i_tmp);
           95  +CREATE INDEX idx_operation_rd_account_id ON operation (rd_account_id);
           96  +CREATE INDEX idx_operation_rc_unit_id ON operation (rc_unit_id);
           97  +CREATE INDEX idx_operation_t_status ON operation (t_status);
           98  +CREATE INDEX idx_operation_t_import_id ON operation (t_import_id);
           99  +CREATE INDEX idx_operation_t_template ON operation (t_template);
          100  +CREATE INDEX idx_operation_d_date ON operation (d_date);
          101  +CREATE INDEX idx_operationbalance_operation_id ON operationbalance (r_operation_id);
          102  +CREATE INDEX idx_suboperation_operation_id ON suboperation (rd_operation_id);
          103  +CREATE INDEX idx_suboperation_i_tmp ON suboperation (i_tmp);
          104  +CREATE INDEX idx_suboperation_category_id ON suboperation (r_category_id);
          105  +CREATE INDEX idx_suboperation_refund_id_id ON suboperation (r_refund_id);
          106  +CREATE INDEX idx_recurrentoperation_rd_operation_id ON recurrentoperation (rd_operation_id);
          107  +CREATE INDEX idx_refund_close ON refund(t_close);
          108  +CREATE INDEX idx_interest_account_id ON interest (rd_account_id);
          109  +CREATE INDEX idx_rule_action_type ON rule(t_action_type);
          110  +CREATE INDEX idx_budget_category_id ON budget(rc_category_id);
          111  +CREATE INDEX idx_budgetcategory_id ON budgetcategory (id);
          112  +CREATE INDEX idx_budgetcategory_id_category ON budgetcategory (id_category);
          113  +CREATE UNIQUE INDEX uidx_parameters_uuid_parent_name ON parameters (t_uuid_parent, t_name);
          114  +CREATE UNIQUE INDEX uidx_node_parent_id_name ON node(t_name,rd_node_id);
          115  +CREATE UNIQUE INDEX uidx_node_fullname ON node(t_fullname);
          116  +CREATE UNIQUE INDEX uidx_unit_name ON unit(t_name);
          117  +CREATE UNIQUE INDEX uidx_unit_symbol ON unit(t_symbol);
          118  +CREATE UNIQUE INDEX uidx_unitvalue ON unitvalue(d_date,rd_unit_id);
          119  +CREATE UNIQUE INDEX uidx_bank_name ON bank(t_name);
          120  +CREATE UNIQUE INDEX uidx_account_name ON account(t_name);
          121  +CREATE UNIQUE INDEX uidx_category_parent_id_name ON category(t_name,rd_category_id);
          122  +CREATE UNIQUE INDEX uidx_category_fullname ON  category(t_fullname);
          123  +CREATE UNIQUE INDEX uidx_refund_name ON refund(t_name);
          124  +CREATE UNIQUE INDEX uidx_payee_name ON payee(t_name);
          125  +CREATE UNIQUE INDEX uidx_interest ON interest(d_date,rd_account_id);
          126  +CREATE UNIQUE INDEX uidx_budget ON budget(i_year,i_month, rc_category_id);
          127  +CREATE VIEW v_node AS SELECT * from node;
          128  +CREATE VIEW v_node_displayname AS SELECT *, t_fullname AS t_displayname from node;
          129  +CREATE VIEW v_parameters_displayname AS SELECT *, t_name AS t_displayname from parameters;
          130  +CREATE TRIGGER fkdc_parameters_parameters_uuid BEFORE DELETE ON parameters FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'parameters'; END;
          131  +CREATE TRIGGER fkdc_node_parameters_uuid BEFORE DELETE ON node FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'node'; END;
          132  +CREATE TRIGGER cpt_node_fullname1 AFTER INSERT ON node BEGIN UPDATE node SET t_fullname=CASE WHEN new.rd_node_id IS NULL OR new.rd_node_id='' OR new.rd_node_id=0 THEN new.t_name ELSE (SELECT c.t_fullname from node c where c.id=new.rd_node_id)||' > '||new.t_name END WHERE id=new.id;END;
          133  +CREATE TRIGGER cpt_node_fullname2 AFTER UPDATE OF t_name, rd_node_id ON node BEGIN UPDATE node SET t_fullname=CASE WHEN new.rd_node_id IS NULL OR new.rd_node_id='' OR new.rd_node_id=0 THEN new.t_name ELSE (SELECT c.t_fullname from node c where c.id=new.rd_node_id)||' > '||new.t_name END WHERE id=new.id;UPDATE node SET t_name=t_name WHERE rd_node_id=new.id;END;
          134  +CREATE TRIGGER fki_account_bank_rd_bank_id_id BEFORE INSERT ON account FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (bank est utilisé par account)
          135  +Nom de la contrainte : fki_account_bank_rd_bank_id_id')   WHERE NEW.rd_bank_id!=0 AND NEW.rd_bank_id!='' AND (SELECT id FROM bank WHERE id = NEW.rd_bank_id) IS NULL; END;
          136  +CREATE TRIGGER fku_account_bank_rd_bank_id_id BEFORE UPDATE ON account FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (bank est utilisé par account)
          137  +Nom de la contrainte : fku_account_bank_rd_bank_id_id')       WHERE NEW.rd_bank_id!=0 AND NEW.rd_bank_id!='' AND (SELECT id FROM bank WHERE id = NEW.rd_bank_id) IS NULL; END;
          138  +CREATE TRIGGER fkdc_bank_account_id_rd_bank_id BEFORE DELETE ON bank FOR EACH ROW BEGIN     DELETE FROM account WHERE account.rd_bank_id = OLD.id; END;
          139  +CREATE TRIGGER fki_budget_category_rc_category_id_id BEFORE INSERT ON budget FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (category est utilisé par budget)
          140  +Nom de la contrainte : fki_budget_category_rc_category_id_id')   WHERE NEW.rc_category_id!=0 AND NEW.rc_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id) IS NULL; END;
          141  +CREATE TRIGGER fku_budget_category_rc_category_id_id BEFORE UPDATE ON budget FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (category est utilisé par budget)
          142  +Nom de la contrainte : fku_budget_category_rc_category_id_id')       WHERE NEW.rc_category_id!=0 AND NEW.rc_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id) IS NULL; END;
          143  +CREATE TRIGGER fkd_budget_category_rc_category_id_id BEFORE DELETE ON category FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de détruire un objet (category est utilisé par budget)
          144  +Nom de la contrainte : fkd_budget_category_rc_category_id_id')     WHERE (SELECT rc_category_id FROM budget WHERE rc_category_id = OLD.id) IS NOT NULL; END;
          145  +CREATE TRIGGER fki_budgetrule_category_rc_category_id_id BEFORE INSERT ON budgetrule FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (category est utilisé par budgetrule)
          146  +Nom de la contrainte : fki_budgetrule_category_rc_category_id_id')   WHERE NEW.rc_category_id!=0 AND NEW.rc_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id) IS NULL; END;
          147  +CREATE TRIGGER fku_budgetrule_category_rc_category_id_id BEFORE UPDATE ON budgetrule FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (category est utilisé par budgetrule)
          148  +Nom de la contrainte : fku_budgetrule_category_rc_category_id_id')       WHERE NEW.rc_category_id!=0 AND NEW.rc_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id) IS NULL; END;
          149  +CREATE TRIGGER fkd_budgetrule_category_rc_category_id_id BEFORE DELETE ON category FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de détruire un objet (category est utilisé par budgetrule)
          150  +Nom de la contrainte : fkd_budgetrule_category_rc_category_id_id')     WHERE (SELECT rc_category_id FROM budgetrule WHERE rc_category_id = OLD.id) IS NOT NULL; END;
          151  +CREATE TRIGGER fki_budgetrule_category_rc_category_id_target_id BEFORE INSERT ON budgetrule FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (category est utilisé par budgetrule)
          152  +Nom de la contrainte : fki_budgetrule_category_rc_category_id_target_id')   WHERE NEW.rc_category_id_target!=0 AND NEW.rc_category_id_target!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id_target) IS NULL; END;
          153  +CREATE TRIGGER fku_budgetrule_category_rc_category_id_target_id BEFORE UPDATE ON budgetrule FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (category est utilisé par budgetrule)
          154  +Nom de la contrainte : fku_budgetrule_category_rc_category_id_target_id')       WHERE NEW.rc_category_id_target!=0 AND NEW.rc_category_id_target!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id_target) IS NULL; END;
          155  +CREATE TRIGGER fkd_budgetrule_category_rc_category_id_target_id BEFORE DELETE ON category FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de détruire un objet (category est utilisé par budgetrule)
          156  +Nom de la contrainte : fkd_budgetrule_category_rc_category_id_target_id')     WHERE (SELECT rc_category_id_target FROM budgetrule WHERE rc_category_id_target = OLD.id) IS NOT NULL; END;
          157  +CREATE TRIGGER fki_category_category_rd_category_id_id BEFORE INSERT ON category FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (category est utilisé par category)
          158  +Nom de la contrainte : fki_category_category_rd_category_id_id')   WHERE NEW.rd_category_id!=0 AND NEW.rd_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rd_category_id) IS NULL; END;
          159  +CREATE TRIGGER fku_category_category_rd_category_id_id BEFORE UPDATE ON category FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (category est utilisé par category)
          160  +Nom de la contrainte : fku_category_category_rd_category_id_id')       WHERE NEW.rd_category_id!=0 AND NEW.rd_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rd_category_id) IS NULL; END;
          161  +CREATE TRIGGER fkdc_category_category_id_rd_category_id BEFORE DELETE ON category FOR EACH ROW BEGIN     DELETE FROM category WHERE category.rd_category_id = OLD.id; END;
          162  +CREATE TRIGGER fki_doctransactionitem_doctransaction_rd_doctransaction_id_id BEFORE INSERT ON doctransactionitem FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (doctransaction est utilisé par doctransactionitem)
          163  +Nom de la contrainte : fki_doctransactionitem_doctransaction_rd_doctransaction_id_id')   WHERE NEW.rd_doctransaction_id!=0 AND NEW.rd_doctransaction_id!='' AND (SELECT id FROM doctransaction WHERE id = NEW.rd_doctransaction_id) IS NULL; END;
          164  +CREATE TRIGGER fku_doctransactionitem_doctransaction_rd_doctransaction_id_id BEFORE UPDATE ON doctransactionitem FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (doctransaction est utilisé par doctransactionitem)
          165  +Nom de la contrainte : fku_doctransactionitem_doctransaction_rd_doctransaction_id_id')       WHERE NEW.rd_doctransaction_id!=0 AND NEW.rd_doctransaction_id!='' AND (SELECT id FROM doctransaction WHERE id = NEW.rd_doctransaction_id) IS NULL; END;
          166  +CREATE TRIGGER fkdc_doctransaction_doctransactionitem_id_rd_doctransaction_id BEFORE DELETE ON doctransaction FOR EACH ROW BEGIN     DELETE FROM doctransactionitem WHERE doctransactionitem.rd_doctransaction_id = OLD.id; END;
          167  +CREATE TRIGGER fki_doctransactionmsg_doctransaction_rd_doctransaction_id_id BEFORE INSERT ON doctransactionmsg FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (doctransaction est utilisé par doctransactionmsg)
          168  +Nom de la contrainte : fki_doctransactionmsg_doctransaction_rd_doctransaction_id_id')   WHERE NEW.rd_doctransaction_id!=0 AND NEW.rd_doctransaction_id!='' AND (SELECT id FROM doctransaction WHERE id = NEW.rd_doctransaction_id) IS NULL; END;
          169  +CREATE TRIGGER fku_doctransactionmsg_doctransaction_rd_doctransaction_id_id BEFORE UPDATE ON doctransactionmsg FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (doctransaction est utilisé par doctransactionmsg)
          170  +Nom de la contrainte : fku_doctransactionmsg_doctransaction_rd_doctransaction_id_id')       WHERE NEW.rd_doctransaction_id!=0 AND NEW.rd_doctransaction_id!='' AND (SELECT id FROM doctransaction WHERE id = NEW.rd_doctransaction_id) IS NULL; END;
          171  +CREATE TRIGGER fkdc_doctransaction_doctransactionmsg_id_rd_doctransaction_id BEFORE DELETE ON doctransaction FOR EACH ROW BEGIN     DELETE FROM doctransactionmsg WHERE doctransactionmsg.rd_doctransaction_id = OLD.id; END;
          172  +CREATE TRIGGER fki_interest_account_rd_account_id_id BEFORE INSERT ON interest FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (account est utilisé par interest)
          173  +Nom de la contrainte : fki_interest_account_rd_account_id_id')   WHERE NEW.rd_account_id!=0 AND NEW.rd_account_id!='' AND (SELECT id FROM account WHERE id = NEW.rd_account_id) IS NULL; END;
          174  +CREATE TRIGGER fku_interest_account_rd_account_id_id BEFORE UPDATE ON interest FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (account est utilisé par interest)
          175  +Nom de la contrainte : fku_interest_account_rd_account_id_id')       WHERE NEW.rd_account_id!=0 AND NEW.rd_account_id!='' AND (SELECT id FROM account WHERE id = NEW.rd_account_id) IS NULL; END;
          176  +CREATE TRIGGER fkdc_account_interest_id_rd_account_id BEFORE DELETE ON account FOR EACH ROW BEGIN     DELETE FROM interest WHERE interest.rd_account_id = OLD.id; END;
          177  +CREATE TRIGGER fki_node_node_rd_node_id_id BEFORE INSERT ON node FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (node est utilisé par node)
          178  +Nom de la contrainte : fki_node_node_rd_node_id_id')   WHERE NEW.rd_node_id!=0 AND NEW.rd_node_id!='' AND (SELECT id FROM node WHERE id = NEW.rd_node_id) IS NULL; END;
          179  +CREATE TRIGGER fku_node_node_rd_node_id_id BEFORE UPDATE ON node FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (node est utilisé par node)
          180  +Nom de la contrainte : fku_node_node_rd_node_id_id')       WHERE NEW.rd_node_id!=0 AND NEW.rd_node_id!='' AND (SELECT id FROM node WHERE id = NEW.rd_node_id) IS NULL; END;
          181  +CREATE TRIGGER fkdc_node_node_id_rd_node_id BEFORE DELETE ON node FOR EACH ROW BEGIN     DELETE FROM node WHERE node.rd_node_id = OLD.id; END;
          182  +CREATE TRIGGER fki_operation_account_rd_account_id_id BEFORE INSERT ON operation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (account est utilisé par operation)
          183  +Nom de la contrainte : fki_operation_account_rd_account_id_id')   WHERE NEW.rd_account_id!=0 AND NEW.rd_account_id!='' AND (SELECT id FROM account WHERE id = NEW.rd_account_id) IS NULL; END;
          184  +CREATE TRIGGER fku_operation_account_rd_account_id_id BEFORE UPDATE ON operation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (account est utilisé par operation)
          185  +Nom de la contrainte : fku_operation_account_rd_account_id_id')       WHERE NEW.rd_account_id!=0 AND NEW.rd_account_id!='' AND (SELECT id FROM account WHERE id = NEW.rd_account_id) IS NULL; END;
          186  +CREATE TRIGGER fkdc_account_operation_id_rd_account_id BEFORE DELETE ON account FOR EACH ROW BEGIN     DELETE FROM operation WHERE operation.rd_account_id = OLD.id; END;
          187  +CREATE TRIGGER fki_operation_payee_r_payee_id_id BEFORE INSERT ON operation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (payee est utilisé par operation)
          188  +Nom de la contrainte : fki_operation_payee_r_payee_id_id')   WHERE NEW.r_payee_id!=0 AND NEW.r_payee_id!='' AND (SELECT id FROM payee WHERE id = NEW.r_payee_id) IS NULL; END;
          189  +CREATE TRIGGER fku_operation_payee_r_payee_id_id BEFORE UPDATE ON operation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (payee est utilisé par operation)
          190  +Nom de la contrainte : fku_operation_payee_r_payee_id_id')       WHERE NEW.r_payee_id!=0 AND NEW.r_payee_id!='' AND (SELECT id FROM payee WHERE id = NEW.r_payee_id) IS NULL; END;
          191  +CREATE TRIGGER fkd_operation_payee_r_payee_id_id BEFORE DELETE ON payee FOR EACH ROW BEGIN     UPDATE operation SET r_payee_id=0 WHERE r_payee_id=OLD.id; END;
          192  +CREATE TRIGGER fki_operation_unit_rc_unit_id_id BEFORE INSERT ON operation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (unit est utilisé par operation)
          193  +Nom de la contrainte : fki_operation_unit_rc_unit_id_id')   WHERE NEW.rc_unit_id!=0 AND NEW.rc_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rc_unit_id) IS NULL; END;
          194  +CREATE TRIGGER fku_operation_unit_rc_unit_id_id BEFORE UPDATE ON operation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (unit est utilisé par operation)
          195  +Nom de la contrainte : fku_operation_unit_rc_unit_id_id')       WHERE NEW.rc_unit_id!=0 AND NEW.rc_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rc_unit_id) IS NULL; END;
          196  +CREATE TRIGGER fkd_operation_unit_rc_unit_id_id BEFORE DELETE ON unit FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de détruire un objet (unit est utilisé par operation)
          197  +Nom de la contrainte : fkd_operation_unit_rc_unit_id_id')     WHERE (SELECT rc_unit_id FROM operation WHERE rc_unit_id = OLD.id) IS NOT NULL; END;
          198  +CREATE TRIGGER fki_operation_recurrentoperation_r_recurrentoperation_id_id BEFORE INSERT ON operation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (recurrentoperation est utilisé par operation)
          199  +Nom de la contrainte : fki_operation_recurrentoperation_r_recurrentoperation_id_id')   WHERE NEW.r_recurrentoperation_id!=0 AND NEW.r_recurrentoperation_id!='' AND (SELECT id FROM recurrentoperation WHERE id = NEW.r_recurrentoperation_id) IS NULL; END;
          200  +CREATE TRIGGER fku_operation_recurrentoperation_r_recurrentoperation_id_id BEFORE UPDATE ON operation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (recurrentoperation est utilisé par operation)
          201  +Nom de la contrainte : fku_operation_recurrentoperation_r_recurrentoperation_id_id')       WHERE NEW.r_recurrentoperation_id!=0 AND NEW.r_recurrentoperation_id!='' AND (SELECT id FROM recurrentoperation WHERE id = NEW.r_recurrentoperation_id) IS NULL; END;
          202  +CREATE TRIGGER fkd_operation_recurrentoperation_r_recurrentoperation_id_id BEFORE DELETE ON recurrentoperation FOR EACH ROW BEGIN     UPDATE operation SET r_recurrentoperation_id=0 WHERE r_recurrentoperation_id=OLD.id; END;
          203  +CREATE TRIGGER fki_operationbalance_operation_r_operation_id_id BEFORE INSERT ON operationbalance FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (operation est utilisé par operationbalance)
          204  +Nom de la contrainte : fki_operationbalance_operation_r_operation_id_id')   WHERE NEW.r_operation_id!=0 AND NEW.r_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.r_operation_id) IS NULL; END;
          205  +CREATE TRIGGER fku_operationbalance_operation_r_operation_id_id BEFORE UPDATE ON operationbalance FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (operation est utilisé par operationbalance)
          206  +Nom de la contrainte : fku_operationbalance_operation_r_operation_id_id')       WHERE NEW.r_operation_id!=0 AND NEW.r_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.r_operation_id) IS NULL; END;
          207  +CREATE TRIGGER fkd_operationbalance_operation_r_operation_id_id BEFORE DELETE ON operation FOR EACH ROW BEGIN     UPDATE operationbalance SET r_operation_id=0 WHERE r_operation_id=OLD.id; END;
          208  +CREATE TRIGGER fki_recurrentoperation_operation_rd_operation_id_id BEFORE INSERT ON recurrentoperation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (operation est utilisé par recurrentoperation)
          209  +Nom de la contrainte : fki_recurrentoperation_operation_rd_operation_id_id')   WHERE NEW.rd_operation_id!=0 AND NEW.rd_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.rd_operation_id) IS NULL; END;
          210  +CREATE TRIGGER fku_recurrentoperation_operation_rd_operation_id_id BEFORE UPDATE ON recurrentoperation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (operation est utilisé par recurrentoperation)
          211  +Nom de la contrainte : fku_recurrentoperation_operation_rd_operation_id_id')       WHERE NEW.rd_operation_id!=0 AND NEW.rd_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.rd_operation_id) IS NULL; END;
          212  +CREATE TRIGGER fkdc_operation_recurrentoperation_id_rd_operation_id BEFORE DELETE ON operation FOR EACH ROW BEGIN     DELETE FROM recurrentoperation WHERE recurrentoperation.rd_operation_id = OLD.id; END;
          213  +CREATE TRIGGER fki_suboperation_operation_rd_operation_id_id BEFORE INSERT ON suboperation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (operation est utilisé par suboperation)
          214  +Nom de la contrainte : fki_suboperation_operation_rd_operation_id_id')   WHERE NEW.rd_operation_id!=0 AND NEW.rd_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.rd_operation_id) IS NULL; END;
          215  +CREATE TRIGGER fku_suboperation_operation_rd_operation_id_id BEFORE UPDATE ON suboperation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (operation est utilisé par suboperation)
          216  +Nom de la contrainte : fku_suboperation_operation_rd_operation_id_id')       WHERE NEW.rd_operation_id!=0 AND NEW.rd_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.rd_operation_id) IS NULL; END;
          217  +CREATE TRIGGER fkdc_operation_suboperation_id_rd_operation_id BEFORE DELETE ON operation FOR EACH ROW BEGIN     DELETE FROM suboperation WHERE suboperation.rd_operation_id = OLD.id; END;
          218  +CREATE TRIGGER fki_suboperation_category_r_category_id_id BEFORE INSERT ON suboperation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (category est utilisé par suboperation)
          219  +Nom de la contrainte : fki_suboperation_category_r_category_id_id')   WHERE NEW.r_category_id!=0 AND NEW.r_category_id!='' AND (SELECT id FROM category WHERE id = NEW.r_category_id) IS NULL; END;
          220  +CREATE TRIGGER fku_suboperation_category_r_category_id_id BEFORE UPDATE ON suboperation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (category est utilisé par suboperation)
          221  +Nom de la contrainte : fku_suboperation_category_r_category_id_id')       WHERE NEW.r_category_id!=0 AND NEW.r_category_id!='' AND (SELECT id FROM category WHERE id = NEW.r_category_id) IS NULL; END;
          222  +CREATE TRIGGER fkd_suboperation_category_r_category_id_id BEFORE DELETE ON category FOR EACH ROW BEGIN     UPDATE suboperation SET r_category_id=0 WHERE r_category_id=OLD.id; END;
          223  +CREATE TRIGGER fki_suboperation_refund_r_refund_id_id BEFORE INSERT ON suboperation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (refund est utilisé par suboperation)
          224  +Nom de la contrainte : fki_suboperation_refund_r_refund_id_id')   WHERE NEW.r_refund_id!=0 AND NEW.r_refund_id!='' AND (SELECT id FROM refund WHERE id = NEW.r_refund_id) IS NULL; END;
          225  +CREATE TRIGGER fku_suboperation_refund_r_refund_id_id BEFORE UPDATE ON suboperation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (refund est utilisé par suboperation)
          226  +Nom de la contrainte : fku_suboperation_refund_r_refund_id_id')       WHERE NEW.r_refund_id!=0 AND NEW.r_refund_id!='' AND (SELECT id FROM refund WHERE id = NEW.r_refund_id) IS NULL; END;
          227  +CREATE TRIGGER fkd_suboperation_refund_r_refund_id_id BEFORE DELETE ON refund FOR EACH ROW BEGIN     UPDATE suboperation SET r_refund_id=0 WHERE r_refund_id=OLD.id; END;
          228  +CREATE TRIGGER fki_unit_unit_rd_unit_id_id BEFORE INSERT ON unit FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (unit est utilisé par unit)
          229  +Nom de la contrainte : fki_unit_unit_rd_unit_id_id')   WHERE NEW.rd_unit_id!=0 AND NEW.rd_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rd_unit_id) IS NULL; END;
          230  +CREATE TRIGGER fku_unit_unit_rd_unit_id_id BEFORE UPDATE ON unit FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (unit est utilisé par unit)
          231  +Nom de la contrainte : fku_unit_unit_rd_unit_id_id')       WHERE NEW.rd_unit_id!=0 AND NEW.rd_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rd_unit_id) IS NULL; END;
          232  +CREATE TRIGGER fkdc_unit_unit_id_rd_unit_id BEFORE DELETE ON unit FOR EACH ROW BEGIN     DELETE FROM unit WHERE unit.rd_unit_id = OLD.id; END;
          233  +CREATE TRIGGER fki_unitvalue_unit_rd_unit_id_id BEFORE INSERT ON unitvalue FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (unit est utilisé par unitvalue)
          234  +Nom de la contrainte : fki_unitvalue_unit_rd_unit_id_id')   WHERE NEW.rd_unit_id!=0 AND NEW.rd_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rd_unit_id) IS NULL; END;
          235  +CREATE TRIGGER fku_unitvalue_unit_rd_unit_id_id BEFORE UPDATE ON unitvalue FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (unit est utilisé par unitvalue)
          236  +Nom de la contrainte : fku_unitvalue_unit_rd_unit_id_id')       WHERE NEW.rd_unit_id!=0 AND NEW.rd_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rd_unit_id) IS NULL; END;
          237  +CREATE TRIGGER fkdc_unit_unitvalue_id_rd_unit_id BEFORE DELETE ON unit FOR EACH ROW BEGIN     DELETE FROM unitvalue WHERE unitvalue.rd_unit_id = OLD.id; END;
          238  +CREATE TRIGGER fkd_vm_budget_tmp_category_rc_category_id_id BEFORE DELETE ON category FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de détruire un objet (category est utilisé par vm_budget_tmp)
          239  +Nom de la contrainte : fkd_vm_budget_tmp_category_rc_category_id_id')     WHERE (SELECT rc_category_id FROM vm_budget_tmp WHERE rc_category_id = OLD.id) IS NOT NULL; END;
          240  +CREATE TRIGGER fkdc_category_vm_category_display_tmp_id_rd_category_id BEFORE DELETE ON category FOR EACH ROW BEGIN     DELETE FROM vm_category_display_tmp WHERE vm_category_display_tmp.rd_category_id = OLD.id; END;
          241  +CREATE VIEW v_unit_displayname AS SELECT *, t_name||' ('||t_symbol||')' AS t_displayname FROM unit;
          242  +CREATE VIEW v_unit_tmp1 AS SELECT *,(SELECT count(*) FROM unitvalue s WHERE s.rd_unit_id=unit.id) AS i_NBVALUES, (CASE WHEN unit.rd_unit_id=0 THEN '' ELSE (SELECT (CASE WHEN s.t_symbol!='' THEN s.t_symbol ELSE s.t_name END) FROM unit s WHERE s.id=unit.rd_unit_id) END) AS t_UNIT,(CASE unit.t_type WHEN '1' THEN 'Monnaie principale' WHEN '2' THEN 'Monnaie secondaire' WHEN 'C' THEN 'Monnaie' WHEN 'S' THEN 'Action' WHEN 'I' THEN 'Indice' ELSE 'Objet' END) AS t_TYPENLS, (SELECT MIN(s.d_date) FROM  unitvalue s WHERE s.rd_unit_id=unit.id) AS d_MINDATE, (SELECT MAX(s.d_date) FROM  unitvalue s WHERE s.rd_unit_id=unit.id) AS d_MAXDATE from unit;
          243  +CREATE VIEW v_unit_tmp2 AS SELECT *,CASE WHEN v_unit_tmp1.t_type='1' THEN 1 ELSE IFNULL((SELECT s.f_quantity FROM unitvalue s WHERE s.rd_unit_id=v_unit_tmp1.id AND s.d_date=v_unit_tmp1.d_MAXDATE),1) END AS f_LASTVALUE from v_unit_tmp1;
          244  +CREATE VIEW v_unit AS SELECT *,v_unit_tmp2.f_LASTVALUE*IFNULL((SELECT s2.f_LASTVALUE FROM v_unit_tmp2 s2 WHERE s2.id=v_unit_tmp2.rd_unit_id) , 1) AS f_CURRENTAMOUNT from v_unit_tmp2;
          245  +CREATE VIEW v_unitvalue_displayname AS SELECT *, (SELECT t_displayname FROM v_unit_displayname WHERE unitvalue.rd_unit_id=v_unit_displayname.id)||' '||STRFTIME('%d/%m/%Y',d_date) AS t_displayname FROM unitvalue;
          246  +CREATE VIEW v_unitvalue AS SELECT * FROM unitvalue;
          247  +CREATE VIEW v_suboperation AS SELECT * FROM suboperation;
          248  +CREATE VIEW v_operation_numbers AS SELECT DISTINCT i_number, rd_account_id FROM operation;
          249  +CREATE VIEW v_operation_next_numbers AS SELECT T1.i_number+1 AS i_number FROM v_operation_numbers AS T1 LEFT OUTER JOIN v_operation_numbers T2 ON T2.rd_account_id=T1.rd_account_id AND T2.i_number=T1.i_number+1 WHERE T1.i_number!=0 AND (T2.i_number IS NULL) ORDER BY T1.i_number;
          250  +CREATE VIEW v_operation_tmp1 AS SELECT *,(SELECT t_name FROM payee s WHERE s.id=operation.r_payee_id) AS t_PAYEE,(SELECT TOTAL(s.f_value) FROM suboperation s WHERE s.rd_operation_id=operation.ID) AS f_QUANTITY,(SELECT count(*) FROM suboperation s WHERE s.rd_operation_id=operation.ID) AS i_NBSUBCATEGORY FROM operation;
          251  +CREATE VIEW v_operation AS SELECT *,(SELECT s.id FROM suboperation s WHERE s.rd_operation_id=v_operation_tmp1.id AND ABS(s.f_value)=(SELECT MAX(ABS(s2.f_value)) FROM suboperation s2 WHERE s2.rd_operation_id=v_operation_tmp1.id)) AS i_MOSTIMPSUBOP,((SELECT s.f_CURRENTAMOUNT FROM v_unit s WHERE s.id=v_operation_tmp1.rc_unit_id)*v_operation_tmp1.f_QUANTITY) AS f_CURRENTAMOUNT, (CASE WHEN v_operation_tmp1.i_group_id<>0 AND EXISTS (SELECT 1 FROM account a WHERE v_operation_tmp1.rd_account_id=a.id AND a.t_type<>'L') AND EXISTS (SELECT 1 FROM v_operation_tmp1 op2, account a WHERE op2.i_group_id=v_operation_tmp1.i_group_id AND op2.rd_account_id=a.id AND a.t_type<>'L' AND op2.rc_unit_id=v_operation_tmp1.rc_unit_id AND op2.f_QUANTITY=-v_operation_tmp1.f_QUANTITY) THEN 'Y' ELSE 'N' END) AS t_TRANSFER FROM v_operation_tmp1;
          252  +CREATE VIEW v_operation_displayname AS SELECT *, STRFTIME('%d/%m/%Y',d_date)||' '||IFNULL(t_PAYEE,'')||' '||v_operation.f_CURRENTAMOUNT||' '||(SELECT (CASE WHEN s.t_symbol!='' THEN s.t_symbol ELSE s.t_name END) FROM unit s WHERE s.id=v_operation.rc_unit_id) AS t_displayname FROM v_operation;
          253  +CREATE VIEW v_operation_delete AS SELECT *, (CASE WHEN t_status='Y' THEN 'Vous n''êtes pas autorisé à détruire cette opération car en état « rapproché »' END) t_delete_message FROM operation;
          254  +CREATE VIEW v_account AS SELECT *,(SELECT MAX(s.d_date) FROM  interest s WHERE s.rd_account_id=account.id) AS d_MAXDATE, (SELECT TOTAL(s.f_CURRENTAMOUNT) FROM v_operation s WHERE s.rd_account_id=account.id AND s.t_template='N') AS f_CURRENTAMOUNT FROM account;
          255  +CREATE VIEW v_account_delete AS SELECT *, (CASE WHEN EXISTS(SELECT 1 FROM operation WHERE rd_account_id=account.id AND d_date<>'0000-00-00' AND t_template='N' AND t_status='Y') THEN 'Vous n''êtes pas autorisé à détruire ce compte car il contient des opérations rapprochées' END) t_delete_message FROM account;
          256  +CREATE VIEW v_bank_displayname AS SELECT *, t_name AS t_displayname FROM bank;
          257  +CREATE VIEW v_account_displayname AS SELECT *, (SELECT t_displayname FROM v_bank_displayname WHERE account.rd_bank_id=v_bank_displayname.id)||'-'||t_name AS t_displayname FROM account;
          258  +CREATE VIEW v_bank AS SELECT *,(SELECT TOTAL(s.f_CURRENTAMOUNT) FROM v_account s WHERE s.rd_bank_id=bank.id) AS f_CURRENTAMOUNT FROM bank;
          259  +CREATE VIEW v_category_displayname AS SELECT *, t_fullname AS t_displayname FROM category;
          260  +CREATE VIEW v_category AS SELECT * FROM category;
          261  +CREATE VIEW v_recurrentoperation AS SELECT *,i_period_increment||' '||(CASE t_period_unit WHEN 'Y' THEN 'année(s)' WHEN 'M' THEN 'mois' WHEN 'W' THEN 'semaine(s)' ELSE 'jour(s)' END) AS t_PERIODNLS FROM recurrentoperation;
          262  +CREATE VIEW v_recurrentoperation_displayname AS SELECT *, STRFTIME('%d/%m/%Y',d_date)||' '||SUBSTR((SELECT t_displayname FROM v_operation_displayname WHERE v_operation_displayname.id=v_recurrentoperation.rd_operation_id), 11) AS t_displayname FROM v_recurrentoperation;
          263  +CREATE VIEW v_unitvalue_display AS SELECT *,IFNULL((SELECT (CASE WHEN s.t_symbol!='' THEN s.t_symbol ELSE s.t_name END) FROM unit s WHERE s.id=(SELECT s2.rd_unit_id FROM unit s2 WHERE s2.id=unitvalue.rd_unit_id)),'') AS t_UNIT,STRFTIME('%Y-%m',unitvalue.d_date) AS d_DATEMONTH,STRFTIME('%Y',unitvalue.d_date) AS d_DATEYEAR FROM unitvalue;
          264  +CREATE VIEW v_suboperation_display AS SELECT *,IFNULL((SELECT s.t_fullname FROM category s WHERE s.id=v_suboperation.r_category_id),'') AS t_CATEGORY, IFNULL((SELECT s.t_name FROM refund s WHERE s.id=v_suboperation.r_refund_id),'') AS t_REFUND, (CASE WHEN v_suboperation.f_value>=0 THEN v_suboperation.f_value ELSE 0 END) AS f_VALUE_INCOME, (CASE WHEN v_suboperation.f_value<=0 THEN v_suboperation.f_value ELSE 0 END) AS f_VALUE_EXPENSE FROM v_suboperation;
          265  +CREATE VIEW v_suboperation_displayname AS SELECT *, t_CATEGORY||' : '||f_value AS t_displayname FROM v_suboperation_display;
          266  +CREATE VIEW v_operation_display_all AS SELECT *,(SELECT s.t_name FROM account s WHERE s.id=v_operation.rd_account_id) AS t_ACCOUNT,(SELECT (CASE WHEN s.t_symbol!='' THEN s.t_symbol ELSE s.t_name END) FROM unit s WHERE s.id=v_operation.rc_unit_id) AS t_UNIT,(SELECT s.t_CATEGORY FROM v_suboperation_display s WHERE s.id=v_operation.i_MOSTIMPSUBOP) AS t_CATEGORY,(SELECT s.t_REFUND FROM v_suboperation_display s WHERE s.id=v_operation.i_MOSTIMPSUBOP) AS t_REFUND,(CASE WHEN v_operation.f_QUANTITY<0 THEN '-' WHEN v_operation.f_QUANTITY=0 THEN '' ELSE '+' END) AS t_TYPEEXPENSE, (CASE WHEN v_operation.f_QUANTITY<=0 THEN 'Dépense' ELSE 'Revenu' END) AS t_TYPEEXPENSENLS, STRFTIME('%Y-W%W',v_operation.d_date) AS d_DATEWEEK,STRFTIME('%Y-%m',v_operation.d_date) AS d_DATEMONTH,STRFTIME('%Y',v_operation.d_date)||'-Q'||(CASE WHEN STRFTIME('%m',v_operation.d_date)<='03' THEN '1' WHEN STRFTIME('%m',v_operation.d_date)<='06' THEN '2' WHEN STRFTIME('%m',v_operation.d_date)<='09' THEN '3' ELSE '4' END) AS d_DATEQUARTER, STRFTIME('%Y',v_operation.d_date)||'-S'||(CASE WHEN STRFTIME('%m',v_operation.d_date)<='06' THEN '1' ELSE '2' END) AS d_DATESEMESTER, STRFTIME('%Y',v_operation.d_date) AS d_DATEYEAR, (SELECT count(*) FROM v_recurrentoperation s WHERE s.rd_operation_id=v_operation.id) AS i_NBRECURRENT,  (CASE WHEN v_operation.f_QUANTITY>=0 THEN v_operation.f_QUANTITY ELSE 0 END) AS f_QUANTITY_INCOME, (CASE WHEN v_operation.f_QUANTITY<=0 THEN v_operation.f_QUANTITY ELSE 0 END) AS f_QUANTITY_EXPENSE, (SELECT o2.f_balance FROM operationbalance o2 WHERE o2.r_operation_id=v_operation.id ) AS f_BALANCE, (CASE WHEN v_operation.f_QUANTITY>=0 THEN v_operation.f_CURRENTAMOUNT ELSE 0 END) AS f_CURRENTAMOUNT_INCOME, (CASE WHEN v_operation.f_QUANTITY<=0 THEN v_operation.f_CURRENTAMOUNT ELSE 0 END) AS f_CURRENTAMOUNT_EXPENSE FROM v_operation;
          267  +CREATE VIEW v_operation_template_display AS SELECT * FROM v_operation_display_all WHERE t_template='Y';
          268  +CREATE VIEW v_operation_display AS SELECT * FROM v_operation_display_all WHERE d_date!='0000-00-00' AND t_template='N';
          269  +CREATE VIEW v_unit_display AS SELECT *,(SELECT TOTAL(o.f_QUANTITY) FROM v_operation_display o WHERE o.rc_unit_id=v_unit.id) AS f_QUANTITYOWNED FROM v_unit;
          270  +CREATE VIEW v_account_display AS SELECT (CASE t_type WHEN 'C' THEN 'Courant' WHEN 'D' THEN 'Carte de crédit' WHEN 'A' THEN 'Actif' WHEN 'I' THEN 'Investissement' WHEN 'W' THEN 'Portefeuille' WHEN 'L' THEN 'Prêt' WHEN 'O' THEN 'Autre' END) AS t_TYPENLS,bank.t_name  AS t_BANK,bank.t_bank_number AS t_BANK_NUMBER,bank.t_icon AS t_ICON,v_account.*,(v_account.f_CURRENTAMOUNT/(SELECT u.f_CURRENTAMOUNT FROM v_unit u, operation s WHERE u.id=s.rc_unit_id AND s.rd_account_id=v_account.id AND s.d_date='0000-00-00')) AS f_QUANTITY, (SELECT (CASE WHEN u.t_symbol!='' THEN u.t_symbol ELSE u.t_name END) FROM unit u, operation s WHERE u.id=s.rc_unit_id AND s.rd_account_id=v_account.id AND s.d_date='0000-00-00') AS t_UNIT, (SELECT TOTAL(s.f_CURRENTAMOUNT) FROM v_operation s WHERE s.rd_account_id=v_account.id AND s.t_status!='N' AND s.t_template='N') AS f_CHECKED, (SELECT TOTAL(s.f_CURRENTAMOUNT) FROM v_operation s WHERE s.rd_account_id=v_account.id AND s.t_status='N' AND s.t_template='N') AS f_COMING_SOON, (SELECT TOTAL(s.f_CURRENTAMOUNT) FROM v_operation s WHERE s.rd_account_id=v_account.id AND s.d_date<=date('now') AND s.t_template='N') AS f_TODAYAMOUNT, (SELECT count(*) FROM v_operation_display s WHERE s.rd_account_id=v_account.id) AS i_NBOPERATIONS, IFNULL((SELECT s.f_rate FROM interest s WHERE s.rd_account_id=v_account.id AND s.d_date=v_account.d_MAXDATE),0) AS f_RATE FROM v_account, bank WHERE bank.id=v_account.rd_bank_id;
          271  +CREATE VIEW v_operation_consolidated AS SELECT (SELECT s.t_TYPENLS FROM v_account_display s WHERE s.id=op.rd_account_id) AS t_ACCOUNTTYPE,(SELECT u.t_TYPENLS FROM v_unit u WHERE u.id=op.rc_unit_id) AS t_UNITTYPE,sop.id AS i_SUBOPID, sop.r_refund_id AS r_refund_id, (CASE WHEN sop.t_comment='' THEN op.t_comment ELSE sop.t_comment END) AS t_REALCOMMENT, sop.t_CATEGORY AS t_REALCATEGORY, sop.t_REFUND AS t_REALREFUND, sop.r_category_id AS i_IDCATEGORY, (CASE WHEN sop.f_value<0 THEN '-' WHEN sop.f_value=0 THEN '' ELSE '+' END) AS t_TYPEEXPENSE, (CASE WHEN sop.f_value<0 THEN 'Dépense' WHEN sop.f_value=0 THEN '' ELSE 'Revenu' END) AS t_TYPEEXPENSENLS, sop.f_value AS f_REALQUANTITY, sop.f_VALUE_INCOME AS f_REALQUANTITY_INCOME, sop.f_VALUE_EXPENSE AS f_REALQUANTITY_EXPENSE, ((SELECT u.f_CURRENTAMOUNT FROM v_unit u WHERE u.id=op.rc_unit_id)*sop.f_value) AS f_REALCURRENTAMOUNT, ((SELECT u.f_CURRENTAMOUNT FROM v_unit u WHERE u.id=op.rc_unit_id)*sop.f_VALUE_INCOME) AS f_REALCURRENTAMOUNT_INCOME, ((SELECT u.f_CURRENTAMOUNT FROM v_unit u WHERE u.id=op.rc_unit_id)*sop.f_VALUE_EXPENSE) AS f_REALCURRENTAMOUNT_EXPENSE, op.* FROM v_operation_display_all AS op, v_suboperation_display AS sop WHERE op.t_template='N' AND sop.rd_operation_id=op.ID;
          272  +CREATE VIEW v_operation_prop AS SELECT p.id AS i_PROPPID, p.t_name AS i_PROPPNAME, p.t_value AS i_PROPVALUE, op.* FROM v_operation_consolidated AS op LEFT OUTER JOIN parameters AS p ON p.t_uuid_parent=op.id||'-operation';
          273  +CREATE VIEW v_refund_delete AS SELECT *, (CASE WHEN EXISTS(SELECT 1 FROM v_operation_consolidated WHERE r_refund_id=refund.id AND t_status='Y') THEN 'Vous n''êtes pas autorisé à détruire ce suiveur car utilisé par des opérations rapprochées' END) t_delete_message FROM refund;
          274  +CREATE VIEW v_refund AS SELECT *, (SELECT TOTAL(o.f_REALCURRENTAMOUNT) FROM v_operation_consolidated o WHERE o.r_refund_id=refund.id) AS f_CURRENTAMOUNT FROM refund;
          275  +CREATE VIEW v_refund_display AS SELECT *,(SELECT MIN(o.d_date) FROM v_operation_consolidated o WHERE o.r_refund_id=v_refund.id) AS d_FIRSTDATE, (SELECT MAX(o.d_date) FROM v_operation_consolidated o WHERE o.r_refund_id=v_refund.id) AS d_LASTDATE  FROM v_refund;
          276  +CREATE VIEW v_refund_displayname AS SELECT *, t_name AS t_displayname FROM refund;
          277  +CREATE VIEW v_payee_delete AS SELECT *, (CASE WHEN EXISTS(SELECT 1 FROM operation WHERE r_payee_id=payee.id AND t_status='Y') THEN 'Vous n''êtes pas autorisé à détruire ce tiers car utilisé par des opérations rapprochées' END) t_delete_message FROM payee;
          278  +CREATE VIEW v_payee AS SELECT *, (SELECT TOTAL(o.f_CURRENTAMOUNT) FROM v_operation o WHERE o.r_payee_id=payee.id AND o.t_template='N') AS f_CURRENTAMOUNT FROM payee;
          279  +CREATE VIEW v_payee_display AS SELECT *  FROM v_payee;
          280  +CREATE VIEW v_payee_displayname AS SELECT *, t_name AS t_displayname FROM payee;
          281  +CREATE VIEW v_category_delete AS SELECT *, (CASE WHEN EXISTS(SELECT 1 FROM v_operation_consolidated WHERE (t_REALCATEGORY=category.t_fullname OR t_REALCATEGORY like category.t_fullname||'%') AND t_status='Y') THEN 'Vous n''êtes pas autorisé à détruire cette catégorie car utilisée par des opérations rapprochées' END) t_delete_message FROM category;
          282  +CREATE VIEW v_category_display_tmp AS SELECT *,(SELECT count(distinct(so.rd_operation_id)) FROM operation o, suboperation so WHERE so.rd_operation_id=o.id AND so.r_category_id=v_category.ID AND o.t_template='N') AS i_NBOPERATIONS, (SELECT TOTAL(o.f_REALCURRENTAMOUNT) FROM v_operation_consolidated o WHERE o.i_IDCATEGORY=v_category.ID) AS f_REALCURRENTAMOUNT FROM v_category;
          283  +CREATE VIEW v_category_display AS SELECT *,f_REALCURRENTAMOUNT+(SELECT TOTAL(c.f_REALCURRENTAMOUNT) FROM vm_category_display_tmp c WHERE c.t_fullname LIKE vm_category_display_tmp.t_fullname||' > %') AS f_SUMCURRENTAMOUNT, i_NBOPERATIONS+(SELECT CAST(TOTAL(c.i_NBOPERATIONS) AS INTEGER) FROM vm_category_display_tmp c WHERE c.t_fullname like vm_category_display_tmp.t_fullname||' > %') AS i_SUMNBOPERATIONS, (CASE WHEN t_bookmarked='Y' THEN 'Y' WHEN EXISTS(SELECT 1 FROM category c WHERE c.t_bookmarked='Y' AND c.t_fullname like vm_category_display_tmp.t_fullname||' > %') THEN 'C' ELSE 'N' END) AS t_HASBOOKMARKEDCHILD, (CASE WHEN vm_category_display_tmp.f_REALCURRENTAMOUNT<0 THEN '-' WHEN vm_category_display_tmp.f_REALCURRENTAMOUNT=0 THEN '' ELSE '+' END) AS t_TYPEEXPENSE,(CASE WHEN vm_category_display_tmp.f_REALCURRENTAMOUNT<0 THEN 'Dépense' WHEN vm_category_display_tmp.f_REALCURRENTAMOUNT=0 THEN '' ELSE 'Revenu' END) AS t_TYPEEXPENSENLS FROM vm_category_display_tmp;
          284  +CREATE VIEW v_recurrentoperation_display AS SELECT rop.*, op.t_ACCOUNT, op.i_number, op.t_mode, op.i_group_id, op.t_TRANSFER, op.t_PAYEE, op.t_comment, op.t_CATEGORY, op.t_status, op.f_CURRENTAMOUNT FROM v_recurrentoperation rop, v_operation_display_all AS op WHERE rop.rd_operation_id=op.ID;
          285  +CREATE VIEW v_rule AS SELECT *,(SELECT COUNT(1) FROM rule r WHERE r.f_sortorder<=rule.f_sortorder) AS i_ORDER FROM rule;
          286  +CREATE VIEW v_rule_displayname AS SELECT *, t_definition AS t_displayname FROM rule;
          287  +CREATE VIEW v_interest AS SELECT *,(SELECT s.t_name FROM account s WHERE s.id=interest.rd_account_id) AS t_ACCOUNT  FROM interest;
          288  +CREATE VIEW v_interest_displayname AS SELECT *, STRFTIME('%d/%m/%Y',d_date)||' '||f_rate||'%' AS t_displayname FROM interest;
          289  +CREATE VIEW v_budgetrule AS SELECT *, IFNULL((SELECT s.t_fullname FROM category s WHERE s.id=budgetrule.rc_category_id),'') AS t_CATEGORYCONDITION, IFNULL((SELECT s.t_fullname FROM category s WHERE s.id=budgetrule.rc_category_id_target),'') AS t_CATEGORY, (CASE WHEN budgetrule.i_condition=-1 THEN 'Négatif' WHEN budgetrule.i_condition=1 THEN 'Positif' WHEN budgetrule.i_condition=0 THEN 'Tous' END) AS t_WHENNLS, f_quantity||(CASE WHEN budgetrule.t_absolute='N' THEN '%' ELSE (SELECT t_symbol FROM unit WHERE t_type='1') END) AS t_WHATNLS,(CASE WHEN budgetrule.t_rule='N' THEN 'Suivant' WHEN budgetrule.t_rule='C' THEN 'Courant' WHEN budgetrule.t_rule='Y' THEN 'Année' END) AS t_RULENLS FROM budgetrule;
          290  +CREATE VIEW v_budgetrule_display AS SELECT *  FROM v_budgetrule;
          291  +CREATE VIEW v_budgetrule_displayname AS SELECT *, t_WHENNLS||' '||t_WHATNLS||' '||t_RULENLS||' '||t_CATEGORY AS t_displayname FROM v_budgetrule;
          292  +CREATE VIEW v_budget_tmp AS SELECT *, IFNULL((SELECT s.t_fullname FROM category s WHERE s.id=budget.rc_category_id),'') AS t_CATEGORY, (i_year||(CASE WHEN i_month=0 THEN '' WHEN i_month<10 THEN '-0'||i_month ELSE '-'||i_month END)) AS t_PERIOD, (SELECT TOTAL(o.f_REALCURRENTAMOUNT) FROM v_operation_consolidated o WHERE STRFTIME('%Y', o.d_date)=i_year AND (i_month=0 OR STRFTIME('%m', o.d_date)=i_month) AND o.i_IDCATEGORY IN (SELECT b2.id_category FROM budgetcategory b2 WHERE b2.id=budget.id)) AS f_CURRENTAMOUNT, (SELECT GROUP_CONCAT(v_budgetrule_displayname.t_displayname,',') FROM v_budgetrule_displayname WHERE (v_budgetrule_displayname.t_year_condition='N' OR budget.i_year=v_budgetrule_displayname.i_year) AND (v_budgetrule_displayname.t_month_condition='N' OR budget.i_month=v_budgetrule_displayname.i_month) AND (v_budgetrule_displayname.t_category_condition='N' OR budget.rc_category_id=v_budgetrule_displayname.rc_category_id) ORDER BY v_budgetrule_displayname.t_absolute DESC, v_budgetrule_displayname.id) AS t_RULES FROM budget;
          293  +CREATE VIEW v_budget AS SELECT *, (f_CURRENTAMOUNT-f_budgeted_modified) AS f_DELTABEFORETRANSFER, (f_CURRENTAMOUNT-f_budgeted_modified-f_transferred) AS f_DELTA FROM v_budget_tmp;
          294  +CREATE VIEW v_budget_display AS SELECT *, (f_CURRENTAMOUNT-f_budgeted_modified) AS f_DELTABEFORETRANSFER, (f_CURRENTAMOUNT-f_budgeted_modified-f_transferred) AS f_DELTA FROM vm_budget_tmp;
          295  +CREATE VIEW v_budget_displayname AS SELECT *, t_CATEGORY||' '||t_PERIOD||' '||f_budgeted_modified AS t_displayname FROM v_budget;
          296  +CREATE TRIGGER fkdc_bank_parameters_uuid BEFORE DELETE ON bank FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'bank'; END;
          297  +CREATE TRIGGER fkdc_account_parameters_uuid BEFORE DELETE ON account FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'account'; END;
          298  +CREATE TRIGGER fkdc_unit_parameters_uuid BEFORE DELETE ON unit FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'unit'; END;
          299  +CREATE TRIGGER fkdc_unitvalue_parameters_uuid BEFORE DELETE ON unitvalue FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'unitvalue'; END;
          300  +CREATE TRIGGER fkdc_category_parameters_uuid BEFORE DELETE ON category FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'category'; END;
          301  +CREATE TRIGGER fkdc_operation_parameters_uuid BEFORE DELETE ON operation FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'operation'; END;
          302  +CREATE TRIGGER fkdc_interest_parameters_uuid BEFORE DELETE ON interest FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'interest'; END;
          303  +CREATE TRIGGER fkdc_suboperation_parameters_uuid BEFORE DELETE ON suboperation FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'suboperation'; END;
          304  +CREATE TRIGGER fkdc_refund_parameters_uuid BEFORE DELETE ON refund FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'refund'; END;
          305  +CREATE TRIGGER fkdc_payee_parameters_uuid BEFORE DELETE ON payee FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'payee'; END;
          306  +CREATE TRIGGER fkdc_recurrentoperation_parameters_uuid BEFORE DELETE ON recurrentoperation FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'recurrentoperation'; END;
          307  +CREATE TRIGGER fkdc_rule_parameters_uuid BEFORE DELETE ON rule FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'rule'; END;
          308  +CREATE TRIGGER fkdc_budget_parameters_uuid BEFORE DELETE ON budget FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'budget'; END;
          309  +CREATE TRIGGER fkdc_budgetrule_parameters_uuid BEFORE DELETE ON budgetrule FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'budgetrule'; END;
          310  +CREATE TRIGGER cpt_category_fullname1 AFTER INSERT ON category BEGIN UPDATE category SET t_fullname=CASE WHEN rd_category_id IS NULL OR rd_category_id='' OR rd_category_id=0 THEN new.t_name ELSE (SELECT c.t_fullname FROM category c WHERE c.id=new.rd_category_id)||' > '||new.t_name END WHERE id=new.id;END;
          311  +CREATE TRIGGER cpt_category_fullname2 AFTER UPDATE OF t_name, rd_category_id ON category BEGIN UPDATE category SET t_fullname=CASE WHEN rd_category_id IS NULL OR rd_category_id='' OR rd_category_id=0 THEN new.t_name ELSE (SELECT c.t_fullname FROM category c WHERE c.id=new.rd_category_id)||' > '||new.t_name END WHERE id=new.id;UPDATE category SET t_name=t_name WHERE rd_category_id=new.id;END;
          312  +CREATE TRIGGER fkdc_category_delete BEFORE DELETE ON category FOR EACH ROW BEGIN     UPDATE suboperation SET r_category_id=OLD.rd_category_id WHERE r_category_id=OLD.id; END;
          313  +explain
          314  +       SELECT TOTAL(f_CURRENTAMOUNT), d_DATEMONTH
          315  +       from v_operation_display
          316  +       WHERE d_DATEMONTH IN ('2012-05', '2012-04')
          317  +       group by d_DATEMONTH, t_TYPEEXPENSE;
          318  +  }
          319  +} {/.* Goto .*/}
          320  +
          321  +# The next test requires FTS4
          322  +ifcapable !fts3 {
          323  +  finish_test
          324  +  return
          325  +}
          326  +
          327  +# Taken from the gnome-shell project
          328  +#
          329  +db close
          330  +forcedelete test.db
          331  +sqlite3 db test.db
          332  +do_test fuzz-oss1-gnomeshell {
          333  +  db eval {
          334  +CREATE TABLE Resource (ID INTEGER NOT NULL PRIMARY KEY, Uri TEXT NOT
          335  +NULL, UNIQUE (Uri));
          336  +CREATE VIRTUAL TABLE fts USING fts4;
          337  +CREATE TABLE "mfo:Action" (ID INTEGER NOT NULL PRIMARY KEY);
          338  +CREATE TABLE "mfo:Enclosure" (ID INTEGER NOT NULL PRIMARY KEY,
          339  +"mfo:remoteLink" INTEGER, "mfo:remoteLink:graph" INTEGER,
          340  +"mfo:groupDefault" INTEGER, "mfo:groupDefault:graph" INTEGER,
          341  +"mfo:localLink" INTEGER, "mfo:localLink:graph" INTEGER, "mfo:optional"
          342  +INTEGER, "mfo:optional:graph" INTEGER);
          343  +CREATE TABLE "mfo:FeedChannel" (ID INTEGER NOT NULL PRIMARY KEY,
          344  +"mfo:updatedTime" INTEGER, "mfo:updatedTime:graph" INTEGER,
          345  +"mfo:updatedTime:localDate" INTEGER, "mfo:updatedTime:localTime"
          346  +INTEGER, "mfo:unreadCount" INTEGER, "mfo:unreadCount:graph" INTEGER,
          347  +"mfo:totalCount" INTEGER, "mfo:totalCount:graph" INTEGER, "mfo:action"
          348  +INTEGER, "mfo:action:graph" INTEGER, "mfo:type" INTEGER,
          349  +"mfo:type:graph" INTEGER);
          350  +CREATE TABLE "mfo:FeedElement" (ID INTEGER NOT NULL PRIMARY KEY,
          351  +"mfo:image" TEXT COLLATE NOCASE, "mfo:image:graph" INTEGER,
          352  +"mfo:feedSettings" INTEGER, "mfo:feedSettings:graph" INTEGER);
          353  +CREATE TABLE "mfo:FeedMessage" (ID INTEGER NOT NULL PRIMARY KEY,
          354  +"mfo:downloadedTime" INTEGER, "mfo:downloadedTime:graph" INTEGER,
          355  +"mfo:downloadedTime:localDate" INTEGER, "mfo:downloadedTime:localTime"
          356  +INTEGER);
          357  +CREATE TABLE "mfo:FeedMessage_mfo:enclosureList" (ID INTEGER NOT NULL,
          358  +"mfo:enclosureList" INTEGER NOT NULL, "mfo:enclosureList:graph"
          359  +INTEGER);
          360  +CREATE TABLE "mfo:FeedSettings" (ID INTEGER NOT NULL PRIMARY KEY,
          361  +"mfo:updateInterval" INTEGER, "mfo:updateInterval:graph" INTEGER,
          362  +"mfo:expiryInterval" INTEGER, "mfo:expiryInterval:graph" INTEGER,
          363  +"mfo:downloadPath" TEXT COLLATE NOCASE, "mfo:downloadPath:graph"
          364  +INTEGER, "mfo:downloadFlag" INTEGER, "mfo:downloadFlag:graph" INTEGER,
          365  +"mfo:maxSize" INTEGER, "mfo:maxSize:graph" INTEGER);
          366  +CREATE TABLE "mfo:FeedType" (ID INTEGER NOT NULL PRIMARY KEY,
          367  +"mfo:name" TEXT COLLATE NOCASE, "mfo:name:graph" INTEGER);
          368  +CREATE TABLE "mlo:GeoBoundingBox" (ID INTEGER NOT NULL PRIMARY KEY);
          369  +CREATE TABLE "mlo:GeoBoundingBox_mlo:bbNorthWest" (ID INTEGER NOT
          370  +NULL, "mlo:bbNorthWest" INTEGER NOT NULL, "mlo:bbNorthWest:graph"
          371  +INTEGER);
          372  +CREATE TABLE "mlo:GeoBoundingBox_mlo:bbSouthEast" (ID INTEGER NOT
          373  +NULL, "mlo:bbSouthEast" INTEGER NOT NULL, "mlo:bbSouthEast:graph"
          374  +INTEGER);
          375  +CREATE TABLE "mlo:GeoLocation" (ID INTEGER NOT NULL PRIMARY KEY);
          376  +CREATE TABLE "mlo:GeoLocation_mlo:asBoundingBox" (ID INTEGER NOT NULL,
          377  +"mlo:asBoundingBox" INTEGER NOT NULL, "mlo:asBoundingBox:graph"
          378  +INTEGER);
          379  +CREATE TABLE "mlo:GeoLocation_mlo:asGeoPoint" (ID INTEGER NOT NULL,
          380  +"mlo:asGeoPoint" INTEGER NOT NULL, "mlo:asGeoPoint:graph" INTEGER);
          381  +CREATE TABLE "mlo:GeoLocation_mlo:asPostalAddress" (ID INTEGER NOT
          382  +NULL, "mlo:asPostalAddress" INTEGER NOT NULL,
          383  +"mlo:asPostalAddress:graph" INTEGER);
          384  +CREATE TABLE "mlo:GeoPoint" (ID INTEGER NOT NULL PRIMARY KEY);
          385  +CREATE TABLE "mlo:GeoPoint_mlo:address" (ID INTEGER NOT NULL,
          386  +"mlo:address" TEXT NOT NULL, "mlo:address:graph" INTEGER);
          387  +CREATE TABLE "mlo:GeoPoint_mlo:altitude" (ID INTEGER NOT NULL,
          388  +"mlo:altitude" REAL NOT NULL, "mlo:altitude:graph" INTEGER);
          389  +CREATE TABLE "mlo:GeoPoint_mlo:city" (ID INTEGER NOT NULL, "mlo:city"
          390  +TEXT NOT NULL, "mlo:city:graph" INTEGER);
          391  +CREATE TABLE "mlo:GeoPoint_mlo:country" (ID INTEGER NOT NULL,
          392  +"mlo:country" TEXT NOT NULL, "mlo:country:graph" INTEGER);
          393  +CREATE TABLE "mlo:GeoPoint_mlo:latitude" (ID INTEGER NOT NULL,
          394  +"mlo:latitude" REAL NOT NULL, "mlo:latitude:graph" INTEGER);
          395  +CREATE TABLE "mlo:GeoPoint_mlo:longitude" (ID INTEGER NOT NULL,
          396  +"mlo:longitude" REAL NOT NULL, "mlo:longitude:graph" INTEGER);
          397  +CREATE TABLE "mlo:GeoPoint_mlo:state" (ID INTEGER NOT NULL,
          398  +"mlo:state" TEXT NOT NULL, "mlo:state:graph" INTEGER);
          399  +CREATE TABLE "mlo:GeoPoint_mlo:timestamp" (ID INTEGER NOT NULL,
          400  +"mlo:timestamp" INTEGER NOT NULL, "mlo:timestamp:graph" INTEGER,
          401  +"mlo:timestamp:localDate" INTEGER NOT NULL, "mlo:timestamp:localTime"
          402  +INTEGER NOT NULL);
          403  +CREATE TABLE "mlo:GeoSphere" (ID INTEGER NOT NULL PRIMARY KEY);
          404  +CREATE TABLE "mlo:GeoSphere_mlo:radius" (ID INTEGER NOT NULL,
          405  +"mlo:radius" REAL NOT NULL, "mlo:radius:graph" INTEGER);
          406  +CREATE TABLE "mlo:Landmark" (ID INTEGER NOT NULL PRIMARY KEY);
          407  +CREATE TABLE "mlo:LandmarkCategory" (ID INTEGER NOT NULL PRIMARY KEY);
          408  +CREATE TABLE "mlo:LandmarkCategory_mlo:isRemovable" (ID INTEGER NOT
          409  +NULL, "mlo:isRemovable" INTEGER NOT NULL, "mlo:isRemovable:graph"
          410  +INTEGER);
          411  +CREATE TABLE "mlo:Landmark_mlo:belongsToCategory" (ID INTEGER NOT
          412  +NULL, "mlo:belongsToCategory" INTEGER NOT NULL,
          413  +"mlo:belongsToCategory:graph" INTEGER);
          414  +CREATE TABLE "mlo:Landmark_mlo:poiLocation" (ID INTEGER NOT NULL,
          415  +"mlo:poiLocation" INTEGER NOT NULL, "mlo:poiLocation:graph" INTEGER);
          416  +CREATE TABLE "mlo:LocationBoundingBox" (ID INTEGER NOT NULL PRIMARY KEY);
          417  +CREATE TABLE "mlo:LocationBoundingBox_mlo:boxEastLimit" (ID INTEGER
          418  +NOT NULL, "mlo:boxEastLimit" INTEGER NOT NULL,
          419  +"mlo:boxEastLimit:graph" INTEGER);
          420  +CREATE TABLE "mlo:LocationBoundingBox_mlo:boxNorthLimit" (ID INTEGER
          421  +NOT NULL, "mlo:boxNorthLimit" INTEGER NOT NULL,
          422  +"mlo:boxNorthLimit:graph" INTEGER);
          423  +CREATE TABLE "mlo:LocationBoundingBox_mlo:boxSouthWestCorner" (ID
          424  +INTEGER NOT NULL, "mlo:boxSouthWestCorner" INTEGER NOT NULL,
          425  +"mlo:boxSouthWestCorner:graph" INTEGER);
          426  +CREATE TABLE "mlo:LocationBoundingBox_mlo:boxVerticalLimit" (ID
          427  +INTEGER NOT NULL, "mlo:boxVerticalLimit" INTEGER NOT NULL,
          428  +"mlo:boxVerticalLimit:graph" INTEGER);
          429  +CREATE TABLE "mlo:PointOfInterest" (ID INTEGER NOT NULL PRIMARY KEY);
          430  +CREATE TABLE "mlo:Route" (ID INTEGER NOT NULL PRIMARY KEY);
          431  +CREATE TABLE "mlo:Route_mlo:endTime" (ID INTEGER NOT NULL,
          432  +"mlo:endTime" INTEGER NOT NULL, "mlo:endTime:graph" INTEGER,
          433  +"mlo:endTime:localDate" INTEGER NOT NULL, "mlo:endTime:localTime"
          434  +INTEGER NOT NULL);
          435  +CREATE TABLE "mlo:Route_mlo:routeDetails" (ID INTEGER NOT NULL,
          436  +"mlo:routeDetails" TEXT NOT NULL, "mlo:routeDetails:graph" INTEGER);
          437  +CREATE TABLE "mlo:Route_mlo:startTime" (ID INTEGER NOT NULL,
          438  +"mlo:startTime" INTEGER NOT NULL, "mlo:startTime:graph" INTEGER,
          439  +"mlo:startTime:localDate" INTEGER NOT NULL, "mlo:startTime:localTime"
          440  +INTEGER NOT NULL);
          441  +CREATE TABLE "mto:DownloadTransfer" (ID INTEGER NOT NULL PRIMARY KEY);
          442  +CREATE TABLE "mto:State" (ID INTEGER NOT NULL PRIMARY KEY);
          443  +CREATE TABLE "mto:SyncTransfer" (ID INTEGER NOT NULL PRIMARY KEY);
          444  +CREATE TABLE "mto:Transfer" (ID INTEGER NOT NULL PRIMARY KEY,
          445  +"mto:transferState" INTEGER, "mto:transferState:graph" INTEGER,
          446  +"mto:method" INTEGER, "mto:method:graph" INTEGER, "mto:created"
          447  +INTEGER, "mto:created:graph" INTEGER, "mto:created:localDate" INTEGER,
          448  +"mto:created:localTime" INTEGER, "mto:account" TEXT COLLATE NOCASE,
          449  +"mto:account:graph" INTEGER, "mto:starter" INTEGER,
          450  +"mto:starter:graph" INTEGER, "mto:agent" INTEGER, "mto:agent:graph"
          451  +INTEGER);
          452  +CREATE TABLE "mto:TransferElement" (ID INTEGER NOT NULL PRIMARY KEY,
          453  +"mto:source" INTEGER, "mto:source:graph" INTEGER, "mto:destination"
          454  +INTEGER, "mto:destination:graph" INTEGER, "mto:startedTime" INTEGER,
          455  +"mto:startedTime:graph" INTEGER, "mto:startedTime:localDate" INTEGER,
          456  +"mto:startedTime:localTime" INTEGER, "mto:completedTime" INTEGER,
          457  +"mto:completedTime:graph" INTEGER, "mto:completedTime:localDate"
          458  +INTEGER, "mto:completedTime:localTime" INTEGER, "mto:state" INTEGER,
          459  +"mto:state:graph" INTEGER);
          460  +CREATE TABLE "mto:TransferMethod" (ID INTEGER NOT NULL PRIMARY KEY);
          461  +CREATE TABLE "mto:Transfer_mto:transferList" (ID INTEGER NOT NULL,
          462  +"mto:transferList" INTEGER NOT NULL, "mto:transferList:graph"
          463  +INTEGER);
          464  +CREATE TABLE "mto:Transfer_mto:transferPrivacyLevel" (ID INTEGER NOT
          465  +NULL, "mto:transferPrivacyLevel" TEXT NOT NULL,
          466  +"mto:transferPrivacyLevel:graph" INTEGER);
          467  +CREATE TABLE "mto:UploadTransfer" (ID INTEGER NOT NULL PRIMARY KEY);
          468  +CREATE TABLE "mto:UploadTransfer_mto:transferCategory" (ID INTEGER NOT
          469  +NULL, "mto:transferCategory" TEXT NOT NULL,
          470  +"mto:transferCategory:graph" INTEGER);
          471  +CREATE TABLE "mtp:ScanType" (ID INTEGER NOT NULL PRIMARY KEY);
          472  +CREATE TABLE "nao:Property" (ID INTEGER NOT NULL PRIMARY KEY,
          473  +"nao:propertyName" TEXT COLLATE NOCASE, "nao:propertyName:graph"
          474  +INTEGER, "nao:propertyValue" TEXT COLLATE NOCASE,
          475  +"nao:propertyValue:graph" INTEGER);
          476  +CREATE TABLE "nao:Tag" (ID INTEGER NOT NULL PRIMARY KEY,
          477  +"nao:prefLabel" TEXT COLLATE NOCASE, "nao:prefLabel:graph" INTEGER,
          478  +"nao:description" TEXT COLLATE NOCASE, "nao:description:graph"
          479  +INTEGER);
          480  +CREATE TABLE "nao:Tag_tracker:isDefaultTag" (ID INTEGER NOT NULL,
          481  +"tracker:isDefaultTag" INTEGER NOT NULL, "tracker:isDefaultTag:graph"
          482  +INTEGER);
          483  +CREATE TABLE "nao:Tag_tracker:tagRelatedTo" (ID INTEGER NOT NULL,
          484  +"tracker:tagRelatedTo" INTEGER NOT NULL, "tracker:tagRelatedTo:graph"
          485  +INTEGER);
          486  +CREATE TABLE "ncal:AccessClassification" (ID INTEGER NOT NULL PRIMARY KEY);
          487  +CREATE TABLE "ncal:Alarm" (ID INTEGER NOT NULL PRIMARY KEY,
          488  +"ncal:repeat" INTEGER, "ncal:repeat:graph" INTEGER);
          489  +CREATE TABLE "ncal:AlarmAction" (ID INTEGER NOT NULL PRIMARY KEY);
          490  +CREATE TABLE "ncal:Alarm_ncal:action" (ID INTEGER NOT NULL,
          491  +"ncal:action" INTEGER NOT NULL, "ncal:action:graph" INTEGER);
          492  +CREATE TABLE "ncal:Attachment" (ID INTEGER NOT NULL PRIMARY KEY,
          493  +"ncal:attachmentUri" INTEGER, "ncal:attachmentUri:graph" INTEGER,
          494  +"ncal:fmttype" TEXT COLLATE NOCASE, "ncal:fmttype:graph" INTEGER,
          495  +"ncal:encoding" INTEGER, "ncal:encoding:graph" INTEGER,
          496  +"ncal:attachmentContent" TEXT COLLATE NOCASE,
          497  +"ncal:attachmentContent:graph" INTEGER);
          498  +CREATE TABLE "ncal:AttachmentEncoding" (ID INTEGER NOT NULL PRIMARY KEY);
          499  +CREATE TABLE "ncal:Attendee" (ID INTEGER NOT NULL PRIMARY KEY,
          500  +"ncal:delegatedTo" INTEGER, "ncal:delegatedTo:graph" INTEGER,
          501  +"ncal:delegatedFrom" INTEGER, "ncal:delegatedFrom:graph" INTEGER,
          502  +"ncal:cutype" INTEGER, "ncal:cutype:graph" INTEGER, "ncal:member"
          503  +INTEGER, "ncal:member:graph" INTEGER, "ncal:role" INTEGER,
          504  +"ncal:role:graph" INTEGER, "ncal:rsvp" INTEGER, "ncal:rsvp:graph"
          505  +INTEGER, "ncal:partstat" INTEGER, "ncal:partstat:graph" INTEGER);
          506  +CREATE TABLE "ncal:AttendeeOrOrganizer" (ID INTEGER NOT NULL PRIMARY
          507  +KEY, "ncal:dir" INTEGER, "ncal:dir:graph" INTEGER,
          508  +"ncal:involvedContact" INTEGER, "ncal:involvedContact:graph" INTEGER,
          509  +"ncal:sentBy" INTEGER, "ncal:sentBy:graph" INTEGER);
          510  +CREATE TABLE "ncal:AttendeeRole" (ID INTEGER NOT NULL PRIMARY KEY);
          511  +CREATE TABLE "ncal:BydayRulePart" (ID INTEGER NOT NULL PRIMARY KEY);
          512  +CREATE TABLE "ncal:BydayRulePart_ncal:bydayModifier" (ID INTEGER NOT
          513  +NULL, "ncal:bydayModifier" INTEGER NOT NULL,
          514  +"ncal:bydayModifier:graph" INTEGER);
          515  +CREATE TABLE "ncal:BydayRulePart_ncal:bydayWeekday" (ID INTEGER NOT
          516  +NULL, "ncal:bydayWeekday" INTEGER NOT NULL, "ncal:bydayWeekday:graph"
          517  +INTEGER);
          518  +CREATE TABLE "ncal:Calendar" (ID INTEGER NOT NULL PRIMARY KEY,
          519  +"ncal:method" TEXT COLLATE NOCASE, "ncal:method:graph" INTEGER,
          520  +"ncal:calscale" INTEGER, "ncal:calscale:graph" INTEGER, "ncal:prodid"
          521  +TEXT COLLATE NOCASE, "ncal:prodid:graph" INTEGER, "ncal:version" TEXT
          522  +COLLATE NOCASE, "ncal:version:graph" INTEGER);
          523  +CREATE TABLE "ncal:CalendarDataObject" (ID INTEGER NOT NULL PRIMARY KEY);
          524  +CREATE TABLE "ncal:CalendarScale" (ID INTEGER NOT NULL PRIMARY KEY);
          525  +CREATE TABLE "ncal:CalendarUserType" (ID INTEGER NOT NULL PRIMARY KEY);
          526  +CREATE TABLE "ncal:Calendar_ncal:component" (ID INTEGER NOT NULL,
          527  +"ncal:component" INTEGER NOT NULL, "ncal:component:graph" INTEGER);
          528  +CREATE TABLE "ncal:Event" (ID INTEGER NOT NULL PRIMARY KEY,
          529  +"ncal:eventStatus" INTEGER, "ncal:eventStatus:graph" INTEGER,
          530  +"ncal:transp" INTEGER, "ncal:transp:graph" INTEGER);
          531  +CREATE TABLE "ncal:EventStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          532  +CREATE TABLE "ncal:Freebusy" (ID INTEGER NOT NULL PRIMARY KEY);
          533  +CREATE TABLE "ncal:FreebusyPeriod" (ID INTEGER NOT NULL PRIMARY KEY,
          534  +"ncal:fbtype" INTEGER, "ncal:fbtype:graph" INTEGER);
          535  +CREATE TABLE "ncal:FreebusyType" (ID INTEGER NOT NULL PRIMARY KEY);
          536  +CREATE TABLE "ncal:Freebusy_ncal:freebusy" (ID INTEGER NOT NULL,
          537  +"ncal:freebusy" INTEGER NOT NULL, "ncal:freebusy:graph" INTEGER);
          538  +CREATE TABLE "ncal:Journal" (ID INTEGER NOT NULL PRIMARY KEY,
          539  +"ncal:journalStatus" INTEGER, "ncal:journalStatus:graph" INTEGER);
          540  +CREATE TABLE "ncal:JournalStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          541  +CREATE TABLE "ncal:NcalDateTime" (ID INTEGER NOT NULL PRIMARY KEY,
          542  +"ncal:ncalTimezone" INTEGER, "ncal:ncalTimezone:graph" INTEGER,
          543  +"ncal:date" INTEGER, "ncal:date:graph" INTEGER, "ncal:date:localDate"
          544  +INTEGER, "ncal:date:localTime" INTEGER, "ncal:dateTime" INTEGER,
          545  +"ncal:dateTime:graph" INTEGER, "ncal:dateTime:localDate" INTEGER,
          546  +"ncal:dateTime:localTime" INTEGER);
          547  +CREATE TABLE "ncal:NcalPeriod" (ID INTEGER NOT NULL PRIMARY KEY,
          548  +"ncal:periodBegin" INTEGER, "ncal:periodBegin:graph" INTEGER,
          549  +"ncal:periodBegin:localDate" INTEGER, "ncal:periodBegin:localTime"
          550  +INTEGER, "ncal:periodDuration" INTEGER, "ncal:periodDuration:graph"
          551  +INTEGER, "ncal:periodEnd" INTEGER, "ncal:periodEnd:graph" INTEGER,
          552  +"ncal:periodEnd:localDate" INTEGER, "ncal:periodEnd:localTime"
          553  +INTEGER);
          554  +CREATE TABLE "ncal:NcalTimeEntity" (ID INTEGER NOT NULL PRIMARY KEY);
          555  +CREATE TABLE "ncal:Organizer" (ID INTEGER NOT NULL PRIMARY KEY);
          556  +CREATE TABLE "ncal:ParticipationStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          557  +CREATE TABLE "ncal:RecurrenceFrequency" (ID INTEGER NOT NULL PRIMARY KEY);
          558  +CREATE TABLE "ncal:RecurrenceIdentifier" (ID INTEGER NOT NULL PRIMARY
          559  +KEY, "ncal:range" INTEGER, "ncal:range:graph" INTEGER,
          560  +"ncal:recurrenceIdDateTime" INTEGER, "ncal:recurrenceIdDateTime:graph"
          561  +INTEGER);
          562  +CREATE TABLE "ncal:RecurrenceIdentifierRange" (ID INTEGER NOT NULL PRIMARY KEY);
          563  +CREATE TABLE "ncal:RecurrenceRule" (ID INTEGER NOT NULL PRIMARY KEY,
          564  +"ncal:until" INTEGER, "ncal:until:graph" INTEGER,
          565  +"ncal:until:localDate" INTEGER, "ncal:until:localTime" INTEGER,
          566  +"ncal:wkst" INTEGER, "ncal:wkst:graph" INTEGER, "ncal:interval"
          567  +INTEGER, "ncal:interval:graph" INTEGER, "ncal:count" INTEGER,
          568  +"ncal:count:graph" INTEGER, "ncal:freq" INTEGER, "ncal:freq:graph"
          569  +INTEGER);
          570  +CREATE TABLE "ncal:RecurrenceRule_ncal:byday" (ID INTEGER NOT NULL,
          571  +"ncal:byday" INTEGER NOT NULL, "ncal:byday:graph" INTEGER);
          572  +CREATE TABLE "ncal:RecurrenceRule_ncal:byhour" (ID INTEGER NOT NULL,
          573  +"ncal:byhour" INTEGER NOT NULL, "ncal:byhour:graph" INTEGER);
          574  +CREATE TABLE "ncal:RecurrenceRule_ncal:byminute" (ID INTEGER NOT NULL,
          575  +"ncal:byminute" INTEGER NOT NULL, "ncal:byminute:graph" INTEGER);
          576  +CREATE TABLE "ncal:RecurrenceRule_ncal:bymonth" (ID INTEGER NOT NULL,
          577  +"ncal:bymonth" INTEGER NOT NULL, "ncal:bymonth:graph" INTEGER);
          578  +CREATE TABLE "ncal:RecurrenceRule_ncal:bymonthday" (ID INTEGER NOT
          579  +NULL, "ncal:bymonthday" INTEGER NOT NULL, "ncal:bymonthday:graph"
          580  +INTEGER);
          581  +CREATE TABLE "ncal:RecurrenceRule_ncal:bysecond" (ID INTEGER NOT NULL,
          582  +"ncal:bysecond" INTEGER NOT NULL, "ncal:bysecond:graph" INTEGER);
          583  +CREATE TABLE "ncal:RecurrenceRule_ncal:bysetpos" (ID INTEGER NOT NULL,
          584  +"ncal:bysetpos" INTEGER NOT NULL, "ncal:bysetpos:graph" INTEGER);
          585  +CREATE TABLE "ncal:RecurrenceRule_ncal:byweekno" (ID INTEGER NOT NULL,
          586  +"ncal:byweekno" INTEGER NOT NULL, "ncal:byweekno:graph" INTEGER);
          587  +CREATE TABLE "ncal:RecurrenceRule_ncal:byyearday" (ID INTEGER NOT
          588  +NULL, "ncal:byyearday" INTEGER NOT NULL, "ncal:byyearday:graph"
          589  +INTEGER);
          590  +CREATE TABLE "ncal:RequestStatus" (ID INTEGER NOT NULL PRIMARY KEY,
          591  +"ncal:statusDescription" TEXT COLLATE NOCASE,
          592  +"ncal:statusDescription:graph" INTEGER, "ncal:returnStatus" TEXT
          593  +COLLATE NOCASE, "ncal:returnStatus:graph" INTEGER,
          594  +"ncal:requestStatusData" TEXT COLLATE NOCASE,
          595  +"ncal:requestStatusData:graph" INTEGER);
          596  +CREATE TABLE "ncal:TimeTransparency" (ID INTEGER NOT NULL PRIMARY KEY);
          597  +CREATE TABLE "ncal:Timezone" (ID INTEGER NOT NULL PRIMARY KEY,
          598  +"ncal:tzurl" INTEGER, "ncal:tzurl:graph" INTEGER, "ncal:standard"
          599  +INTEGER, "ncal:standard:graph" INTEGER, "ncal:daylight" INTEGER,
          600  +"ncal:daylight:graph" INTEGER, "ncal:tzid" TEXT COLLATE NOCASE,
          601  +"ncal:tzid:graph" INTEGER);
          602  +CREATE TABLE "ncal:TimezoneObservance" (ID INTEGER NOT NULL PRIMARY
          603  +KEY, "ncal:tzoffsetfrom" TEXT COLLATE NOCASE,
          604  +"ncal:tzoffsetfrom:graph" INTEGER, "ncal:tzoffsetto" TEXT COLLATE
          605  +NOCASE, "ncal:tzoffsetto:graph" INTEGER, "ncal:tzname" TEXT COLLATE
          606  +NOCASE, "ncal:tzname:graph" INTEGER);
          607  +CREATE TABLE "ncal:Todo" (ID INTEGER NOT NULL PRIMARY KEY,
          608  +"ncal:percentComplete" INTEGER, "ncal:percentComplete:graph" INTEGER,
          609  +"ncal:completed" INTEGER, "ncal:completed:graph" INTEGER,
          610  +"ncal:completed:localDate" INTEGER, "ncal:completed:localTime"
          611  +INTEGER, "ncal:todoStatus" INTEGER, "ncal:todoStatus:graph" INTEGER,
          612  +"ncal:due" INTEGER, "ncal:due:graph" INTEGER);
          613  +CREATE TABLE "ncal:TodoStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          614  +CREATE TABLE "ncal:Trigger" (ID INTEGER NOT NULL PRIMARY KEY,
          615  +"ncal:related" INTEGER, "ncal:related:graph" INTEGER,
          616  +"ncal:triggerDateTime" INTEGER, "ncal:triggerDateTime:graph" INTEGER,
          617  +"ncal:triggerDateTime:localDate" INTEGER,
          618  +"ncal:triggerDateTime:localTime" INTEGER, "ncal:triggerDuration"
          619  +INTEGER, "ncal:triggerDuration:graph" INTEGER);
          620  +CREATE TABLE "ncal:TriggerRelation" (ID INTEGER NOT NULL PRIMARY KEY);
          621  +CREATE TABLE "ncal:UnionParentClass" (ID INTEGER NOT NULL PRIMARY KEY,
          622  +"ncal:lastModified" INTEGER, "ncal:lastModified:graph" INTEGER,
          623  +"ncal:lastModified:localDate" INTEGER, "ncal:lastModified:localTime"
          624  +INTEGER, "ncal:trigger" INTEGER, "ncal:trigger:graph" INTEGER,
          625  +"ncal:created" INTEGER, "ncal:created:graph" INTEGER,
          626  +"ncal:created:localDate" INTEGER, "ncal:created:localTime" INTEGER,
          627  +"ncal:url" INTEGER, "ncal:url:graph" INTEGER, "ncal:comment" TEXT
          628  +COLLATE NOCASE, "ncal:comment:graph" INTEGER, "ncal:summaryAltRep"
          629  +INTEGER, "ncal:summaryAltRep:graph" INTEGER, "ncal:priority" INTEGER,
          630  +"ncal:priority:graph" INTEGER, "ncal:location" TEXT COLLATE NOCASE,
          631  +"ncal:location:graph" INTEGER, "ncal:uid" TEXT COLLATE NOCASE,
          632  +"ncal:uid:graph" INTEGER, "ncal:requestStatus" INTEGER,
          633  +"ncal:requestStatus:graph" INTEGER, "ncal:recurrenceId" INTEGER,
          634  +"ncal:recurrenceId:graph" INTEGER, "ncal:dtstamp" INTEGER,
          635  +"ncal:dtstamp:graph" INTEGER, "ncal:dtstamp:localDate" INTEGER,
          636  +"ncal:dtstamp:localTime" INTEGER, "ncal:class" INTEGER,
          637  +"ncal:class:graph" INTEGER, "ncal:organizer" INTEGER,
          638  +"ncal:organizer:graph" INTEGER, "ncal:dtend" INTEGER,
          639  +"ncal:dtend:graph" INTEGER, "ncal:summary" TEXT COLLATE NOCASE,
          640  +"ncal:summary:graph" INTEGER, "ncal:descriptionAltRep" INTEGER,
          641  +"ncal:descriptionAltRep:graph" INTEGER, "ncal:commentAltRep" INTEGER,
          642  +"ncal:commentAltRep:graph" INTEGER, "ncal:sequence" INTEGER,
          643  +"ncal:sequence:graph" INTEGER, "ncal:contact" TEXT COLLATE NOCASE,
          644  +"ncal:contact:graph" INTEGER, "ncal:contactAltRep" INTEGER,
          645  +"ncal:contactAltRep:graph" INTEGER, "ncal:locationAltRep" INTEGER,
          646  +"ncal:locationAltRep:graph" INTEGER, "ncal:geo" INTEGER,
          647  +"ncal:geo:graph" INTEGER, "ncal:resourcesAltRep" INTEGER,
          648  +"ncal:resourcesAltRep:graph" INTEGER, "ncal:dtstart" INTEGER,
          649  +"ncal:dtstart:graph" INTEGER, "ncal:description" TEXT COLLATE NOCASE,
          650  +"ncal:description:graph" INTEGER, "ncal:relatedToSibling" TEXT COLLATE
          651  +NOCASE, "ncal:relatedToSibling:graph" INTEGER, "ncal:duration"
          652  +INTEGER, "ncal:duration:graph" INTEGER);
          653  +CREATE TABLE "ncal:UnionParentClass_ncal:attach" (ID INTEGER NOT NULL,
          654  +"ncal:attach" INTEGER NOT NULL, "ncal:attach:graph" INTEGER);
          655  +CREATE TABLE "ncal:UnionParentClass_ncal:attendee" (ID INTEGER NOT
          656  +NULL, "ncal:attendee" INTEGER NOT NULL, "ncal:attendee:graph"
          657  +INTEGER);
          658  +CREATE TABLE "ncal:UnionParentClass_ncal:categories" (ID INTEGER NOT
          659  +NULL, "ncal:categories" TEXT NOT NULL, "ncal:categories:graph"
          660  +INTEGER);
          661  +CREATE TABLE "ncal:UnionParentClass_ncal:exdate" (ID INTEGER NOT NULL,
          662  +"ncal:exdate" INTEGER NOT NULL, "ncal:exdate:graph" INTEGER);
          663  +CREATE TABLE "ncal:UnionParentClass_ncal:exrule" (ID INTEGER NOT NULL,
          664  +"ncal:exrule" INTEGER NOT NULL, "ncal:exrule:graph" INTEGER);
          665  +CREATE TABLE "ncal:UnionParentClass_ncal:hasAlarm" (ID INTEGER NOT
          666  +NULL, "ncal:hasAlarm" INTEGER NOT NULL, "ncal:hasAlarm:graph"
          667  +INTEGER);
          668  +CREATE TABLE "ncal:UnionParentClass_ncal:ncalRelation" (ID INTEGER NOT
          669  +NULL, "ncal:ncalRelation" TEXT NOT NULL, "ncal:ncalRelation:graph"
          670  +INTEGER);
          671  +CREATE TABLE "ncal:UnionParentClass_ncal:rdate" (ID INTEGER NOT NULL,
          672  +"ncal:rdate" INTEGER NOT NULL, "ncal:rdate:graph" INTEGER);
          673  +CREATE TABLE "ncal:UnionParentClass_ncal:relatedToChild" (ID INTEGER
          674  +NOT NULL, "ncal:relatedToChild" TEXT NOT NULL,
          675  +"ncal:relatedToChild:graph" INTEGER);
          676  +CREATE TABLE "ncal:UnionParentClass_ncal:relatedToParent" (ID INTEGER
          677  +NOT NULL, "ncal:relatedToParent" TEXT NOT NULL,
          678  +"ncal:relatedToParent:graph" INTEGER);
          679  +CREATE TABLE "ncal:UnionParentClass_ncal:resources" (ID INTEGER NOT
          680  +NULL, "ncal:resources" TEXT NOT NULL, "ncal:resources:graph" INTEGER);
          681  +CREATE TABLE "ncal:UnionParentClass_ncal:rrule" (ID INTEGER NOT NULL,
          682  +"ncal:rrule" INTEGER NOT NULL, "ncal:rrule:graph" INTEGER);
          683  +CREATE TABLE "ncal:Weekday" (ID INTEGER NOT NULL PRIMARY KEY);
          684  +CREATE TABLE "nco:Affiliation" (ID INTEGER NOT NULL PRIMARY KEY,
          685  +"nco:department" TEXT COLLATE NOCASE, "nco:department:graph" INTEGER,
          686  +"nco:org" INTEGER, "nco:org:graph" INTEGER, "nco:role" TEXT COLLATE
          687  +NOCASE, "nco:role:graph" INTEGER);
          688  +CREATE TABLE "nco:Affiliation_nco:title" (ID INTEGER NOT NULL,
          689  +"nco:title" TEXT NOT NULL, "nco:title:graph" INTEGER);
          690  +CREATE TABLE "nco:AuthorizationStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          691  +CREATE TABLE "nco:BbsNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          692  +CREATE TABLE "nco:CarPhoneNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          693  +CREATE TABLE "nco:CellPhoneNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          694  +CREATE TABLE "nco:Contact" (ID INTEGER NOT NULL PRIMARY KEY,
          695  +"nco:fullname" TEXT COLLATE NOCASE, "nco:fullname:graph" INTEGER,
          696  +"nco:key" INTEGER, "nco:key:graph" INTEGER, "nco:contactUID" TEXT
          697  +COLLATE NOCASE, "nco:contactUID:graph" INTEGER, "nco:contactLocalUID"
          698  +TEXT COLLATE NOCASE, "nco:contactLocalUID:graph" INTEGER,
          699  +"nco:hasLocation" INTEGER, "nco:hasLocation:graph" INTEGER,
          700  +"nco:nickname" TEXT COLLATE NOCASE, "nco:nickname:graph" INTEGER,
          701  +"nco:representative" INTEGER, "nco:representative:graph" INTEGER,
          702  +"nco:photo" INTEGER, "nco:photo:graph" INTEGER, "nco:birthDate"
          703  +INTEGER, "nco:birthDate:graph" INTEGER, "nco:birthDate:localDate"
          704  +INTEGER, "nco:birthDate:localTime" INTEGER, "nco:sound" INTEGER,
          705  +"nco:sound:graph" INTEGER);
          706  +CREATE TABLE "nco:ContactGroup" (ID INTEGER NOT NULL PRIMARY KEY,
          707  +"nco:contactGroupName" TEXT COLLATE NOCASE,
          708  +"nco:contactGroupName:graph" INTEGER);
          709  +CREATE TABLE "nco:ContactList" (ID INTEGER NOT NULL PRIMARY KEY);
          710  +CREATE TABLE "nco:ContactListDataObject" (ID INTEGER NOT NULL PRIMARY KEY);
          711  +CREATE TABLE "nco:ContactList_nco:containsContact" (ID INTEGER NOT
          712  +NULL, "nco:containsContact" INTEGER NOT NULL,
          713  +"nco:containsContact:graph" INTEGER);
          714  +CREATE TABLE "nco:ContactMedium" (ID INTEGER NOT NULL PRIMARY KEY,
          715  +"nco:contactMediumComment" TEXT COLLATE NOCASE,
          716  +"nco:contactMediumComment:graph" INTEGER);
          717  +CREATE TABLE "nco:Contact_ncal:anniversary" (ID INTEGER NOT NULL,
          718  +"ncal:anniversary" INTEGER NOT NULL, "ncal:anniversary:graph"
          719  +INTEGER);
          720  +CREATE TABLE "nco:Contact_ncal:birthday" (ID INTEGER NOT NULL,
          721  +"ncal:birthday" INTEGER NOT NULL, "ncal:birthday:graph" INTEGER);
          722  +CREATE TABLE "nco:Contact_nco:belongsToGroup" (ID INTEGER NOT NULL,
          723  +"nco:belongsToGroup" INTEGER NOT NULL, "nco:belongsToGroup:graph"
          724  +INTEGER);
          725  +CREATE TABLE "nco:Contact_nco:note" (ID INTEGER NOT NULL, "nco:note"
          726  +TEXT NOT NULL, "nco:note:graph" INTEGER);
          727  +CREATE TABLE "nco:Contact_scal:anniversary" (ID INTEGER NOT NULL,
          728  +"scal:anniversary" INTEGER NOT NULL, "scal:anniversary:graph"
          729  +INTEGER);
          730  +CREATE TABLE "nco:Contact_scal:birthday" (ID INTEGER NOT NULL,
          731  +"scal:birthday" INTEGER NOT NULL, "scal:birthday:graph" INTEGER);
          732  +CREATE TABLE "nco:DomesticDeliveryAddress" (ID INTEGER NOT NULL PRIMARY KEY);
          733  +CREATE TABLE "nco:EmailAddress" (ID INTEGER NOT NULL PRIMARY KEY,
          734  +"nco:emailAddress" TEXT COLLATE NOCASE UNIQUE,
          735  +"nco:emailAddress:graph" INTEGER);
          736  +CREATE TABLE "nco:FaxNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          737  +CREATE TABLE "nco:Gender" (ID INTEGER NOT NULL PRIMARY KEY);
          738  +CREATE TABLE "nco:IMAccount" (ID INTEGER NOT NULL PRIMARY KEY,
          739  +"nco:imAccountAddress" INTEGER UNIQUE, "nco:imAccountAddress:graph"
          740  +INTEGER, "nco:imAccountType" TEXT COLLATE NOCASE,
          741  +"nco:imAccountType:graph" INTEGER, "nco:imDisplayName" TEXT COLLATE
          742  +NOCASE, "nco:imDisplayName:graph" INTEGER, "nco:imEnabled" INTEGER,
          743  +"nco:imEnabled:graph" INTEGER);
          744  +CREATE TABLE "nco:IMAccount_nco:hasIMContact" (ID INTEGER NOT NULL,
          745  +"nco:hasIMContact" INTEGER NOT NULL, "nco:hasIMContact:graph"
          746  +INTEGER);
          747  +CREATE TABLE "nco:IMAddress" (ID INTEGER NOT NULL PRIMARY KEY,
          748  +"nco:imID" TEXT COLLATE NOCASE, "nco:imID:graph" INTEGER,
          749  +"nco:imNickname" TEXT COLLATE NOCASE, "nco:imNickname:graph" INTEGER,
          750  +"nco:imAvatar" INTEGER, "nco:imAvatar:graph" INTEGER, "nco:imProtocol"
          751  +TEXT COLLATE NOCASE, "nco:imProtocol:graph" INTEGER,
          752  +"nco:imStatusMessage" TEXT COLLATE NOCASE,
          753  +"nco:imStatusMessage:graph" INTEGER, "nco:imPresence" INTEGER,
          754  +"nco:imPresence:graph" INTEGER, "nco:presenceLastModified" INTEGER,
          755  +"nco:presenceLastModified:graph" INTEGER,
          756  +"nco:presenceLastModified:localDate" INTEGER,
          757  +"nco:presenceLastModified:localTime" INTEGER,
          758  +"nco:imAddressAuthStatusFrom" INTEGER,
          759  +"nco:imAddressAuthStatusFrom:graph" INTEGER,
          760  +"nco:imAddressAuthStatusTo" INTEGER, "nco:imAddressAuthStatusTo:graph"
          761  +INTEGER);
          762  +CREATE TABLE "nco:IMAddress_nco:imCapability" (ID INTEGER NOT NULL,
          763  +"nco:imCapability" INTEGER NOT NULL, "nco:imCapability:graph"
          764  +INTEGER);
          765  +CREATE TABLE "nco:IMCapability" (ID INTEGER NOT NULL PRIMARY KEY);
          766  +CREATE TABLE "nco:InternationalDeliveryAddress" (ID INTEGER NOT NULL
          767  +PRIMARY KEY);
          768  +CREATE TABLE "nco:IsdnNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          769  +CREATE TABLE "nco:MessagingNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          770  +CREATE TABLE "nco:ModemNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          771  +CREATE TABLE "nco:OrganizationContact" (ID INTEGER NOT NULL PRIMARY
          772  +KEY, "nco:logo" INTEGER, "nco:logo:graph" INTEGER);
          773  +CREATE TABLE "nco:PagerNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          774  +CREATE TABLE "nco:ParcelDeliveryAddress" (ID INTEGER NOT NULL PRIMARY KEY);
          775  +CREATE TABLE "nco:PcsNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          776  +CREATE TABLE "nco:PersonContact" (ID INTEGER NOT NULL PRIMARY KEY,
          777  +"nco:nameFamily" TEXT COLLATE NOCASE, "nco:nameFamily:graph" INTEGER,
          778  +"nco:nameGiven" TEXT COLLATE NOCASE, "nco:nameGiven:graph" INTEGER,
          779  +"nco:nameAdditional" TEXT COLLATE NOCASE, "nco:nameAdditional:graph"
          780  +INTEGER, "nco:nameHonorificSuffix" TEXT COLLATE NOCASE,
          781  +"nco:nameHonorificSuffix:graph" INTEGER, "nco:nameHonorificPrefix"
          782  +TEXT COLLATE NOCASE, "nco:nameHonorificPrefix:graph" INTEGER,
          783  +"nco:hobby" TEXT COLLATE NOCASE, "nco:hobby:graph" INTEGER,
          784  +"nco:gender" INTEGER, "nco:gender:graph" INTEGER);
          785  +CREATE TABLE "nco:PersonContact_nco:hasAffiliation" (ID INTEGER NOT
          786  +NULL, "nco:hasAffiliation" INTEGER NOT NULL,
          787  +"nco:hasAffiliation:graph" INTEGER);
          788  +CREATE TABLE "nco:PhoneNumber" (ID INTEGER NOT NULL PRIMARY KEY,
          789  +"nco:phoneNumber" TEXT COLLATE NOCASE, "nco:phoneNumber:graph"
          790  +INTEGER);
          791  +CREATE TABLE "nco:PostalAddress" (ID INTEGER NOT NULL PRIMARY KEY,
          792  +"nco:region" TEXT COLLATE NOCASE, "nco:region:graph" INTEGER,
          793  +"nco:country" TEXT COLLATE NOCASE, "nco:country:graph" INTEGER,
          794  +"nco:extendedAddress" TEXT COLLATE NOCASE,
          795  +"nco:extendedAddress:graph" INTEGER, "nco:addressLocation" INTEGER,
          796  +"nco:addressLocation:graph" INTEGER, "nco:streetAddress" TEXT COLLATE
          797  +NOCASE, "nco:streetAddress:graph" INTEGER, "nco:postalcode" TEXT
          798  +COLLATE NOCASE, "nco:postalcode:graph" INTEGER, "nco:locality" TEXT
          799  +COLLATE NOCASE, "nco:locality:graph" INTEGER, "nco:county" TEXT
          800  +COLLATE NOCASE, "nco:county:graph" INTEGER, "nco:district" TEXT
          801  +COLLATE NOCASE, "nco:district:graph" INTEGER, "nco:pobox" TEXT
          802  +COLLATE NOCASE, "nco:pobox:graph" INTEGER);
          803  +CREATE TABLE "nco:PresenceStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          804  +CREATE TABLE "nco:Role" (ID INTEGER NOT NULL PRIMARY KEY, "nco:video"
          805  +INTEGER, "nco:video:graph" INTEGER);
          806  +CREATE TABLE "nco:Role_nco:blogUrl" (ID INTEGER NOT NULL,
          807  +"nco:blogUrl" INTEGER NOT NULL, "nco:blogUrl:graph" INTEGER);
          808  +CREATE TABLE "nco:Role_nco:foafUrl" (ID INTEGER NOT NULL,
          809  +"nco:foafUrl" INTEGER NOT NULL, "nco:foafUrl:graph" INTEGER);
          810  +CREATE TABLE "nco:Role_nco:hasContactMedium" (ID INTEGER NOT NULL,
          811  +"nco:hasContactMedium" INTEGER NOT NULL, "nco:hasContactMedium:graph"
          812  +INTEGER);
          813  +CREATE TABLE "nco:Role_nco:hasEmailAddress" (ID INTEGER NOT NULL,
          814  +"nco:hasEmailAddress" INTEGER NOT NULL, "nco:hasEmailAddress:graph"
          815  +INTEGER);
          816  +CREATE TABLE "nco:Role_nco:hasIMAddress" (ID INTEGER NOT NULL,
          817  +"nco:hasIMAddress" INTEGER NOT NULL, "nco:hasIMAddress:graph"
          818  +INTEGER);
          819  +CREATE TABLE "nco:Role_nco:hasPhoneNumber" (ID INTEGER NOT NULL,
          820  +"nco:hasPhoneNumber" INTEGER NOT NULL, "nco:hasPhoneNumber:graph"
          821  +INTEGER);
          822  +CREATE TABLE "nco:Role_nco:hasPostalAddress" (ID INTEGER NOT NULL,
          823  +"nco:hasPostalAddress" INTEGER NOT NULL, "nco:hasPostalAddress:graph"
          824  +INTEGER);
          825  +CREATE TABLE "nco:Role_nco:url" (ID INTEGER NOT NULL, "nco:url"
          826  +INTEGER NOT NULL, "nco:url:graph" INTEGER);
          827  +CREATE TABLE "nco:Role_nco:websiteUrl" (ID INTEGER NOT NULL,
          828  +"nco:websiteUrl" INTEGER NOT NULL, "nco:websiteUrl:graph" INTEGER);
          829  +CREATE TABLE "nco:VideoTelephoneNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          830  +CREATE TABLE "nco:VoicePhoneNumber" (ID INTEGER NOT NULL PRIMARY KEY,
          831  +"nco:voiceMail" INTEGER, "nco:voiceMail:graph" INTEGER);
          832  +CREATE TABLE "nfo:Application" (ID INTEGER NOT NULL PRIMARY KEY);
          833  +CREATE TABLE "nfo:Archive" (ID INTEGER NOT NULL PRIMARY KEY,
          834  +"nfo:uncompressedSize" INTEGER, "nfo:uncompressedSize:graph" INTEGER);
          835  +CREATE TABLE "nfo:ArchiveItem" (ID INTEGER NOT NULL PRIMARY KEY,
          836  +"nfo:isPasswordProtected" INTEGER, "nfo:isPasswordProtected:graph"
          837  +INTEGER);
          838  +CREATE TABLE "nfo:Attachment" (ID INTEGER NOT NULL PRIMARY KEY);
          839  +CREATE TABLE "nfo:Audio" (ID INTEGER NOT NULL PRIMARY KEY,
          840  +"nfo:channels" INTEGER, "nfo:channels:graph" INTEGER,
          841  +"nfo:sideChannels" INTEGER, "nfo:sideChannels:graph" INTEGER,
          842  +"nfo:lfeChannels" INTEGER, "nfo:lfeChannels:graph" INTEGER,
          843  +"nfo:sampleCount" INTEGER, "nfo:sampleCount:graph" INTEGER,
          844  +"nfo:bitsPerSample" INTEGER, "nfo:bitsPerSample:graph" INTEGER,
          845  +"nfo:frontChannels" INTEGER, "nfo:frontChannels:graph" INTEGER,
          846  +"nfo:sampleRate" REAL, "nfo:sampleRate:graph" INTEGER,
          847  +"nfo:averageAudioBitrate" REAL, "nfo:averageAudioBitrate:graph"
          848  +INTEGER, "nfo:rearChannels" INTEGER, "nfo:rearChannels:graph" INTEGER,
          849  +"nfo:gain" INTEGER, "nfo:gain:graph" INTEGER, "nfo:peakGain" INTEGER,
          850  +"nfo:peakGain:graph" INTEGER, "nfo:audioOffset" REAL,
          851  +"nfo:audioOffset:graph" INTEGER);
          852  +CREATE TABLE "nfo:Bookmark" (ID INTEGER NOT NULL PRIMARY KEY,
          853  +"nfo:bookmarks" INTEGER, "nfo:bookmarks:graph" INTEGER,
          854  +"nfo:characterPosition" INTEGER, "nfo:characterPosition:graph"
          855  +INTEGER, "nfo:pageNumber" INTEGER, "nfo:pageNumber:graph" INTEGER,
          856  +"nfo:streamPosition" INTEGER, "nfo:streamPosition:graph" INTEGER,
          857  +"nfo:streamDuration" INTEGER, "nfo:streamDuration:graph" INTEGER);
          858  +CREATE TABLE "nfo:BookmarkFolder" (ID INTEGER NOT NULL PRIMARY KEY);
          859  +CREATE TABLE "nfo:BookmarkFolder_nfo:containsBookmark" (ID INTEGER NOT
          860  +NULL, "nfo:containsBookmark" INTEGER NOT NULL,
          861  +"nfo:containsBookmark:graph" INTEGER);
          862  +CREATE TABLE "nfo:BookmarkFolder_nfo:containsBookmarkFolder" (ID
          863  +INTEGER NOT NULL, "nfo:containsBookmarkFolder" INTEGER NOT NULL,
          864  +"nfo:containsBookmarkFolder:graph" INTEGER);
          865  +CREATE TABLE "nfo:CompressionType" (ID INTEGER NOT NULL PRIMARY KEY);
          866  +CREATE TABLE "nfo:Cursor" (ID INTEGER NOT NULL PRIMARY KEY);
          867  +CREATE TABLE "nfo:DataContainer" (ID INTEGER NOT NULL PRIMARY KEY);
          868  +CREATE TABLE "nfo:DeletedResource" (ID INTEGER NOT NULL PRIMARY KEY,
          869  +"nfo:originalLocation" TEXT COLLATE NOCASE,
          870  +"nfo:originalLocation:graph" INTEGER, "nfo:deletionDate" INTEGER,
          871  +"nfo:deletionDate:graph" INTEGER, "nfo:deletionDate:localDate"
          872  +INTEGER, "nfo:deletionDate:localTime" INTEGER);
          873  +CREATE TABLE "nfo:Document" (ID INTEGER NOT NULL PRIMARY KEY,
          874  +"nfo:tableOfContents" TEXT COLLATE NOCASE,
          875  +"nfo:tableOfContents:graph" INTEGER);
          876  +CREATE TABLE "nfo:EmbeddedFileDataObject" (ID INTEGER NOT NULL PRIMARY
          877  +KEY, "nfo:encoding" TEXT COLLATE NOCASE, "nfo:encoding:graph"
          878  +INTEGER);
          879  +CREATE TABLE "nfo:Equipment" (ID INTEGER NOT NULL PRIMARY KEY,
          880  +"nfo:manufacturer" TEXT COLLATE NOCASE, "nfo:manufacturer:graph"
          881  +INTEGER, "nfo:model" TEXT COLLATE NOCASE, "nfo:model:graph" INTEGER,
          882  +"nfo:equipmentSoftware" TEXT COLLATE NOCASE,
          883  +"nfo:equipmentSoftware:graph" INTEGER);
          884  +CREATE TABLE "nfo:Executable" (ID INTEGER NOT NULL PRIMARY KEY);
          885  +CREATE TABLE "nfo:FileDataObject" (ID INTEGER NOT NULL PRIMARY KEY,
          886  +"nfo:fileLastAccessed" INTEGER, "nfo:fileLastAccessed:graph" INTEGER,
          887  +"nfo:fileLastAccessed:localDate" INTEGER,
          888  +"nfo:fileLastAccessed:localTime" INTEGER, "nfo:fileCreated" INTEGER,
          889  +"nfo:fileCreated:graph" INTEGER, "nfo:fileCreated:localDate" INTEGER,
          890  +"nfo:fileCreated:localTime" INTEGER, "nfo:fileSize" INTEGER,
          891  +"nfo:fileSize:graph" INTEGER, "nfo:permissions" TEXT COLLATE NOCASE,
          892  +"nfo:permissions:graph" INTEGER, "nfo:fileName" TEXT COLLATE NOCASE,
          893  +"nfo:fileName:graph" INTEGER, "nfo:hasHash" INTEGER,
          894  +"nfo:hasHash:graph" INTEGER, "nfo:fileOwner" INTEGER,
          895  +"nfo:fileOwner:graph" INTEGER, "nfo:fileLastModified" INTEGER,
          896  +"nfo:fileLastModified:graph" INTEGER, "nfo:fileLastModified:localDate"
          897  +INTEGER, "nfo:fileLastModified:localTime" INTEGER);
          898  +CREATE TABLE "nfo:FileHash" (ID INTEGER NOT NULL PRIMARY KEY,
          899  +"nfo:hashValue" TEXT COLLATE NOCASE, "nfo:hashValue:graph" INTEGER,
          900  +"nfo:hashAlgorithm" TEXT COLLATE NOCASE, "nfo:hashAlgorithm:graph"
          901  +INTEGER);
          902  +CREATE TABLE "nfo:Filesystem" (ID INTEGER NOT NULL PRIMARY KEY);
          903  +CREATE TABLE "nfo:FilesystemImage" (ID INTEGER NOT NULL PRIMARY KEY);
          904  +CREATE TABLE "nfo:Folder" (ID INTEGER NOT NULL PRIMARY KEY);
          905  +CREATE TABLE "nfo:Font" (ID INTEGER NOT NULL PRIMARY KEY,
          906  +"nfo:fontFamily" TEXT COLLATE NOCASE, "nfo:fontFamily:graph" INTEGER,
          907  +"nfo:foundry" INTEGER, "nfo:foundry:graph" INTEGER);
          908  +CREATE TABLE "nfo:HardDiskPartition" (ID INTEGER NOT NULL PRIMARY KEY);
          909  +CREATE TABLE "nfo:HelpDocument" (ID INTEGER NOT NULL PRIMARY KEY);
          910  +CREATE TABLE "nfo:HtmlDocument" (ID INTEGER NOT NULL PRIMARY KEY);
          911  +CREATE TABLE "nfo:Icon" (ID INTEGER NOT NULL PRIMARY KEY);
          912  +CREATE TABLE "nfo:Image" (ID INTEGER NOT NULL PRIMARY KEY,
          913  +"nfo:verticalResolution" INTEGER, "nfo:verticalResolution:graph"
          914  +INTEGER, "nfo:horizontalResolution" INTEGER,
          915  +"nfo:horizontalResolution:graph" INTEGER, "nfo:orientation" INTEGER,
          916  +"nfo:orientation:graph" INTEGER);
          917  +CREATE TABLE "nfo:Image_nfo:depicts" (ID INTEGER NOT NULL,
          918  +"nfo:depicts" INTEGER NOT NULL, "nfo:depicts:graph" INTEGER);
          919  +CREATE TABLE "nfo:Image_nfo:hasRegionOfInterest" (ID INTEGER NOT NULL,
          920  +"nfo:hasRegionOfInterest" INTEGER NOT NULL,
          921  +"nfo:hasRegionOfInterest:graph" INTEGER);
          922  +CREATE TABLE "nfo:Media" (ID INTEGER NOT NULL PRIMARY KEY, "nfo:count"
          923  +INTEGER, "nfo:count:graph" INTEGER, "nfo:duration" INTEGER,
          924  +"nfo:duration:graph" INTEGER, "nfo:compressionType" INTEGER,
          925  +"nfo:compressionType:graph" INTEGER, "nfo:hasMediaStream" INTEGER,
          926  +"nfo:hasMediaStream:graph" INTEGER, "nfo:bitDepth" INTEGER,
          927  +"nfo:bitDepth:graph" INTEGER, "nfo:codec" TEXT COLLATE NOCASE,
          928  +"nfo:codec:graph" INTEGER, "nfo:encodedBy" TEXT COLLATE NOCASE,
          929  +"nfo:encodedBy:graph" INTEGER, "nfo:bitrateType" TEXT COLLATE NOCASE,
          930  +"nfo:bitrateType:graph" INTEGER, "nfo:averageBitrate" REAL,
          931  +"nfo:averageBitrate:graph" INTEGER, "nfo:genre" TEXT COLLATE NOCASE,
          932  +"nfo:genre:graph" INTEGER, "nfo:equipment" INTEGER,
          933  +"nfo:equipment:graph" INTEGER, "nfo:lastPlayedPosition" INTEGER,
          934  +"nfo:lastPlayedPosition:graph" INTEGER, "nmm:genre" TEXT COLLATE
          935  +NOCASE, "nmm:genre:graph" INTEGER, "nmm:skipCounter" INTEGER,
          936  +"nmm:skipCounter:graph" INTEGER, "nmm:dlnaProfile" TEXT COLLATE
          937  +NOCASE, "nmm:dlnaProfile:graph" INTEGER, "nmm:dlnaMime" TEXT COLLATE
          938  +NOCASE, "nmm:dlnaMime:graph" INTEGER, "nmm:uPnPShared" INTEGER,
          939  +"nmm:uPnPShared:graph" INTEGER, "mtp:credits" TEXT COLLATE NOCASE,
          940  +"mtp:credits:graph" INTEGER, "mtp:creator" TEXT COLLATE NOCASE,
          941  +"mtp:creator:graph" INTEGER);
          942  +CREATE TABLE "nfo:MediaFileListEntry" (ID INTEGER NOT NULL PRIMARY
          943  +KEY, "nfo:listPosition" REAL, "nfo:listPosition:graph" INTEGER,
          944  +"nfo:entryUrl" TEXT COLLATE NOCASE, "nfo:entryUrl:graph" INTEGER);
          945  +CREATE TABLE "nfo:MediaList" (ID INTEGER NOT NULL PRIMARY KEY,
          946  +"nfo:entryCounter" INTEGER, "nfo:entryCounter:graph" INTEGER,
          947  +"nfo:listDuration" INTEGER, "nfo:listDuration:graph" INTEGER);
          948  +CREATE TABLE "nfo:MediaList_nfo:hasMediaFileListEntry" (ID INTEGER NOT
          949  +NULL, "nfo:hasMediaFileListEntry" INTEGER NOT NULL,
          950  +"nfo:hasMediaFileListEntry:graph" INTEGER);
          951  +CREATE TABLE "nfo:MediaList_nfo:mediaListEntry" (ID INTEGER NOT NULL,
          952  +"nfo:mediaListEntry" INTEGER NOT NULL, "nfo:mediaListEntry:graph"
          953  +INTEGER);
          954  +CREATE TABLE "nfo:MediaStream" (ID INTEGER NOT NULL PRIMARY KEY);
          955  +CREATE TABLE "nfo:Media_mtp:hidden" (ID INTEGER NOT NULL, "mtp:hidden"
          956  +INTEGER NOT NULL, "mtp:hidden:graph" INTEGER);
          957  +CREATE TABLE "nfo:Media_nmm:alternativeMedia" (ID INTEGER NOT NULL,
          958  +"nmm:alternativeMedia" INTEGER NOT NULL, "nmm:alternativeMedia:graph"
          959  +INTEGER);
          960  +CREATE TABLE "nfo:MindMap" (ID INTEGER NOT NULL PRIMARY KEY);
          961  +CREATE TABLE "nfo:Note" (ID INTEGER NOT NULL PRIMARY KEY);
          962  +CREATE TABLE "nfo:OperatingSystem" (ID INTEGER NOT NULL PRIMARY KEY);
          963  +CREATE TABLE "nfo:Orientation" (ID INTEGER NOT NULL PRIMARY KEY);
          964  +CREATE TABLE "nfo:PaginatedTextDocument" (ID INTEGER NOT NULL PRIMARY
          965  +KEY, "nfo:pageCount" INTEGER, "nfo:pageCount:graph" INTEGER);
          966  +CREATE TABLE "nfo:PlainTextDocument" (ID INTEGER NOT NULL PRIMARY KEY);
          967  +CREATE TABLE "nfo:Presentation" (ID INTEGER NOT NULL PRIMARY KEY);
          968  +CREATE TABLE "nfo:RasterImage" (ID INTEGER NOT NULL PRIMARY KEY);
          969  +CREATE TABLE "nfo:RegionOfInterest" (ID INTEGER NOT NULL PRIMARY KEY,
          970  +"nfo:regionOfInterestX" REAL, "nfo:regionOfInterestX:graph" INTEGER,
          971  +"nfo:regionOfInterestY" REAL, "nfo:regionOfInterestY:graph" INTEGER,
          972  +"nfo:regionOfInterestWidth" REAL, "nfo:regionOfInterestWidth:graph"
          973  +INTEGER, "nfo:regionOfInterestHeight" REAL,
          974  +"nfo:regionOfInterestHeight:graph" INTEGER, "nfo:regionOfInterestType"
          975  +INTEGER, "nfo:regionOfInterestType:graph" INTEGER, "nfo:roiRefersTo"
          976  +INTEGER, "nfo:roiRefersTo:graph" INTEGER);
          977  +CREATE TABLE "nfo:RegionOfInterestContent" (ID INTEGER NOT NULL PRIMARY KEY);
          978  +CREATE TABLE "nfo:RemoteDataObject" (ID INTEGER NOT NULL PRIMARY KEY);
          979  +CREATE TABLE "nfo:RemotePortAddress" (ID INTEGER NOT NULL PRIMARY KEY);
          980  +CREATE TABLE "nfo:Software" (ID INTEGER NOT NULL PRIMARY KEY,
          981  +"nfo:conflicts" INTEGER, "nfo:conflicts:graph" INTEGER,
          982  +"nfo:supercedes" INTEGER, "nfo:supercedes:graph" INTEGER,
          983  +"nfo:softwareIcon" INTEGER, "nfo:softwareIcon:graph" INTEGER,
          984  +"nfo:softwareCmdLine" TEXT COLLATE NOCASE,
          985  +"nfo:softwareCmdLine:graph" INTEGER);
          986  +CREATE TABLE "nfo:SoftwareApplication" (ID INTEGER NOT NULL PRIMARY KEY);
          987  +CREATE TABLE "nfo:SoftwareCategory" (ID INTEGER NOT NULL PRIMARY KEY,
          988  +"nfo:softwareCategoryIcon" INTEGER, "nfo:softwareCategoryIcon:graph"
          989  +INTEGER);
          990  +CREATE TABLE "nfo:SoftwareItem" (ID INTEGER NOT NULL PRIMARY KEY);
          991  +CREATE TABLE "nfo:SoftwareService" (ID INTEGER NOT NULL PRIMARY KEY);
          992  +CREATE TABLE "nfo:SourceCode" (ID INTEGER NOT NULL PRIMARY KEY,
          993  +"nfo:commentCharacterCount" INTEGER, "nfo:commentCharacterCount:graph"
          994  +INTEGER, "nfo:programmingLanguage" TEXT COLLATE NOCASE,
          995  +"nfo:programmingLanguage:graph" INTEGER, "nfo:definesClass" TEXT
          996  +COLLATE NOCASE, "nfo:definesClass:graph" INTEGER,
          997  +"nfo:definesFunction" TEXT COLLATE NOCASE,
          998  +"nfo:definesFunction:graph" INTEGER, "nfo:definesGlobalVariable" TEXT
          999  +COLLATE NOCASE, "nfo:definesGlobalVariable:graph" INTEGER);
         1000  +CREATE TABLE "nfo:Spreadsheet" (ID INTEGER NOT NULL PRIMARY KEY);
         1001  +CREATE TABLE "nfo:TextDocument" (ID INTEGER NOT NULL PRIMARY KEY,
         1002  +"nfo:wordCount" INTEGER, "nfo:wordCount:graph" INTEGER,
         1003  +"nfo:lineCount" INTEGER, "nfo:lineCount:graph" INTEGER,
         1004  +"nfo:characterCount" INTEGER, "nfo:characterCount:graph" INTEGER);
         1005  +CREATE TABLE "nfo:Trash" (ID INTEGER NOT NULL PRIMARY KEY);
         1006  +CREATE TABLE "nfo:VectorImage" (ID INTEGER NOT NULL PRIMARY KEY);
         1007  +CREATE TABLE "nfo:Video" (ID INTEGER NOT NULL PRIMARY KEY,
         1008  +"nfo:frameRate" REAL, "nfo:frameRate:graph" INTEGER, "nfo:frameCount"
         1009  +INTEGER, "nfo:frameCount:graph" INTEGER, "nfo:averageVideoBitrate"
         1010  +REAL, "nfo:averageVideoBitrate:graph" INTEGER);
         1011  +CREATE TABLE "nfo:Visual" (ID INTEGER NOT NULL PRIMARY KEY,
         1012  +"nie:contentCreated" INTEGER, "nie:contentCreated:graph" INTEGER,
         1013  +"nie:contentCreated:localDate" INTEGER, "nie:contentCreated:localTime"
         1014  +INTEGER, "nfo:aspectRatio" REAL, "nfo:aspectRatio:graph" INTEGER,
         1015  +"nfo:heading" REAL, "nfo:heading:graph" INTEGER, "nfo:tilt" REAL,
         1016  +"nfo:tilt:graph" INTEGER, "nfo:interlaceMode" INTEGER,
         1017  +"nfo:interlaceMode:graph" INTEGER, "nfo:height" INTEGER,
         1018  +"nfo:height:graph" INTEGER, "nfo:width" INTEGER, "nfo:width:graph"
         1019  +INTEGER, "nfo:colorDepth" INTEGER, "nfo:colorDepth:graph" INTEGER);
         1020  +CREATE TABLE "nfo:WebHistory" (ID INTEGER NOT NULL PRIMARY KEY,
         1021  +"nfo:domain" TEXT COLLATE NOCASE, "nfo:domain:graph" INTEGER,
         1022  +"nfo:uri" TEXT COLLATE NOCASE, "nfo:uri:graph" INTEGER);
         1023  +CREATE TABLE "nfo:Website" (ID INTEGER NOT NULL PRIMARY KEY);
         1024  +CREATE TABLE "nid3:ID3Audio" (ID INTEGER NOT NULL PRIMARY KEY,
         1025  +"nid3:title" TEXT COLLATE NOCASE, "nid3:title:graph" INTEGER,
         1026  +"nid3:albumTitle" TEXT COLLATE NOCASE, "nid3:albumTitle:graph"
         1027  +INTEGER, "nid3:contentType" TEXT COLLATE NOCASE,
         1028  +"nid3:contentType:graph" INTEGER, "nid3:length" INTEGER,
         1029  +"nid3:length:graph" INTEGER, "nid3:recordingYear" INTEGER,
         1030  +"nid3:recordingYear:graph" INTEGER, "nid3:trackNumber" TEXT COLLATE
         1031  +NOCASE, "nid3:trackNumber:graph" INTEGER, "nid3:partOfSet" TEXT
         1032  +COLLATE NOCASE, "nid3:partOfSet:graph" INTEGER, "nid3:comments" TEXT
         1033  +COLLATE NOCASE, "nid3:comments:graph" INTEGER);
         1034  +CREATE TABLE "nid3:ID3Audio_nid3:leadArtist" (ID INTEGER NOT NULL,
         1035  +"nid3:leadArtist" INTEGER NOT NULL, "nid3:leadArtist:graph" INTEGER);
         1036  +CREATE TABLE "nie:DataObject" (ID INTEGER NOT NULL PRIMARY KEY,
         1037  +"nie:url" TEXT COLLATE NOCASE UNIQUE, "nie:url:graph" INTEGER,
         1038  +"nie:byteSize" INTEGER, "nie:byteSize:graph" INTEGER,
         1039  +"nie:interpretedAs" INTEGER, "nie:interpretedAs:graph" INTEGER,
         1040  +"nie:lastRefreshed" INTEGER, "nie:lastRefreshed:graph" INTEGER,
         1041  +"nie:lastRefreshed:localDate" INTEGER, "nie:lastRefreshed:localTime"
         1042  +INTEGER, "nie:created" INTEGER, "nie:created:graph" INTEGER,
         1043  +"nie:created:localDate" INTEGER, "nie:created:localTime" INTEGER,
         1044  +"nfo:belongsToContainer" INTEGER, "nfo:belongsToContainer:graph"
         1045  +INTEGER, "tracker:available" INTEGER, "tracker:available:graph"
         1046  +INTEGER);
         1047  +CREATE TABLE "nie:DataObject_nie:dataSource" (ID INTEGER NOT NULL,
         1048  +"nie:dataSource" INTEGER NOT NULL, "nie:dataSource:graph" INTEGER);
         1049  +CREATE TABLE "nie:DataObject_nie:isPartOf" (ID INTEGER NOT NULL,
         1050  +"nie:isPartOf" INTEGER NOT NULL, "nie:isPartOf:graph" INTEGER);
         1051  +CREATE TABLE "nie:DataSource" (ID INTEGER NOT NULL PRIMARY KEY);
         1052  +CREATE TABLE "nie:InformationElement" (ID INTEGER NOT NULL PRIMARY
         1053  +KEY, "nie:title" TEXT COLLATE NOCASE, "nie:title:graph" INTEGER,
         1054  +"nie:contentLastModified" INTEGER, "nie:contentLastModified:graph"
         1055  +INTEGER, "nie:contentLastModified:localDate" INTEGER,
         1056  +"nie:contentLastModified:localTime" INTEGER, "nie:subject" TEXT
         1057  +COLLATE NOCASE, "nie:subject:graph" INTEGER, "nie:mimeType" TEXT
         1058  +COLLATE NOCASE, "nie:mimeType:graph" INTEGER, "nie:language" TEXT
         1059  +COLLATE NOCASE, "nie:language:graph" INTEGER, "nie:plainTextContent"
         1060  +TEXT COLLATE NOCASE, "nie:plainTextContent:graph" INTEGER,
         1061  +"nie:legal" TEXT COLLATE NOCASE, "nie:legal:graph" INTEGER,
         1062  +"nie:generator" TEXT COLLATE NOCASE, "nie:generator:graph" INTEGER,
         1063  +"nie:description" TEXT COLLATE NOCASE, "nie:description:graph"
         1064  +INTEGER, "nie:disclaimer" TEXT COLLATE NOCASE, "nie:disclaimer:graph"
         1065  +INTEGER, "nie:depends" INTEGER, "nie:depends:graph" INTEGER,
         1066  +"nie:links" INTEGER, "nie:links:graph" INTEGER, "nie:copyright" TEXT
         1067  +COLLATE NOCASE, "nie:copyright:graph" INTEGER, "nie:comment" TEXT
         1068  +COLLATE NOCASE, "nie:comment:graph" INTEGER, "nie:isStoredAs"
         1069  +INTEGER, "nie:isStoredAs:graph" INTEGER, "nie:version" TEXT COLLATE
         1070  +NOCASE, "nie:version:graph" INTEGER, "nie:contentCreated" INTEGER,
         1071  +"nie:contentCreated:graph" INTEGER, "nie:contentCreated:localDate"
         1072  +INTEGER, "nie:contentCreated:localTime" INTEGER, "nie:contentAccessed"
         1073  +INTEGER, "nie:contentAccessed:graph" INTEGER,
         1074  +"nie:contentAccessed:localDate" INTEGER,
         1075  +"nie:contentAccessed:localTime" INTEGER, "nie:license" TEXT COLLATE
         1076  +NOCASE, "nie:license:graph" INTEGER, "nie:identifier" TEXT COLLATE
         1077  +NOCASE, "nie:identifier:graph" INTEGER, "nie:licenseType" TEXT
         1078  +COLLATE NOCASE, "nie:licenseType:graph" INTEGER, "nie:characterSet"
         1079  +TEXT COLLATE NOCASE, "nie:characterSet:graph" INTEGER,
         1080  +"nie:contentSize" INTEGER, "nie:contentSize:graph" INTEGER,
         1081  +"nie:rootElementOf" INTEGER, "nie:rootElementOf:graph" INTEGER,
         1082  +"nie:usageCounter" INTEGER, "nie:usageCounter:graph" INTEGER,
         1083  +"nco:publisher" INTEGER, "nco:publisher:graph" INTEGER,
         1084  +"nfo:isContentEncrypted" INTEGER, "nfo:isContentEncrypted:graph"
         1085  +INTEGER, "slo:location" INTEGER, "slo:location:graph" INTEGER,
         1086  +"nfo:isBootable" INTEGER, "nfo:isBootable:graph" INTEGER, "osinfo:id"
         1087  +TEXT COLLATE NOCASE, "osinfo:id:graph" INTEGER, "osinfo:mediaId" TEXT
         1088  +COLLATE NOCASE, "osinfo:mediaId:graph" INTEGER);
         1089  +CREATE TABLE "nie:InformationElement_mlo:location" (ID INTEGER NOT
         1090  +NULL, "mlo:location" INTEGER NOT NULL, "mlo:location:graph" INTEGER);
         1091  +CREATE TABLE "nie:InformationElement_nao:hasProperty" (ID INTEGER NOT
         1092  +NULL, "nao:hasProperty" INTEGER NOT NULL, "nao:hasProperty:graph"
         1093  +INTEGER);
         1094  +CREATE TABLE "nie:InformationElement_nco:contributor" (ID INTEGER NOT
         1095  +NULL, "nco:contributor" INTEGER NOT NULL, "nco:contributor:graph"
         1096  +INTEGER);
         1097  +CREATE TABLE "nie:InformationElement_nco:creator" (ID INTEGER NOT
         1098  +NULL, "nco:creator" INTEGER NOT NULL, "nco:creator:graph" INTEGER);
         1099  +CREATE TABLE "nie:InformationElement_nie:hasLogicalPart" (ID INTEGER
         1100  +NOT NULL, "nie:hasLogicalPart" INTEGER NOT NULL,
         1101  +"nie:hasLogicalPart:graph" INTEGER);
         1102  +CREATE TABLE "nie:InformationElement_nie:hasPart" (ID INTEGER NOT
         1103  +NULL, "nie:hasPart" INTEGER NOT NULL, "nie:hasPart:graph" INTEGER);
         1104  +CREATE TABLE "nie:InformationElement_nie:informationElementDate" (ID
         1105  +INTEGER NOT NULL, "nie:informationElementDate" INTEGER NOT NULL,
         1106  +"nie:informationElementDate:graph" INTEGER,
         1107  +"nie:informationElementDate:localDate" INTEGER NOT NULL,
         1108  +"nie:informationElementDate:localTime" INTEGER NOT NULL);
         1109  +CREATE TABLE "nie:InformationElement_nie:isLogicalPartOf" (ID INTEGER
         1110  +NOT NULL, "nie:isLogicalPartOf" INTEGER NOT NULL,
         1111  +"nie:isLogicalPartOf:graph" INTEGER);
         1112  +CREATE TABLE "nie:InformationElement_nie:keyword" (ID INTEGER NOT
         1113  +NULL, "nie:keyword" TEXT NOT NULL, "nie:keyword:graph" INTEGER);
         1114  +CREATE TABLE "nie:InformationElement_nie:relatedTo" (ID INTEGER NOT
         1115  +NULL, "nie:relatedTo" INTEGER NOT NULL, "nie:relatedTo:graph"
         1116  +INTEGER);
         1117  +CREATE TABLE "nmm:AnalogRadio" (ID INTEGER NOT NULL PRIMARY KEY,
         1118  +"nmm:modulation" INTEGER, "nmm:modulation:graph" INTEGER,
         1119  +"nmm:frequency" INTEGER, "nmm:frequency:graph" INTEGER);
         1120  +CREATE TABLE "nmm:Artist" (ID INTEGER NOT NULL PRIMARY KEY,
         1121  +"nmm:artistName" TEXT COLLATE NOCASE, "nmm:artistName:graph"
         1122  +INTEGER);
         1123  +CREATE TABLE "nmm:DigitalRadio" (ID INTEGER NOT NULL PRIMARY KEY,
         1124  +"nmm:streamingBitrate" INTEGER, "nmm:streamingBitrate:graph" INTEGER,
         1125  +"nmm:encoding" TEXT COLLATE NOCASE, "nmm:encoding:graph" INTEGER,
         1126  +"nmm:protocol" TEXT COLLATE NOCASE, "nmm:protocol:graph" INTEGER);
         1127  +CREATE TABLE "nmm:Flash" (ID INTEGER NOT NULL PRIMARY KEY);
         1128  +CREATE TABLE "nmm:ImageList" (ID INTEGER NOT NULL PRIMARY KEY);
         1129  +CREATE TABLE "nmm:MeteringMode" (ID INTEGER NOT NULL PRIMARY KEY);
         1130  +CREATE TABLE "nmm:MusicAlbum" (ID INTEGER NOT NULL PRIMARY KEY,
         1131  +"nie:title" TEXT COLLATE NOCASE, "nie:title:graph" INTEGER,
         1132  +"nmm:albumTrackCount" INTEGER, "nmm:albumTrackCount:graph" INTEGER,
         1133  +"nmm:albumTitle" TEXT COLLATE NOCASE, "nmm:albumTitle:graph" INTEGER,
         1134  +"nmm:albumDuration" INTEGER, "nmm:albumDuration:graph" INTEGER,
         1135  +"nmm:albumGain" INTEGER, "nmm:albumGain:graph" INTEGER,
         1136  +"nmm:albumPeakGain" INTEGER, "nmm:albumPeakGain:graph" INTEGER);
         1137  +CREATE TABLE "nmm:MusicAlbumDisc" (ID INTEGER NOT NULL PRIMARY KEY,
         1138  +"nmm:albumDiscAlbum" INTEGER, "nmm:albumDiscAlbum:graph" INTEGER,
         1139  +"nmm:musicCDIdentifier" TEXT COLLATE NOCASE,
         1140  +"nmm:musicCDIdentifier:graph" INTEGER, "nmm:setNumber" INTEGER,
         1141  +"nmm:setNumber:graph" INTEGER);
         1142  +CREATE TABLE "nmm:MusicAlbum_nmm:albumArtist" (ID INTEGER NOT NULL,
         1143  +"nmm:albumArtist" INTEGER NOT NULL, "nmm:albumArtist:graph" INTEGER);
         1144  +CREATE TABLE "nmm:MusicPiece" (ID INTEGER NOT NULL PRIMARY KEY,
         1145  +"nie:title" TEXT COLLATE NOCASE, "nie:title:graph" INTEGER,
         1146  +"nmm:musicAlbum" INTEGER, "nmm:musicAlbum:graph" INTEGER,
         1147  +"nmm:musicAlbumDisc" INTEGER, "nmm:musicAlbumDisc:graph" INTEGER,
         1148  +"nmm:beatsPerMinute" INTEGER, "nmm:beatsPerMinute:graph" INTEGER,
         1149  +"nmm:performer" INTEGER, "nmm:performer:graph" INTEGER, "nmm:composer"
         1150  +INTEGER, "nmm:composer:graph" INTEGER, "nmm:lyricist" INTEGER,
         1151  +"nmm:lyricist:graph" INTEGER, "nmm:trackNumber" INTEGER,
         1152  +"nmm:trackNumber:graph" INTEGER,
         1153  +"nmm:internationalStandardRecordingCode" TEXT COLLATE NOCASE,
         1154  +"nmm:internationalStandardRecordingCode:graph" INTEGER);
         1155  +CREATE TABLE "nmm:MusicPiece_nmm:lyrics" (ID INTEGER NOT NULL,
         1156  +"nmm:lyrics" INTEGER NOT NULL, "nmm:lyrics:graph" INTEGER);
         1157  +CREATE TABLE "nmm:Photo" (ID INTEGER NOT NULL PRIMARY KEY,
         1158  +"nmm:exposureTime" REAL, "nmm:exposureTime:graph" INTEGER, "nmm:flash"
         1159  +INTEGER, "nmm:flash:graph" INTEGER, "nmm:fnumber" REAL,
         1160  +"nmm:fnumber:graph" INTEGER, "nmm:focalLength" REAL,
         1161  +"nmm:focalLength:graph" INTEGER, "nmm:isoSpeed" REAL,
         1162  +"nmm:isoSpeed:graph" INTEGER, "nmm:meteringMode" INTEGER,
         1163  +"nmm:meteringMode:graph" INTEGER, "nmm:whiteBalance" INTEGER,
         1164  +"nmm:whiteBalance:graph" INTEGER, "nmm:isCropped" INTEGER,
         1165  +"nmm:isCropped:graph" INTEGER, "nmm:isColorCorrected" INTEGER,
         1166  +"nmm:isColorCorrected:graph" INTEGER);
         1167  +CREATE TABLE "nmm:Playlist" (ID INTEGER NOT NULL PRIMARY KEY);
         1168  +CREATE TABLE "nmm:RadioModulation" (ID INTEGER NOT NULL PRIMARY KEY);
         1169  +CREATE TABLE "nmm:RadioStation" (ID INTEGER NOT NULL PRIMARY KEY,
         1170  +"nmm:radioIcon" INTEGER, "nmm:radioIcon:graph" INTEGER, "nmm:radioPTY"
         1171  +INTEGER, "nmm:radioPTY:graph" INTEGER);
         1172  +CREATE TABLE "nmm:RadioStation_nmm:carrier" (ID INTEGER NOT NULL,
         1173  +"nmm:carrier" INTEGER NOT NULL, "nmm:carrier:graph" INTEGER);
         1174  +CREATE TABLE "nmm:SynchronizedText" (ID INTEGER NOT NULL PRIMARY KEY,
         1175  +"nmm:isForHearingImpaired" INTEGER, "nmm:isForHearingImpaired:graph"
         1176  +INTEGER);
         1177  +CREATE TABLE "nmm:Video" (ID INTEGER NOT NULL PRIMARY KEY,
         1178  +"nmm:videoAlbum" INTEGER, "nmm:videoAlbum:graph" INTEGER,
         1179  +"nmm:isSeries" INTEGER, "nmm:isSeries:graph" INTEGER, "nmm:season"
         1180  +INTEGER, "nmm:season:graph" INTEGER, "nmm:episodeNumber" INTEGER,
         1181  +"nmm:episodeNumber:graph" INTEGER, "nmm:runTime" INTEGER,
         1182  +"nmm:runTime:graph" INTEGER, "nmm:synopsis" TEXT COLLATE NOCASE,
         1183  +"nmm:synopsis:graph" INTEGER, "nmm:MPAARating" TEXT COLLATE NOCASE,
         1184  +"nmm:MPAARating:graph" INTEGER, "nmm:category" TEXT COLLATE NOCASE,
         1185  +"nmm:category:graph" INTEGER, "nmm:producedBy" INTEGER,
         1186  +"nmm:producedBy:graph" INTEGER, "nmm:hasSubtitle" INTEGER,
         1187  +"nmm:hasSubtitle:graph" INTEGER, "nmm:isContentEncrypted" INTEGER,
         1188  +"nmm:isContentEncrypted:graph" INTEGER, "mtp:fourCC" TEXT COLLATE
         1189  +NOCASE, "mtp:fourCC:graph" INTEGER, "mtp:waveformat" TEXT COLLATE
         1190  +NOCASE, "mtp:waveformat:graph" INTEGER);
         1191  +CREATE TABLE "nmm:Video_mtp:scantype" (ID INTEGER NOT NULL,
         1192  +"mtp:scantype" INTEGER NOT NULL, "mtp:scantype:graph" INTEGER);
         1193  +CREATE TABLE "nmm:Video_nmm:director" (ID INTEGER NOT NULL,
         1194  +"nmm:director" INTEGER NOT NULL, "nmm:director:graph" INTEGER);
         1195  +CREATE TABLE "nmm:Video_nmm:leadActor" (ID INTEGER NOT NULL,
         1196  +"nmm:leadActor" INTEGER NOT NULL, "nmm:leadActor:graph" INTEGER);
         1197  +CREATE TABLE "nmm:Video_nmm:subtitle" (ID INTEGER NOT NULL,
         1198  +"nmm:subtitle" INTEGER NOT NULL, "nmm:subtitle:graph" INTEGER);
         1199  +CREATE TABLE "nmm:WhiteBalance" (ID INTEGER NOT NULL PRIMARY KEY);
         1200  +CREATE TABLE "nmo:Attachment" (ID INTEGER NOT NULL PRIMARY KEY);
         1201  +CREATE TABLE "nmo:Call" (ID INTEGER NOT NULL PRIMARY KEY,
         1202  +"nmo:sentDate" INTEGER, "nmo:sentDate:graph" INTEGER,
         1203  +"nmo:sentDate:localDate" INTEGER, "nmo:sentDate:localTime" INTEGER,
         1204  +"nmo:duration" INTEGER, "nmo:duration:graph" INTEGER);
         1205  +CREATE TABLE "nmo:CommunicationChannel" (ID INTEGER NOT NULL PRIMARY
         1206  +KEY, "nmo:lastMessageDate" INTEGER, "nmo:lastMessageDate:graph"
         1207  +INTEGER, "nmo:lastMessageDate:localDate" INTEGER,
         1208  +"nmo:lastMessageDate:localTime" INTEGER,
         1209  +"nmo:lastSuccessfulMessageDate" INTEGER,
         1210  +"nmo:lastSuccessfulMessageDate:graph" INTEGER,
         1211  +"nmo:lastSuccessfulMessageDate:localDate" INTEGER,
         1212  +"nmo:lastSuccessfulMessageDate:localTime" INTEGER);
         1213  +CREATE TABLE "nmo:CommunicationChannel_nmo:hasParticipant" (ID INTEGER
         1214  +NOT NULL, "nmo:hasParticipant" INTEGER NOT NULL,
         1215  +"nmo:hasParticipant:graph" INTEGER);
         1216  +CREATE TABLE "nmo:Conversation" (ID INTEGER NOT NULL PRIMARY KEY);
         1217  +CREATE TABLE "nmo:DeliveryStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1218  +CREATE TABLE "nmo:Email" (ID INTEGER NOT NULL PRIMARY KEY,
         1219  +"nmo:hasContent" INTEGER, "nmo:hasContent:graph" INTEGER,
         1220  +"nmo:isFlagged" INTEGER, "nmo:isFlagged:graph" INTEGER, "nmo:isRecent"
         1221  +INTEGER, "nmo:isRecent:graph" INTEGER, "nmo:status" TEXT COLLATE
         1222  +NOCASE, "nmo:status:graph" INTEGER, "nmo:responseType" TEXT COLLATE
         1223  +NOCASE, "nmo:responseType:graph" INTEGER);
         1224  +CREATE TABLE "nmo:Email_nmo:contentMimeType" (ID INTEGER NOT NULL,
         1225  +"nmo:contentMimeType" TEXT NOT NULL, "nmo:contentMimeType:graph"
         1226  +INTEGER);
         1227  +CREATE TABLE "nmo:IMMessage" (ID INTEGER NOT NULL PRIMARY KEY);
         1228  +CREATE TABLE "nmo:MMSMessage" (ID INTEGER NOT NULL PRIMARY KEY,
         1229  +"nmo:mmsHasContent" INTEGER, "nmo:mmsHasContent:graph" INTEGER);
         1230  +CREATE TABLE "nmo:MailAccount" (ID INTEGER NOT NULL PRIMARY KEY,
         1231  +"nmo:accountName" TEXT COLLATE NOCASE, "nmo:accountName:graph"
         1232  +INTEGER, "nmo:accountDisplayName" TEXT COLLATE NOCASE,
         1233  +"nmo:accountDisplayName:graph" INTEGER, "nmo:fromAddress" INTEGER,
         1234  +"nmo:fromAddress:graph" INTEGER, "nmo:signature" TEXT COLLATE NOCASE,
         1235  +"nmo:signature:graph" INTEGER);
         1236  +CREATE TABLE "nmo:MailFolder" (ID INTEGER NOT NULL PRIMARY KEY,
         1237  +"nmo:folderName" TEXT COLLATE NOCASE, "nmo:folderName:graph" INTEGER,
         1238  +"nmo:serverCount" INTEGER, "nmo:serverCount:graph" INTEGER,
         1239  +"nmo:serverUnreadCount" INTEGER, "nmo:serverUnreadCount:graph"
         1240  +INTEGER);
         1241  +CREATE TABLE "nmo:MailboxDataObject" (ID INTEGER NOT NULL PRIMARY KEY);
         1242  +CREATE TABLE "nmo:Message" (ID INTEGER NOT NULL PRIMARY KEY,
         1243  +"nmo:sentDate" INTEGER, "nmo:sentDate:graph" INTEGER,
         1244  +"nmo:sentDate:localDate" INTEGER, "nmo:sentDate:localTime" INTEGER,
         1245  +"nmo:from" INTEGER, "nmo:from:graph" INTEGER, "nmo:isAnswered"
         1246  +INTEGER, "nmo:isAnswered:graph" INTEGER, "nmo:isDeleted" INTEGER,
         1247  +"nmo:isDeleted:graph" INTEGER, "nmo:isDraft" INTEGER,
         1248  +"nmo:isDraft:graph" INTEGER, "nmo:isRead" INTEGER, "nmo:isRead:graph"
         1249  +INTEGER, "nmo:isSent" INTEGER, "nmo:isSent:graph" INTEGER,
         1250  +"nmo:isEmergency" INTEGER, "nmo:isEmergency:graph" INTEGER,
         1251  +"nmo:htmlMessageContent" TEXT COLLATE NOCASE,
         1252  +"nmo:htmlMessageContent:graph" INTEGER, "nmo:messageId" TEXT COLLATE
         1253  +NOCASE, "nmo:messageId:graph" INTEGER, "nmo:messageSubject" TEXT
         1254  +COLLATE NOCASE, "nmo:messageSubject:graph" INTEGER,
         1255  +"nmo:receivedDate" INTEGER, "nmo:receivedDate:graph" INTEGER,
         1256  +"nmo:receivedDate:localDate" INTEGER, "nmo:receivedDate:localTime"
         1257  +INTEGER, "nmo:replyTo" INTEGER, "nmo:replyTo:graph" INTEGER,
         1258  +"nmo:sender" INTEGER, "nmo:sender:graph" INTEGER, "nmo:conversation"
         1259  +INTEGER, "nmo:conversation:graph" INTEGER, "nmo:communicationChannel"
         1260  +INTEGER, "nmo:communicationChannel:graph" INTEGER,
         1261  +"nmo:deliveryStatus" INTEGER, "nmo:deliveryStatus:graph" INTEGER,
         1262  +"nmo:reportDelivery" INTEGER, "nmo:reportDelivery:graph" INTEGER,
         1263  +"nmo:sentWithReportRead" INTEGER, "nmo:sentWithReportRead:graph"
         1264  +INTEGER, "nmo:reportReadStatus" INTEGER, "nmo:reportReadStatus:graph"
         1265  +INTEGER, "nmo:mustAnswerReportRead" INTEGER,
         1266  +"nmo:mustAnswerReportRead:graph" INTEGER, "nmo:mmsId" TEXT COLLATE
         1267  +NOCASE, "nmo:mmsId:graph" INTEGER);
         1268  +CREATE TABLE "nmo:MessageHeader" (ID INTEGER NOT NULL PRIMARY KEY,
         1269  +"nmo:headerName" TEXT COLLATE NOCASE, "nmo:headerName:graph" INTEGER,
         1270  +"nmo:headerValue" TEXT COLLATE NOCASE, "nmo:headerValue:graph"
         1271  +INTEGER);
         1272  +CREATE TABLE "nmo:Message_nmo:bcc" (ID INTEGER NOT NULL, "nmo:bcc"
         1273  +INTEGER NOT NULL, "nmo:bcc:graph" INTEGER);
         1274  +CREATE TABLE "nmo:Message_nmo:cc" (ID INTEGER NOT NULL, "nmo:cc"
         1275  +INTEGER NOT NULL, "nmo:cc:graph" INTEGER);
         1276  +CREATE TABLE "nmo:Message_nmo:hasAttachment" (ID INTEGER NOT NULL,
         1277  +"nmo:hasAttachment" INTEGER NOT NULL, "nmo:hasAttachment:graph"
         1278  +INTEGER);
         1279  +CREATE TABLE "nmo:Message_nmo:inReplyTo" (ID INTEGER NOT NULL,
         1280  +"nmo:inReplyTo" INTEGER NOT NULL, "nmo:inReplyTo:graph" INTEGER);
         1281  +CREATE TABLE "nmo:Message_nmo:messageHeader" (ID INTEGER NOT NULL,
         1282  +"nmo:messageHeader" INTEGER NOT NULL, "nmo:messageHeader:graph"
         1283  +INTEGER);
         1284  +CREATE TABLE "nmo:Message_nmo:recipient" (ID INTEGER NOT NULL,
         1285  +"nmo:recipient" INTEGER NOT NULL, "nmo:recipient:graph" INTEGER);
         1286  +CREATE TABLE "nmo:Message_nmo:references" (ID INTEGER NOT NULL,
         1287  +"nmo:references" INTEGER NOT NULL, "nmo:references:graph" INTEGER);
         1288  +CREATE TABLE "nmo:Message_nmo:to" (ID INTEGER NOT NULL, "nmo:to"
         1289  +INTEGER NOT NULL, "nmo:to:graph" INTEGER);
         1290  +CREATE TABLE "nmo:MimePart" (ID INTEGER NOT NULL PRIMARY KEY,
         1291  +"nmo:charSet" TEXT COLLATE NOCASE, "nmo:charSet:graph" INTEGER,
         1292  +"nmo:contentId" TEXT COLLATE NOCASE, "nmo:contentId:graph" INTEGER,
         1293  +"nmo:contentTransferEncoding" TEXT COLLATE NOCASE,
         1294  +"nmo:contentTransferEncoding:graph" INTEGER, "nmo:contentDescription"
         1295  +TEXT COLLATE NOCASE, "nmo:contentDescription:graph" INTEGER,
         1296  +"nmo:contentDisposition" TEXT COLLATE NOCASE,
         1297  +"nmo:contentDisposition:graph" INTEGER);
         1298  +CREATE TABLE "nmo:MimePart_nmo:mimeHeader" (ID INTEGER NOT NULL,
         1299  +"nmo:mimeHeader" INTEGER NOT NULL, "nmo:mimeHeader:graph" INTEGER);
         1300  +CREATE TABLE "nmo:Multipart" (ID INTEGER NOT NULL PRIMARY KEY);
         1301  +CREATE TABLE "nmo:Multipart_nmo:partBoundary" (ID INTEGER NOT NULL,
         1302  +"nmo:partBoundary" TEXT NOT NULL, "nmo:partBoundary:graph" INTEGER);
         1303  +CREATE TABLE "nmo:PermanentChannel" (ID INTEGER NOT NULL PRIMARY KEY);
         1304  +CREATE TABLE "nmo:PhoneMessage" (ID INTEGER NOT NULL PRIMARY KEY,
         1305  +"nmo:fromVCard" INTEGER, "nmo:fromVCard:graph" INTEGER, "nmo:encoding"
         1306  +TEXT COLLATE NOCASE, "nmo:encoding:graph" INTEGER,
         1307  +"nmo:phoneMessageId" INTEGER, "nmo:phoneMessageId:graph" INTEGER,
         1308  +"nmo:validityPeriod" INTEGER, "nmo:validityPeriod:graph" INTEGER);
         1309  +CREATE TABLE "nmo:PhoneMessageFolder" (ID INTEGER NOT NULL PRIMARY
         1310  +KEY, "nmo:phoneMessageFolderId" TEXT COLLATE NOCASE,
         1311  +"nmo:phoneMessageFolderId:graph" INTEGER);
         1312  +CREATE TABLE "nmo:PhoneMessageFolder_nmo:containsPhoneMessage" (ID
         1313  +INTEGER NOT NULL, "nmo:containsPhoneMessage" INTEGER NOT NULL,
         1314  +"nmo:containsPhoneMessage:graph" INTEGER);
         1315  +CREATE TABLE "nmo:PhoneMessageFolder_nmo:containsPhoneMessageFolder"
         1316  +(ID INTEGER NOT NULL, "nmo:containsPhoneMessageFolder" INTEGER NOT
         1317  +NULL, "nmo:containsPhoneMessageFolder:graph" INTEGER);
         1318  +CREATE TABLE "nmo:PhoneMessage_nmo:toVCard" (ID INTEGER NOT NULL,
         1319  +"nmo:toVCard" INTEGER NOT NULL, "nmo:toVCard:graph" INTEGER);
         1320  +CREATE TABLE "nmo:ReportReadStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1321  +CREATE TABLE "nmo:SMSMessage" (ID INTEGER NOT NULL PRIMARY KEY);
         1322  +CREATE TABLE "nmo:TransientChannel" (ID INTEGER NOT NULL PRIMARY KEY);
         1323  +CREATE TABLE "nmo:VOIPCall" (ID INTEGER NOT NULL PRIMARY KEY);
         1324  +CREATE TABLE "nrl:InverseFunctionalProperty" (ID INTEGER NOT NULL PRIMARY KEY);
         1325  +CREATE TABLE "osinfo:Installer" (ID INTEGER NOT NULL PRIMARY KEY);
         1326  +CREATE TABLE "poi:ObjectOfInterest" (ID INTEGER NOT NULL PRIMARY KEY);
         1327  +CREATE TABLE "rdf:Property" (ID INTEGER NOT NULL PRIMARY KEY,
         1328  +"rdfs:domain" INTEGER, "rdfs:domain:graph" INTEGER, "rdfs:range"
         1329  +INTEGER, "rdfs:range:graph" INTEGER, "tracker:indexed" INTEGER,
         1330  +"tracker:indexed:graph" INTEGER, "tracker:secondaryIndex" INTEGER,
         1331  +"tracker:secondaryIndex:graph" INTEGER, "tracker:fulltextIndexed"
         1332  +INTEGER, "tracker:fulltextIndexed:graph" INTEGER,
         1333  +"tracker:fulltextNoLimit" INTEGER, "tracker:fulltextNoLimit:graph"
         1334  +INTEGER, "tracker:transient" INTEGER, "tracker:transient:graph"
         1335  +INTEGER, "tracker:weight" INTEGER, "tracker:weight:graph" INTEGER,
         1336  +"tracker:defaultValue" TEXT COLLATE NOCASE,
         1337  +"tracker:defaultValue:graph" INTEGER, "nrl:maxCardinality" INTEGER,
         1338  +"nrl:maxCardinality:graph" INTEGER, "tracker:writeback" INTEGER,
         1339  +"tracker:writeback:graph" INTEGER, "tracker:forceJournal" INTEGER,
         1340  +"tracker:forceJournal:graph" INTEGER);
         1341  +CREATE TABLE "rdf:Property_rdfs:subPropertyOf" (ID INTEGER NOT NULL,
         1342  +"rdfs:subPropertyOf" INTEGER NOT NULL, "rdfs:subPropertyOf:graph"
         1343  +INTEGER);
         1344  +CREATE TABLE "rdfs:Class" (ID INTEGER NOT NULL PRIMARY KEY,
         1345  +"tracker:notify" INTEGER, "tracker:notify:graph" INTEGER);
         1346  +CREATE TABLE "rdfs:Class_rdfs:subClassOf" (ID INTEGER NOT NULL,
         1347  +"rdfs:subClassOf" INTEGER NOT NULL, "rdfs:subClassOf:graph" INTEGER);
         1348  +CREATE TABLE "rdfs:Class_tracker:domainIndex" (ID INTEGER NOT NULL,
         1349  +"tracker:domainIndex" INTEGER NOT NULL, "tracker:domainIndex:graph"
         1350  +INTEGER);
         1351  +CREATE TABLE "rdfs:Literal" (ID INTEGER NOT NULL PRIMARY KEY);
         1352  +CREATE TABLE "rdfs:Resource" (ID INTEGER NOT NULL PRIMARY KEY,
         1353  +Available INTEGER NOT NULL, "rdfs:comment" TEXT COLLATE NOCASE,
         1354  +"rdfs:comment:graph" INTEGER, "rdfs:label" TEXT COLLATE NOCASE,
         1355  +"rdfs:label:graph" INTEGER, "tracker:added" INTEGER,
         1356  +"tracker:added:graph" INTEGER, "tracker:added:localDate" INTEGER,
         1357  +"tracker:added:localTime" INTEGER, "tracker:modified" INTEGER,
         1358  +"tracker:modified:graph" INTEGER, "tracker:damaged" INTEGER,
         1359  +"tracker:damaged:graph" INTEGER, "dc:title" TEXT COLLATE NOCASE,
         1360  +"dc:title:graph" INTEGER, "dc:creator" TEXT COLLATE NOCASE,
         1361  +"dc:creator:graph" INTEGER, "dc:subject" TEXT COLLATE NOCASE,
         1362  +"dc:subject:graph" INTEGER, "dc:description" TEXT COLLATE NOCASE,
         1363  +"dc:description:graph" INTEGER, "dc:publisher" TEXT COLLATE NOCASE,
         1364  +"dc:publisher:graph" INTEGER, "dc:type" TEXT COLLATE NOCASE,
         1365  +"dc:type:graph" INTEGER, "dc:format" TEXT COLLATE NOCASE,
         1366  +"dc:format:graph" INTEGER, "dc:identifier" TEXT COLLATE NOCASE,
         1367  +"dc:identifier:graph" INTEGER, "dc:language" TEXT COLLATE NOCASE,
         1368  +"dc:language:graph" INTEGER, "dc:coverage" TEXT COLLATE NOCASE,
         1369  +"dc:coverage:graph" INTEGER, "dc:rights" TEXT COLLATE NOCASE,
         1370  +"dc:rights:graph" INTEGER, "nao:identifier" TEXT COLLATE NOCASE,
         1371  +"nao:identifier:graph" INTEGER, "nao:numericRating" REAL,
         1372  +"nao:numericRating:graph" INTEGER, "nao:lastModified" INTEGER,
         1373  +"nao:lastModified:graph" INTEGER, "nao:lastModified:localDate"
         1374  +INTEGER, "nao:lastModified:localTime" INTEGER);
         1375  +CREATE TABLE "rdfs:Resource_dc:contributor" (ID INTEGER NOT NULL,
         1376  +"dc:contributor" TEXT NOT NULL, "dc:contributor:graph" INTEGER);
         1377  +CREATE TABLE "rdfs:Resource_dc:date" (ID INTEGER NOT NULL, "dc:date"
         1378  +INTEGER NOT NULL, "dc:date:graph" INTEGER, "dc:date:localDate" INTEGER
         1379  +NOT NULL, "dc:date:localTime" INTEGER NOT NULL);
         1380  +CREATE TABLE "rdfs:Resource_dc:relation" (ID INTEGER NOT NULL,
         1381  +"dc:relation" TEXT NOT NULL, "dc:relation:graph" INTEGER);
         1382  +CREATE TABLE "rdfs:Resource_dc:source" (ID INTEGER NOT NULL,
         1383  +"dc:source" INTEGER NOT NULL, "dc:source:graph" INTEGER);
         1384  +CREATE TABLE "rdfs:Resource_nao:deprecated" (ID INTEGER NOT NULL,
         1385  +"nao:deprecated" INTEGER NOT NULL, "nao:deprecated:graph" INTEGER);
         1386  +CREATE TABLE "rdfs:Resource_nao:hasTag" (ID INTEGER NOT NULL,
         1387  +"nao:hasTag" INTEGER NOT NULL, "nao:hasTag:graph" INTEGER);
         1388  +CREATE TABLE "rdfs:Resource_nao:isRelated" (ID INTEGER NOT NULL,
         1389  +"nao:isRelated" INTEGER NOT NULL, "nao:isRelated:graph" INTEGER);
         1390  +CREATE TABLE "rdfs:Resource_rdf:type" (ID INTEGER NOT NULL, "rdf:type"
         1391  +INTEGER NOT NULL, "rdf:type:graph" INTEGER);
         1392  +CREATE TABLE "scal:AccessLevel" (ID INTEGER NOT NULL PRIMARY KEY);
         1393  +CREATE TABLE "scal:AttendanceStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1394  +CREATE TABLE "scal:Attendee" (ID INTEGER NOT NULL PRIMARY KEY,
         1395  +"scal:attendanceStatus" INTEGER, "scal:attendanceStatus:graph"
         1396  +INTEGER, "scal:attendeeRole" INTEGER, "scal:attendeeRole:graph"
         1397  +INTEGER, "scal:attendeeContact" INTEGER, "scal:attendeeContact:graph"
         1398  +INTEGER, "scal:rsvp" INTEGER, "scal:rsvp:graph" INTEGER,
         1399  +"scal:calendarUserType" INTEGER, "scal:calendarUserType:graph"
         1400  +INTEGER);
         1401  +CREATE TABLE "scal:AttendeeRole" (ID INTEGER NOT NULL PRIMARY KEY);
         1402  +CREATE TABLE "scal:Attendee_scal:delegated-from" (ID INTEGER NOT NULL,
         1403  +"scal:delegated-from" INTEGER NOT NULL, "scal:delegated-from:graph"
         1404  +INTEGER);
         1405  +CREATE TABLE "scal:Attendee_scal:delegated-to" (ID INTEGER NOT NULL,
         1406  +"scal:delegated-to" INTEGER NOT NULL, "scal:delegated-to:graph"
         1407  +INTEGER);
         1408  +CREATE TABLE "scal:Attendee_scal:member" (ID INTEGER NOT NULL,
         1409  +"scal:member" INTEGER NOT NULL, "scal:member:graph" INTEGER);
         1410  +CREATE TABLE "scal:Attendee_scal:sent-by" (ID INTEGER NOT NULL,
         1411  +"scal:sent-by" INTEGER NOT NULL, "scal:sent-by:graph" INTEGER);
         1412  +CREATE TABLE "scal:Calendar" (ID INTEGER NOT NULL PRIMARY KEY);
         1413  +CREATE TABLE "scal:CalendarAlarm" (ID INTEGER NOT NULL PRIMARY KEY,
         1414  +"scal:alarmOffset" INTEGER, "scal:alarmOffset:graph" INTEGER);
         1415  +CREATE TABLE "scal:CalendarAlarm_scal:alarmAttendee" (ID INTEGER NOT
         1416  +NULL, "scal:alarmAttendee" INTEGER NOT NULL,
         1417  +"scal:alarmAttendee:graph" INTEGER);
         1418  +CREATE TABLE "scal:CalendarItem" (ID INTEGER NOT NULL PRIMARY KEY,
         1419  +"scal:textLocation" INTEGER, "scal:textLocation:graph" INTEGER,
         1420  +"scal:resources" TEXT COLLATE NOCASE, "scal:resources:graph" INTEGER,
         1421  +"scal:transparency" INTEGER, "scal:transparency:graph" INTEGER,
         1422  +"scal:calendarItemAlarm" INTEGER, "scal:calendarItemAlarm:graph"
         1423  +INTEGER, "scal:start" INTEGER, "scal:start:graph" INTEGER, "scal:end"
         1424  +INTEGER, "scal:end:graph" INTEGER, "scal:isAllDay" INTEGER,
         1425  +"scal:isAllDay:graph" INTEGER, "scal:priority" INTEGER,
         1426  +"scal:priority:graph" INTEGER, "scal:rdate" INTEGER,
         1427  +"scal:rdate:graph" INTEGER, "scal:exceptionRDate" INTEGER,
         1428  +"scal:exceptionRDate:graph" INTEGER);
         1429  +CREATE TABLE "scal:CalendarItem_scal:access" (ID INTEGER NOT NULL,
         1430  +"scal:access" INTEGER NOT NULL, "scal:access:graph" INTEGER);
         1431  +CREATE TABLE "scal:CalendarItem_scal:attachment" (ID INTEGER NOT NULL,
         1432  +"scal:attachment" INTEGER NOT NULL, "scal:attachment:graph" INTEGER);
         1433  +CREATE TABLE "scal:CalendarItem_scal:attendee" (ID INTEGER NOT NULL,
         1434  +"scal:attendee" INTEGER NOT NULL, "scal:attendee:graph" INTEGER);
         1435  +CREATE TABLE "scal:CalendarItem_scal:belongsToCalendar" (ID INTEGER
         1436  +NOT NULL, "scal:belongsToCalendar" INTEGER NOT NULL,
         1437  +"scal:belongsToCalendar:graph" INTEGER);
         1438  +CREATE TABLE "scal:CalendarItem_scal:contact" (ID INTEGER NOT NULL,
         1439  +"scal:contact" INTEGER NOT NULL, "scal:contact:graph" INTEGER);
         1440  +CREATE TABLE "scal:CalendarItem_scal:rrule" (ID INTEGER NOT NULL,
         1441  +"scal:rrule" INTEGER NOT NULL, "scal:rrule:graph" INTEGER);
         1442  +CREATE TABLE "scal:CalendarUserType" (ID INTEGER NOT NULL PRIMARY KEY);
         1443  +CREATE TABLE "scal:Event" (ID INTEGER NOT NULL PRIMARY KEY,
         1444  +"scal:eventStatus" INTEGER, "scal:eventStatus:graph" INTEGER);
         1445  +CREATE TABLE "scal:EventStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1446  +CREATE TABLE "scal:Journal" (ID INTEGER NOT NULL PRIMARY KEY,
         1447  +"scal:journalStatus" INTEGER, "scal:journalStatus:graph" INTEGER);
         1448  +CREATE TABLE "scal:JournalStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1449  +CREATE TABLE "scal:RSVPValues" (ID INTEGER NOT NULL PRIMARY KEY);
         1450  +CREATE TABLE "scal:RecurrenceRule" (ID INTEGER NOT NULL PRIMARY KEY,
         1451  +"scal:recurrencePattern" TEXT COLLATE NOCASE,
         1452  +"scal:recurrencePattern:graph" INTEGER, "scal:recurrenceStartDate"
         1453  +INTEGER, "scal:recurrenceStartDate:graph" INTEGER, "scal:exception"
         1454  +INTEGER, "scal:exception:graph" INTEGER);
         1455  +CREATE TABLE "scal:TimePoint" (ID INTEGER NOT NULL PRIMARY KEY,
         1456  +"scal:dateTime" INTEGER, "scal:dateTime:graph" INTEGER,
         1457  +"scal:dateTime:localDate" INTEGER, "scal:dateTime:localTime" INTEGER,
         1458  +"scal:TimeZone" TEXT COLLATE NOCASE, "scal:TimeZone:graph" INTEGER);
         1459  +CREATE TABLE "scal:Todo" (ID INTEGER NOT NULL PRIMARY KEY,
         1460  +"scal:todoStatus" INTEGER, "scal:todoStatus:graph" INTEGER, "scal:due"
         1461  +INTEGER, "scal:due:graph" INTEGER, "scal:completed" INTEGER,
         1462  +"scal:completed:graph" INTEGER, "scal:percentComplete" INTEGER,
         1463  +"scal:percentComplete:graph" INTEGER);
         1464  +CREATE TABLE "scal:TodoStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1465  +CREATE TABLE "scal:TransparencyValues" (ID INTEGER NOT NULL PRIMARY KEY);
         1466  +CREATE TABLE "slo:GeoLocation" (ID INTEGER NOT NULL PRIMARY KEY,
         1467  +"slo:latitude" REAL, "slo:latitude:graph" INTEGER, "slo:longitude"
         1468  +REAL, "slo:longitude:graph" INTEGER, "slo:verticalAccuracy" REAL,
         1469  +"slo:verticalAccuracy:graph" INTEGER, "slo:horizontalAccuracy" REAL,
         1470  +"slo:horizontalAccuracy:graph" INTEGER, "slo:altitude" REAL,
         1471  +"slo:altitude:graph" INTEGER, "slo:boundingLatitudeMin" REAL,
         1472  +"slo:boundingLatitudeMin:graph" INTEGER, "slo:boundingLatitudeMax"
         1473  +REAL, "slo:boundingLatitudeMax:graph" INTEGER,
         1474  +"slo:boundingLongitudeMin" REAL, "slo:boundingLongitudeMin:graph"
         1475  +INTEGER, "slo:boundingLongitudeMax" REAL,
         1476  +"slo:boundingLongitudeMax:graph" INTEGER, "slo:radius" REAL,
         1477  +"slo:radius:graph" INTEGER, "slo:timestamp" INTEGER,
         1478  +"slo:timestamp:graph" INTEGER, "slo:timestamp:localDate" INTEGER,
         1479  +"slo:timestamp:localTime" INTEGER, "slo:postalAddress" INTEGER,
         1480  +"slo:postalAddress:graph" INTEGER);
         1481  +CREATE TABLE "slo:Landmark" (ID INTEGER NOT NULL PRIMARY KEY,
         1482  +"slo:iconUrl" INTEGER, "slo:iconUrl:graph" INTEGER);
         1483  +CREATE TABLE "slo:LandmarkCategory" (ID INTEGER NOT NULL PRIMARY KEY,
         1484  +"slo:isRemovable" INTEGER, "slo:isRemovable:graph" INTEGER,
         1485  +"slo:categoryIconUrl" INTEGER, "slo:categoryIconUrl:graph" INTEGER);
         1486  +CREATE TABLE "slo:Landmark_slo:belongsToCategory" (ID INTEGER NOT
         1487  +NULL, "slo:belongsToCategory" INTEGER NOT NULL,
         1488  +"slo:belongsToCategory:graph" INTEGER);
         1489  +CREATE TABLE "slo:Landmark_slo:hasContact" (ID INTEGER NOT NULL,
         1490  +"slo:hasContact" INTEGER NOT NULL, "slo:hasContact:graph" INTEGER);
         1491  +CREATE TABLE "slo:Route" (ID INTEGER NOT NULL PRIMARY KEY,
         1492  +"slo:startTime" INTEGER, "slo:startTime:graph" INTEGER,
         1493  +"slo:startTime:localDate" INTEGER, "slo:startTime:localTime" INTEGER,
         1494  +"slo:endTime" INTEGER, "slo:endTime:graph" INTEGER,
         1495  +"slo:endTime:localDate" INTEGER, "slo:endTime:localTime" INTEGER);
         1496  +CREATE TABLE "slo:Route_slo:routeDetails" (ID INTEGER NOT NULL,
         1497  +"slo:routeDetails" TEXT NOT NULL, "slo:routeDetails:graph" INTEGER);
         1498  +CREATE TABLE "tracker:Namespace" (ID INTEGER NOT NULL PRIMARY KEY,
         1499  +"tracker:prefix" TEXT COLLATE NOCASE, "tracker:prefix:graph"
         1500  +INTEGER);
         1501  +CREATE TABLE "tracker:Ontology" (ID INTEGER NOT NULL PRIMARY KEY);
         1502  +CREATE TABLE "tracker:Volume" (ID INTEGER NOT NULL PRIMARY KEY,
         1503  +"tracker:isMounted" INTEGER, "tracker:isMounted:graph" INTEGER,
         1504  +"tracker:unmountDate" INTEGER, "tracker:unmountDate:graph" INTEGER,
         1505  +"tracker:unmountDate:localDate" INTEGER,
         1506  +"tracker:unmountDate:localTime" INTEGER, "tracker:mountPoint" INTEGER,
         1507  +"tracker:mountPoint:graph" INTEGER, "tracker:isRemovable" INTEGER,
         1508  +"tracker:isRemovable:graph" INTEGER, "tracker:isOptical" INTEGER,
         1509  +"tracker:isOptical:graph" INTEGER);
         1510  +CREATE UNIQUE INDEX "mfo:FeedMessage_mfo:enclosureList_ID_ID" ON
         1511  +"mfo:FeedMessage_mfo:enclosureList" (ID, "mfo:enclosureList");
         1512  +CREATE UNIQUE INDEX "mlo:GeoBoundingBox_mlo:bbNorthWest_ID_ID" ON
         1513  +"mlo:GeoBoundingBox_mlo:bbNorthWest" (ID, "mlo:bbNorthWest");
         1514  +CREATE UNIQUE INDEX "mlo:GeoBoundingBox_mlo:bbSouthEast_ID_ID" ON
         1515  +"mlo:GeoBoundingBox_mlo:bbSouthEast" (ID, "mlo:bbSouthEast");
         1516  +CREATE INDEX "mlo:GeoLocation_mlo:asBoundingBox_ID" ON
         1517  +"mlo:GeoLocation_mlo:asBoundingBox" (ID);
         1518  +CREATE UNIQUE INDEX "mlo:GeoLocation_mlo:asBoundingBox_ID_ID" ON
         1519  +"mlo:GeoLocation_mlo:asBoundingBox" ("mlo:asBoundingBox", ID);
         1520  +CREATE INDEX "mlo:GeoLocation_mlo:asGeoPoint_ID" ON
         1521  +"mlo:GeoLocation_mlo:asGeoPoint" (ID);
         1522  +CREATE UNIQUE INDEX "mlo:GeoLocation_mlo:asGeoPoint_ID_ID" ON
         1523  +"mlo:GeoLocation_mlo:asGeoPoint" ("mlo:asGeoPoint", ID);
         1524  +CREATE INDEX "mlo:GeoLocation_mlo:asPostalAddress_ID" ON
         1525  +"mlo:GeoLocation_mlo:asPostalAddress" (ID);
         1526  +CREATE UNIQUE INDEX "mlo:GeoLocation_mlo:asPostalAddress_ID_ID" ON
         1527  +"mlo:GeoLocation_mlo:asPostalAddress" ("mlo:asPostalAddress", ID);
         1528  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:address_ID_ID" ON
         1529  +"mlo:GeoPoint_mlo:address" (ID, "mlo:address");
         1530  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:altitude_ID_ID" ON
         1531  +"mlo:GeoPoint_mlo:altitude" (ID, "mlo:altitude");
         1532  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:city_ID_ID" ON
         1533  +"mlo:GeoPoint_mlo:city" (ID, "mlo:city");
         1534  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:country_ID_ID" ON
         1535  +"mlo:GeoPoint_mlo:country" (ID, "mlo:country");
         1536  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:latitude_ID_ID" ON
         1537  +"mlo:GeoPoint_mlo:latitude" (ID, "mlo:latitude");
         1538  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:longitude_ID_ID" ON
         1539  +"mlo:GeoPoint_mlo:longitude" (ID, "mlo:longitude");
         1540  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:state_ID_ID" ON
         1541  +"mlo:GeoPoint_mlo:state" (ID, "mlo:state");
         1542  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:timestamp_ID_ID" ON
         1543  +"mlo:GeoPoint_mlo:timestamp" (ID, "mlo:timestamp");
         1544  +CREATE UNIQUE INDEX "mlo:GeoSphere_mlo:radius_ID_ID" ON
         1545  +"mlo:GeoSphere_mlo:radius" (ID, "mlo:radius");
         1546  +CREATE UNIQUE INDEX "mlo:LandmarkCategory_mlo:isRemovable_ID_ID" ON
         1547  +"mlo:LandmarkCategory_mlo:isRemovable" (ID, "mlo:isRemovable");
         1548  +CREATE UNIQUE INDEX "mlo:Landmark_mlo:belongsToCategory_ID_ID" ON
         1549  +"mlo:Landmark_mlo:belongsToCategory" (ID, "mlo:belongsToCategory");
         1550  +CREATE UNIQUE INDEX "mlo:Landmark_mlo:poiLocation_ID_ID" ON
         1551  +"mlo:Landmark_mlo:poiLocation" (ID, "mlo:poiLocation");
         1552  +CREATE UNIQUE INDEX "mlo:LocationBoundingBox_mlo:boxEastLimit_ID_ID"
         1553  +ON "mlo:LocationBoundingBox_mlo:boxEastLimit" (ID,
         1554  +"mlo:boxEastLimit");
         1555  +CREATE UNIQUE INDEX "mlo:LocationBoundingBox_mlo:boxNorthLimit_ID_ID"
         1556  +ON "mlo:LocationBoundingBox_mlo:boxNorthLimit" (ID,
         1557  +"mlo:boxNorthLimit");
         1558  +CREATE UNIQUE INDEX
         1559  +"mlo:LocationBoundingBox_mlo:boxSouthWestCorner_ID_ID" ON
         1560  +"mlo:LocationBoundingBox_mlo:boxSouthWestCorner" (ID,
         1561  +"mlo:boxSouthWestCorner");
         1562  +CREATE UNIQUE INDEX
         1563  +"mlo:LocationBoundingBox_mlo:boxVerticalLimit_ID_ID" ON
         1564  +"mlo:LocationBoundingBox_mlo:boxVerticalLimit" (ID,
         1565  +"mlo:boxVerticalLimit");
         1566  +CREATE UNIQUE INDEX "mlo:Route_mlo:endTime_ID_ID" ON
         1567  +"mlo:Route_mlo:endTime" (ID, "mlo:endTime");
         1568  +CREATE UNIQUE INDEX "mlo:Route_mlo:routeDetails_ID_ID" ON
         1569  +"mlo:Route_mlo:routeDetails" (ID, "mlo:routeDetails");
         1570  +CREATE UNIQUE INDEX "mlo:Route_mlo:startTime_ID_ID" ON
         1571  +"mlo:Route_mlo:startTime" (ID, "mlo:startTime");
         1572  +CREATE UNIQUE INDEX "mto:Transfer_mto:transferList_ID_ID" ON
         1573  +"mto:Transfer_mto:transferList" (ID, "mto:transferList");
         1574  +CREATE UNIQUE INDEX "mto:Transfer_mto:transferPrivacyLevel_ID_ID" ON
         1575  +"mto:Transfer_mto:transferPrivacyLevel" (ID,
         1576  +"mto:transferPrivacyLevel");
         1577  +CREATE UNIQUE INDEX "mto:UploadTransfer_mto:transferCategory_ID_ID" ON
         1578  +"mto:UploadTransfer_mto:transferCategory" (ID,
         1579  +"mto:transferCategory");
         1580  +CREATE UNIQUE INDEX "nao:Tag_tracker:isDefaultTag_ID_ID" ON
         1581  +"nao:Tag_tracker:isDefaultTag" (ID, "tracker:isDefaultTag");
         1582  +CREATE UNIQUE INDEX "nao:Tag_tracker:tagRelatedTo_ID_ID" ON
         1583  +"nao:Tag_tracker:tagRelatedTo" (ID, "tracker:tagRelatedTo");
         1584  +CREATE UNIQUE INDEX "ncal:Alarm_ncal:action_ID_ID" ON
         1585  +"ncal:Alarm_ncal:action" (ID, "ncal:action");
         1586  +CREATE UNIQUE INDEX "ncal:BydayRulePart_ncal:bydayModifier_ID_ID" ON
         1587  +"ncal:BydayRulePart_ncal:bydayModifier" (ID, "ncal:bydayModifier");
         1588  +CREATE UNIQUE INDEX "ncal:BydayRulePart_ncal:bydayWeekday_ID_ID" ON
         1589  +"ncal:BydayRulePart_ncal:bydayWeekday" (ID, "ncal:bydayWeekday");
         1590  +CREATE UNIQUE INDEX "ncal:Calendar_ncal:component_ID_ID" ON
         1591  +"ncal:Calendar_ncal:component" (ID, "ncal:component");
         1592  +CREATE UNIQUE INDEX "ncal:Freebusy_ncal:freebusy_ID_ID" ON
         1593  +"ncal:Freebusy_ncal:freebusy" (ID, "ncal:freebusy");
         1594  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:byday_ID_ID" ON
         1595  +"ncal:RecurrenceRule_ncal:byday" (ID, "ncal:byday");
         1596  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:byhour_ID_ID" ON
         1597  +"ncal:RecurrenceRule_ncal:byhour" (ID, "ncal:byhour");
         1598  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:byminute_ID_ID" ON
         1599  +"ncal:RecurrenceRule_ncal:byminute" (ID, "ncal:byminute");
         1600  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:bymonth_ID_ID" ON
         1601  +"ncal:RecurrenceRule_ncal:bymonth" (ID, "ncal:bymonth");
         1602  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:bymonthday_ID_ID" ON
         1603  +"ncal:RecurrenceRule_ncal:bymonthday" (ID, "ncal:bymonthday");
         1604  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:bysecond_ID_ID" ON
         1605  +"ncal:RecurrenceRule_ncal:bysecond" (ID, "ncal:bysecond");
         1606  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:bysetpos_ID_ID" ON
         1607  +"ncal:RecurrenceRule_ncal:bysetpos" (ID, "ncal:bysetpos");
         1608  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:byweekno_ID_ID" ON
         1609  +"ncal:RecurrenceRule_ncal:byweekno" (ID, "ncal:byweekno");
         1610  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:byyearday_ID_ID" ON
         1611  +"ncal:RecurrenceRule_ncal:byyearday" (ID, "ncal:byyearday");
         1612  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:attach_ID_ID" ON
         1613  +"ncal:UnionParentClass_ncal:attach" (ID, "ncal:attach");
         1614  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:attendee_ID_ID" ON
         1615  +"ncal:UnionParentClass_ncal:attendee" (ID, "ncal:attendee");
         1616  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:categories_ID_ID" ON
         1617  +"ncal:UnionParentClass_ncal:categories" (ID, "ncal:categories");
         1618  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:exdate_ID_ID" ON
         1619  +"ncal:UnionParentClass_ncal:exdate" (ID, "ncal:exdate");
         1620  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:exrule_ID_ID" ON
         1621  +"ncal:UnionParentClass_ncal:exrule" (ID, "ncal:exrule");
         1622  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:hasAlarm_ID_ID" ON
         1623  +"ncal:UnionParentClass_ncal:hasAlarm" (ID, "ncal:hasAlarm");
         1624  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:ncalRelation_ID_ID" ON
         1625  +"ncal:UnionParentClass_ncal:ncalRelation" (ID, "ncal:ncalRelation");
         1626  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:rdate_ID_ID" ON
         1627  +"ncal:UnionParentClass_ncal:rdate" (ID, "ncal:rdate");
         1628  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:relatedToChild_ID_ID"
         1629  +ON "ncal:UnionParentClass_ncal:relatedToChild" (ID,
         1630  +"ncal:relatedToChild");
         1631  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:relatedToParent_ID_ID"
         1632  +ON "ncal:UnionParentClass_ncal:relatedToParent" (ID,
         1633  +"ncal:relatedToParent");
         1634  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:resources_ID_ID" ON
         1635  +"ncal:UnionParentClass_ncal:resources" (ID, "ncal:resources");
         1636  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:rrule_ID_ID" ON
         1637  +"ncal:UnionParentClass_ncal:rrule" (ID, "ncal:rrule");
         1638  +CREATE UNIQUE INDEX "nco:Affiliation_nco:title_ID_ID" ON
         1639  +"nco:Affiliation_nco:title" (ID, "nco:title");
         1640  +CREATE UNIQUE INDEX "nco:ContactList_nco:containsContact_ID_ID" ON
         1641  +"nco:ContactList_nco:containsContact" (ID, "nco:containsContact");
         1642  +CREATE UNIQUE INDEX "nco:Contact_ncal:anniversary_ID_ID" ON
         1643  +"nco:Contact_ncal:anniversary" (ID, "ncal:anniversary");
         1644  +CREATE UNIQUE INDEX "nco:Contact_ncal:birthday_ID_ID" ON
         1645  +"nco:Contact_ncal:birthday" (ID, "ncal:birthday");
         1646  +CREATE UNIQUE INDEX "nco:Contact_nco:belongsToGroup_ID_ID" ON
         1647  +"nco:Contact_nco:belongsToGroup" (ID, "nco:belongsToGroup");
         1648  +CREATE UNIQUE INDEX "nco:Contact_nco:note_ID_ID" ON
         1649  +"nco:Contact_nco:note" (ID, "nco:note");
         1650  +CREATE UNIQUE INDEX "nco:Contact_scal:anniversary_ID_ID" ON
         1651  +"nco:Contact_scal:anniversary" (ID, "scal:anniversary");
         1652  +CREATE UNIQUE INDEX "nco:Contact_scal:birthday_ID_ID" ON
         1653  +"nco:Contact_scal:birthday" (ID, "scal:birthday");
         1654  +CREATE UNIQUE INDEX "nco:IMAccount_nco:hasIMContact_ID_ID" ON
         1655  +"nco:IMAccount_nco:hasIMContact" (ID, "nco:hasIMContact");
         1656  +CREATE UNIQUE INDEX "nco:IMAddress_nco:imCapability_ID_ID" ON
         1657  +"nco:IMAddress_nco:imCapability" (ID, "nco:imCapability");
         1658  +CREATE UNIQUE INDEX "nco:PersonContact_nco:hasAffiliation_ID_ID" ON
         1659  +"nco:PersonContact_nco:hasAffiliation" (ID, "nco:hasAffiliation");
         1660  +CREATE INDEX "nco:PersonContact_nco:nameFamily" ON "nco:PersonContact"
         1661  +("nco:nameFamily");
         1662  +CREATE INDEX "nco:PhoneNumber_nco:phoneNumber" ON "nco:PhoneNumber"
         1663  +("nco:phoneNumber");
         1664  +CREATE UNIQUE INDEX "nco:Role_nco:blogUrl_ID_ID" ON
         1665  +"nco:Role_nco:blogUrl" (ID, "nco:blogUrl");
         1666  +CREATE UNIQUE INDEX "nco:Role_nco:foafUrl_ID_ID" ON
         1667  +"nco:Role_nco:foafUrl" (ID, "nco:foafUrl");
         1668  +CREATE UNIQUE INDEX "nco:Role_nco:hasContactMedium_ID_ID" ON
         1669  +"nco:Role_nco:hasContactMedium" (ID, "nco:hasContactMedium");
         1670  +CREATE INDEX "nco:Role_nco:hasEmailAddress_ID" ON
         1671  +"nco:Role_nco:hasEmailAddress" (ID);
         1672  +CREATE UNIQUE INDEX "nco:Role_nco:hasEmailAddress_ID_ID" ON
         1673  +"nco:Role_nco:hasEmailAddress" ("nco:hasEmailAddress", ID);
         1674  +CREATE UNIQUE INDEX "nco:Role_nco:hasIMAddress_ID_ID" ON
         1675  +"nco:Role_nco:hasIMAddress" (ID, "nco:hasIMAddress");
         1676  +CREATE UNIQUE INDEX "nco:Role_nco:hasPhoneNumber_ID_ID" ON
         1677  +"nco:Role_nco:hasPhoneNumber" (ID, "nco:hasPhoneNumber");
         1678  +CREATE INDEX "nco:Role_nco:hasPostalAddress_ID" ON
         1679  +"nco:Role_nco:hasPostalAddress" (ID);
         1680  +CREATE UNIQUE INDEX "nco:Role_nco:hasPostalAddress_ID_ID" ON
         1681  +"nco:Role_nco:hasPostalAddress" ("nco:hasPostalAddress", ID);
         1682  +CREATE UNIQUE INDEX "nco:Role_nco:url_ID_ID" ON "nco:Role_nco:url"
         1683  +(ID, "nco:url");
         1684  +CREATE UNIQUE INDEX "nco:Role_nco:websiteUrl_ID_ID" ON
         1685  +"nco:Role_nco:websiteUrl" (ID, "nco:websiteUrl");
         1686  +CREATE UNIQUE INDEX
         1687  +"nfo:BookmarkFolder_nfo:containsBookmarkFolder_ID_ID" ON
         1688  +"nfo:BookmarkFolder_nfo:containsBookmarkFolder" (ID,
         1689  +"nfo:containsBookmarkFolder");
         1690  +CREATE UNIQUE INDEX "nfo:BookmarkFolder_nfo:containsBookmark_ID_ID" ON
         1691  +"nfo:BookmarkFolder_nfo:containsBookmark" (ID,
         1692  +"nfo:containsBookmark");
         1693  +CREATE INDEX "nfo:FileDataObject_nfo:fileLastModified" ON
         1694  +"nfo:FileDataObject" ("nfo:fileLastModified");
         1695  +CREATE UNIQUE INDEX "nfo:Image_nfo:depicts_ID_ID" ON
         1696  +"nfo:Image_nfo:depicts" (ID, "nfo:depicts");
         1697  +CREATE UNIQUE INDEX "nfo:Image_nfo:hasRegionOfInterest_ID_ID" ON
         1698  +"nfo:Image_nfo:hasRegionOfInterest" (ID, "nfo:hasRegionOfInterest");
         1699  +CREATE UNIQUE INDEX "nfo:MediaList_nfo:hasMediaFileListEntry_ID_ID" ON
         1700  +"nfo:MediaList_nfo:hasMediaFileListEntry" (ID,
         1701  +"nfo:hasMediaFileListEntry");
         1702  +CREATE UNIQUE INDEX "nfo:MediaList_nfo:mediaListEntry_ID_ID" ON
         1703  +"nfo:MediaList_nfo:mediaListEntry" (ID, "nfo:mediaListEntry");
         1704  +CREATE UNIQUE INDEX "nfo:Media_mtp:hidden_ID_ID" ON
         1705  +"nfo:Media_mtp:hidden" (ID, "mtp:hidden");
         1706  +CREATE UNIQUE INDEX "nfo:Media_nmm:alternativeMedia_ID_ID" ON
         1707  +"nfo:Media_nmm:alternativeMedia" (ID, "nmm:alternativeMedia");
         1708  +CREATE INDEX "nfo:Visual_nie:contentCreated" ON "nfo:Visual"
         1709  +("nie:contentCreated");
         1710  +CREATE UNIQUE INDEX "nid3:ID3Audio_nid3:leadArtist_ID_ID" ON
         1711  +"nid3:ID3Audio_nid3:leadArtist" (ID, "nid3:leadArtist");
         1712  +CREATE UNIQUE INDEX "nie:DataObject_nie:dataSource_ID_ID" ON
         1713  +"nie:DataObject_nie:dataSource" (ID, "nie:dataSource");
         1714  +CREATE UNIQUE INDEX "nie:DataObject_nie:isPartOf_ID_ID" ON
         1715  +"nie:DataObject_nie:isPartOf" (ID, "nie:isPartOf");
         1716  +CREATE INDEX "nie:DataObject_nie:url" ON "nie:DataObject" ("nie:url");
         1717  +CREATE INDEX "nie:InformationElement_mlo:location_ID" ON
         1718  +"nie:InformationElement_mlo:location" (ID);
         1719  +CREATE UNIQUE INDEX "nie:InformationElement_mlo:location_ID_ID" ON
         1720  +"nie:InformationElement_mlo:location" ("mlo:location", ID);
         1721  +CREATE UNIQUE INDEX "nie:InformationElement_nao:hasProperty_ID_ID" ON
         1722  +"nie:InformationElement_nao:hasProperty" (ID, "nao:hasProperty");
         1723  +CREATE UNIQUE INDEX "nie:InformationElement_nco:contributor_ID_ID" ON
         1724  +"nie:InformationElement_nco:contributor" (ID, "nco:contributor");
         1725  +CREATE UNIQUE INDEX "nie:InformationElement_nco:creator_ID_ID" ON
         1726  +"nie:InformationElement_nco:creator" (ID, "nco:creator");
         1727  +CREATE UNIQUE INDEX "nie:InformationElement_nie:hasLogicalPart_ID_ID"
         1728  +ON "nie:InformationElement_nie:hasLogicalPart" (ID,
         1729  +"nie:hasLogicalPart");
         1730  +CREATE UNIQUE INDEX "nie:InformationElement_nie:hasPart_ID_ID" ON
         1731  +"nie:InformationElement_nie:hasPart" (ID, "nie:hasPart");
         1732  +CREATE UNIQUE INDEX
         1733  +"nie:InformationElement_nie:informationElementDate_ID_ID" ON
         1734  +"nie:InformationElement_nie:informationElementDate" (ID,
         1735  +"nie:informationElementDate");
         1736  +CREATE UNIQUE INDEX "nie:InformationElement_nie:isLogicalPartOf_ID_ID"
         1737  +ON "nie:InformationElement_nie:isLogicalPartOf" (ID,
         1738  +"nie:isLogicalPartOf");
         1739  +CREATE UNIQUE INDEX "nie:InformationElement_nie:keyword_ID_ID" ON
         1740  +"nie:InformationElement_nie:keyword" (ID, "nie:keyword");
         1741  +CREATE UNIQUE INDEX "nie:InformationElement_nie:relatedTo_ID_ID" ON
         1742  +"nie:InformationElement_nie:relatedTo" (ID, "nie:relatedTo");
         1743  +CREATE INDEX "nie:InformationElement_slo:location" ON
         1744  +"nie:InformationElement" ("slo:location");
         1745  +CREATE INDEX "nmm:Artist_nmm:artistName" ON "nmm:Artist" ("nmm:artistName");
         1746  +CREATE INDEX "nmm:MusicAlbum_nie:title" ON "nmm:MusicAlbum" ("nie:title");
         1747  +CREATE UNIQUE INDEX "nmm:MusicAlbum_nmm:albumArtist_ID_ID" ON
         1748  +"nmm:MusicAlbum_nmm:albumArtist" (ID, "nmm:albumArtist");
         1749  +CREATE INDEX "nmm:MusicPiece_nie:title" ON "nmm:MusicPiece" ("nie:title");
         1750  +CREATE UNIQUE INDEX "nmm:MusicPiece_nmm:lyrics_ID_ID" ON
         1751  +"nmm:MusicPiece_nmm:lyrics" (ID, "nmm:lyrics");
         1752  +CREATE INDEX "nmm:MusicPiece_nmm:musicAlbum" ON "nmm:MusicPiece"
         1753  +("nmm:musicAlbum");
         1754  +CREATE INDEX "nmm:MusicPiece_nmm:performer" ON "nmm:MusicPiece"
         1755  +("nmm:performer");
         1756  +CREATE UNIQUE INDEX "nmm:RadioStation_nmm:carrier_ID_ID" ON
         1757  +"nmm:RadioStation_nmm:carrier" (ID, "nmm:carrier");
         1758  +CREATE UNIQUE INDEX "nmm:Video_mtp:scantype_ID_ID" ON
         1759  +"nmm:Video_mtp:scantype" (ID, "mtp:scantype");
         1760  +CREATE UNIQUE INDEX "nmm:Video_nmm:director_ID_ID" ON
         1761  +"nmm:Video_nmm:director" (ID, "nmm:director");
         1762  +CREATE UNIQUE INDEX "nmm:Video_nmm:leadActor_ID_ID" ON
         1763  +"nmm:Video_nmm:leadActor" (ID, "nmm:leadActor");
         1764  +CREATE UNIQUE INDEX "nmm:Video_nmm:subtitle_ID_ID" ON
         1765  +"nmm:Video_nmm:subtitle" (ID, "nmm:subtitle");
         1766  +CREATE INDEX "nmo:Call_nmo:sentDate" ON "nmo:Call" ("nmo:sentDate");
         1767  +CREATE INDEX "nmo:CommunicationChannel_nmo:hasParticipant_ID" ON
         1768  +"nmo:CommunicationChannel_nmo:hasParticipant" (ID);
         1769  +CREATE UNIQUE INDEX
         1770  +"nmo:CommunicationChannel_nmo:hasParticipant_ID_ID" ON
         1771  +"nmo:CommunicationChannel_nmo:hasParticipant" ("nmo:hasParticipant",
         1772  +ID);
         1773  +CREATE INDEX "nmo:CommunicationChannel_nmo:lastMessageDate" ON
         1774  +"nmo:CommunicationChannel" ("nmo:lastMessageDate");
         1775  +CREATE UNIQUE INDEX "nmo:Email_nmo:contentMimeType_ID_ID" ON
         1776  +"nmo:Email_nmo:contentMimeType" (ID, "nmo:contentMimeType");
         1777  +CREATE UNIQUE INDEX "nmo:Message_nmo:bcc_ID_ID" ON
         1778  +"nmo:Message_nmo:bcc" (ID, "nmo:bcc");
         1779  +CREATE UNIQUE INDEX "nmo:Message_nmo:cc_ID_ID" ON "nmo:Message_nmo:cc"
         1780  +(ID, "nmo:cc");
         1781  +CREATE INDEX "nmo:Message_nmo:communicationChannel" ON "nmo:Message"
         1782  +("nmo:communicationChannel", "nmo:receivedDate");
         1783  +CREATE INDEX "nmo:Message_nmo:conversation" ON "nmo:Message"
         1784  +("nmo:conversation");
         1785  +CREATE INDEX "nmo:Message_nmo:from" ON "nmo:Message" ("nmo:from");
         1786  +CREATE UNIQUE INDEX "nmo:Message_nmo:hasAttachment_ID_ID" ON
         1787  +"nmo:Message_nmo:hasAttachment" (ID, "nmo:hasAttachment");
         1788  +CREATE UNIQUE INDEX "nmo:Message_nmo:inReplyTo_ID_ID" ON
         1789  +"nmo:Message_nmo:inReplyTo" (ID, "nmo:inReplyTo");
         1790  +CREATE UNIQUE INDEX "nmo:Message_nmo:messageHeader_ID_ID" ON
         1791  +"nmo:Message_nmo:messageHeader" (ID, "nmo:messageHeader");
         1792  +CREATE UNIQUE INDEX "nmo:Message_nmo:recipient_ID_ID" ON
         1793  +"nmo:Message_nmo:recipient" (ID, "nmo:recipient");
         1794  +CREATE UNIQUE INDEX "nmo:Message_nmo:references_ID_ID" ON
         1795  +"nmo:Message_nmo:references" (ID, "nmo:references");
         1796  +CREATE INDEX "nmo:Message_nmo:sender" ON "nmo:Message" ("nmo:sender");
         1797  +CREATE INDEX "nmo:Message_nmo:sentDate" ON "nmo:Message" ("nmo:sentDate");
         1798  +CREATE INDEX "nmo:Message_nmo:to_ID" ON "nmo:Message_nmo:to" (ID);
         1799  +CREATE UNIQUE INDEX "nmo:Message_nmo:to_ID_ID" ON "nmo:Message_nmo:to"
         1800  +("nmo:to", ID);
         1801  +CREATE UNIQUE INDEX "nmo:MimePart_nmo:mimeHeader_ID_ID" ON
         1802  +"nmo:MimePart_nmo:mimeHeader" (ID, "nmo:mimeHeader");
         1803  +CREATE UNIQUE INDEX "nmo:Multipart_nmo:partBoundary_ID_ID" ON
         1804  +"nmo:Multipart_nmo:partBoundary" (ID, "nmo:partBoundary");
         1805  +CREATE UNIQUE INDEX
         1806  +"nmo:PhoneMessageFolder_nmo:containsPhoneMessageFolder_ID_ID" ON
         1807  +"nmo:PhoneMessageFolder_nmo:containsPhoneMessageFolder" (ID,
         1808  +"nmo:containsPhoneMessageFolder");
         1809  +CREATE UNIQUE INDEX
         1810  +"nmo:PhoneMessageFolder_nmo:containsPhoneMessage_ID_ID" ON
         1811  +"nmo:PhoneMessageFolder_nmo:containsPhoneMessage" (ID,
         1812  +"nmo:containsPhoneMessage");
         1813  +CREATE UNIQUE INDEX "nmo:PhoneMessage_nmo:toVCard_ID_ID" ON
         1814  +"nmo:PhoneMessage_nmo:toVCard" (ID, "nmo:toVCard");
         1815  +CREATE UNIQUE INDEX "rdf:Property_rdfs:subPropertyOf_ID_ID" ON
         1816  +"rdf:Property_rdfs:subPropertyOf" (ID, "rdfs:subPropertyOf");
         1817  +CREATE UNIQUE INDEX "rdfs:Class_rdfs:subClassOf_ID_ID" ON
         1818  +"rdfs:Class_rdfs:subClassOf" (ID, "rdfs:subClassOf");
         1819  +CREATE UNIQUE INDEX "rdfs:Class_tracker:domainIndex_ID_ID" ON
         1820  +"rdfs:Class_tracker:domainIndex" (ID, "tracker:domainIndex");
         1821  +CREATE UNIQUE INDEX "rdfs:Resource_dc:contributor_ID_ID" ON
         1822  +"rdfs:Resource_dc:contributor" (ID, "dc:contributor");
         1823  +CREATE UNIQUE INDEX "rdfs:Resource_dc:date_ID_ID" ON
         1824  +"rdfs:Resource_dc:date" (ID, "dc:date");
         1825  +CREATE UNIQUE INDEX "rdfs:Resource_dc:relation_ID_ID" ON
         1826  +"rdfs:Resource_dc:relation" (ID, "dc:relation");
         1827  +CREATE UNIQUE INDEX "rdfs:Resource_dc:source_ID_ID" ON
         1828  +"rdfs:Resource_dc:source" (ID, "dc:source");
         1829  +CREATE UNIQUE INDEX "rdfs:Resource_nao:deprecated_ID_ID" ON
         1830  +"rdfs:Resource_nao:deprecated" (ID, "nao:deprecated");
         1831  +CREATE INDEX "rdfs:Resource_nao:hasTag_ID" ON "rdfs:Resource_nao:hasTag" (ID);
         1832  +CREATE UNIQUE INDEX "rdfs:Resource_nao:hasTag_ID_ID" ON
         1833  +"rdfs:Resource_nao:hasTag" ("nao:hasTag", ID);
         1834  +CREATE UNIQUE INDEX "rdfs:Resource_nao:isRelated_ID_ID" ON
         1835  +"rdfs:Resource_nao:isRelated" (ID, "nao:isRelated");
         1836  +CREATE UNIQUE INDEX "rdfs:Resource_rdf:type_ID_ID" ON
         1837  +"rdfs:Resource_rdf:type" (ID, "rdf:type");
         1838  +CREATE INDEX "rdfs:Resource_tracker:added" ON "rdfs:Resource" ("tracker:added");
         1839  +CREATE UNIQUE INDEX "scal:Attendee_scal:delegated-from_ID_ID" ON
         1840  +"scal:Attendee_scal:delegated-from" (ID, "scal:delegated-from");
         1841  +CREATE UNIQUE INDEX "scal:Attendee_scal:delegated-to_ID_ID" ON
         1842  +"scal:Attendee_scal:delegated-to" (ID, "scal:delegated-to");
         1843  +CREATE UNIQUE INDEX "scal:Attendee_scal:member_ID_ID" ON
         1844  +"scal:Attendee_scal:member" (ID, "scal:member");
         1845  +CREATE UNIQUE INDEX "scal:Attendee_scal:sent-by_ID_ID" ON
         1846  +"scal:Attendee_scal:sent-by" (ID, "scal:sent-by");
         1847  +CREATE UNIQUE INDEX "scal:CalendarAlarm_scal:alarmAttendee_ID_ID" ON
         1848  +"scal:CalendarAlarm_scal:alarmAttendee" (ID, "scal:alarmAttendee");
         1849  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:access_ID_ID" ON
         1850  +"scal:CalendarItem_scal:access" (ID, "scal:access");
         1851  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:attachment_ID_ID" ON
         1852  +"scal:CalendarItem_scal:attachment" (ID, "scal:attachment");
         1853  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:attendee_ID_ID" ON
         1854  +"scal:CalendarItem_scal:attendee" (ID, "scal:attendee");
         1855  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:belongsToCalendar_ID_ID"
         1856  +ON "scal:CalendarItem_scal:belongsToCalendar" (ID,
         1857  +"scal:belongsToCalendar");
         1858  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:contact_ID_ID" ON
         1859  +"scal:CalendarItem_scal:contact" (ID, "scal:contact");
         1860  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:rrule_ID_ID" ON
         1861  +"scal:CalendarItem_scal:rrule" (ID, "scal:rrule");
         1862  +CREATE INDEX "slo:GeoLocation_slo:postalAddress" ON "slo:GeoLocation"
         1863  +("slo:postalAddress");
         1864  +CREATE UNIQUE INDEX "slo:Landmark_slo:belongsToCategory_ID_ID" ON
         1865  +"slo:Landmark_slo:belongsToCategory" (ID, "slo:belongsToCategory");
         1866  +CREATE UNIQUE INDEX "slo:Landmark_slo:hasContact_ID_ID" ON
         1867  +"slo:Landmark_slo:hasContact" (ID, "slo:hasContact");
         1868  +CREATE UNIQUE INDEX "slo:Route_slo:routeDetails_ID_ID" ON
         1869  +"slo:Route_slo:routeDetails" (ID, "slo:routeDetails");
         1870  +
         1871  +EXPLAIN SELECT "1_u", (SELECT "nco:fullname" FROM "nco:Contact" WHERE
         1872  +ID = "1_u") COLLATE NOCASE, (SELECT "nco:nameFamily" FROM
         1873  +"nco:PersonContact" WHERE ID = "1_u") COLLATE NOCASE, (SELECT
         1874  +"nco:nameGiven" FROM "nco:PersonContact" WHERE ID = "1_u")
         1875  +COLLATE NOCASE, (SELECT "nco:nameAdditional" FROM
         1876  +"nco:PersonContact" WHERE ID = "1_u") COLLATE NOCASE, (SELECT
         1877  +"nco:nameHonorificPrefix" FROM "nco:PersonContact" WHERE ID =
         1878  +"1_u") COLLATE NOCASE, (SELECT "nco:nameHonorificSuffix" FROM
         1879  +"nco:PersonContact" WHERE ID = "1_u") COLLATE NOCASE, (SELECT
         1880  +"nco:nickname" FROM "nco:Contact" WHERE ID = "1_u") COLLATE
         1881  +NOCASE, strftime("%s",(SELECT "nco:birthDate" FROM
         1882  +"nco:Contact" WHERE ID = "1_u")), (SELECT "nie:url" FROM
         1883  +"nie:DataObject" WHERE ID = (SELECT "nco:photo" FROM
         1884  +"nco:Contact" WHERE ID = "1_u")) COLLATE NOCASE, (SELECT
         1885  +GROUP_CONCAT("2_u"||? COLLATE NOCASE||COALESCE((SELECT
         1886  +"nco:imProtocol" FROM "nco:IMAddress" WHERE ID = "3_u") COLLATE
         1887  +NOCASE, ? COLLATE NOCASE)||? COLLATE NOCASE||COALESCE((SELECT
         1888  +"nco:imID" FROM "nco:IMAddress" WHERE ID = "3_u") COLLATE
         1889  +NOCASE, ? COLLATE NOCASE)||? COLLATE NOCASE||COALESCE((SELECT
         1890  +"nco:imNickname" FROM "nco:IMAddress" WHERE ID = "3_u") COLLATE
         1891  +NOCASE, ? COLLATE NOCASE), '\n') FROM (SELECT
         1892  +"nco:PersonContact_nco:hasAffiliation2"."nco:hasAffiliation" AS
         1893  +"2_u", "nco:Role_nco:hasIMAddress3"."nco:hasIMAddress" AS
         1894  +"3_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1895  +"nco:PersonContact_nco:hasAffiliation2",
         1896  +"nco:Role_nco:hasIMAddress" AS "nco:Role_nco:hasIMAddress3" WHERE
         1897  +"1_u" = "nco:PersonContact_nco:hasAffiliation2"."ID" AND
         1898  +"nco:PersonContact_nco:hasAffiliation2"."nco:hasAffiliation" =
         1899  +"nco:Role_nco:hasIMAddress3"."ID")), (SELECT
         1900  +GROUP_CONCAT("2_u"||? COLLATE NOCASE||(SELECT "nco:phoneNumber"
         1901  +FROM "nco:PhoneNumber" WHERE ID = "4_u") COLLATE NOCASE, '\n')
         1902  +FROM (SELECT "nco:PersonContact_nco:hasAffiliation4"."nco:hasAffiliation"
         1903  +AS "2_u", "nco:Role_nco:hasPhoneNumber5"."nco:hasPhoneNumber" AS
         1904  +"4_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1905  +"nco:PersonContact_nco:hasAffiliation4",
         1906  +"nco:Role_nco:hasPhoneNumber" AS "nco:Role_nco:hasPhoneNumber5"
         1907  +WHERE "1_u" = "nco:PersonContact_nco:hasAffiliation4"."ID" AND
         1908  +"nco:PersonContact_nco:hasAffiliation4"."nco:hasAffiliation" =
         1909  +"nco:Role_nco:hasPhoneNumber5"."ID")), (SELECT
         1910  +GROUP_CONCAT("2_u"||? COLLATE NOCASE||(SELECT "nco:emailAddress"
         1911  +FROM "nco:EmailAddress" WHERE ID = "5_u") COLLATE NOCASE, ',')
         1912  +FROM (SELECT "nco:PersonContact_nco:hasAffiliation6"."nco:hasAffiliation"
         1913  +AS "2_u", "nco:Role_nco:hasEmailAddress7"."nco:hasEmailAddress"
         1914  +AS "5_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1915  +"nco:PersonContact_nco:hasAffiliation6",
         1916  +"nco:Role_nco:hasEmailAddress" AS "nco:Role_nco:hasEmailAddress7"
         1917  +WHERE "1_u" = "nco:PersonContact_nco:hasAffiliation6"."ID" AND
         1918  +"nco:PersonContact_nco:hasAffiliation6"."nco:hasAffiliation" =
         1919  +"nco:Role_nco:hasEmailAddress7"."ID")), (SELECT
         1920  +GROUP_CONCAT("2_u"||? COLLATE NOCASE||COALESCE((SELECT
         1921  +GROUP_CONCAT((SELECT Uri FROM Resource WHERE ID =
         1922  +"nco:blogUrl"),',') FROM "nco:Role_nco:blogUrl" WHERE ID =
         1923  +"2_u"), ? COLLATE NOCASE)||? COLLATE NOCASE||COALESCE((SELECT
         1924  +GROUP_CONCAT((SELECT Uri FROM Resource WHERE ID =
         1925  +"nco:websiteUrl"),',') FROM "nco:Role_nco:websiteUrl" WHERE ID =
         1926  +"2_u"), ? COLLATE NOCASE)||? COLLATE NOCASE||COALESCE((SELECT
         1927  +GROUP_CONCAT((SELECT Uri FROM Resource WHERE ID = "nco:url"),',')
         1928  +FROM "nco:Role_nco:url" WHERE ID = "2_u"), ? COLLATE NOCASE),
         1929  +'\n') FROM (SELECT
         1930  +"nco:PersonContact_nco:hasAffiliation8"."nco:hasAffiliation" AS
         1931  +"2_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1932  +"nco:PersonContact_nco:hasAffiliation8" WHERE "1_u" =
         1933  +"nco:PersonContact_nco:hasAffiliation8"."ID")), (SELECT
         1934  +GROUP_CONCAT("6_u", ',') FROM (SELECT
         1935  +"rdfs:Resource_nao:hasTag9"."nao:hasTag" AS "6_u" FROM
         1936  +"rdfs:Resource_nao:hasTag" AS "rdfs:Resource_nao:hasTag9" WHERE
         1937  +"1_u" = "rdfs:Resource_nao:hasTag9"."ID")), (SELECT Uri FROM
         1938  +Resource WHERE ID = "1_u"), (SELECT GROUP_CONCAT("2_u"||? COLLATE
         1939  +NOCASE||COALESCE((SELECT "nco:role" FROM "nco:Affiliation" WHERE
         1940  +ID = "2_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1941  +NOCASE||COALESCE((SELECT "nco:department" FROM "nco:Affiliation"
         1942  +WHERE ID = "2_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1943  +NOCASE||COALESCE((SELECT GROUP_CONCAT("nco:title",',') FROM
         1944  +"nco:Affiliation_nco:title" WHERE ID = "2_u"), ? COLLATE NOCASE),
         1945  +'\n') FROM (SELECT
         1946  +"nco:PersonContact_nco:hasAffiliation10"."nco:hasAffiliation" AS
         1947  +"2_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1948  +"nco:PersonContact_nco:hasAffiliation10" WHERE "1_u" =
         1949  +"nco:PersonContact_nco:hasAffiliation10"."ID")), (SELECT
         1950  +GROUP_CONCAT("nco:note",',') FROM "nco:Contact_nco:note" WHERE ID
         1951  += "1_u"), (SELECT "nco:gender" FROM "nco:PersonContact" WHERE ID
         1952  += "1_u"), (SELECT GROUP_CONCAT("2_u"||? COLLATE
         1953  +NOCASE||COALESCE((SELECT "nco:pobox" FROM "nco:PostalAddress"
         1954  +WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1955  +NOCASE||COALESCE((SELECT "nco:district" FROM "nco:PostalAddress"
         1956  +WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1957  +NOCASE||COALESCE((SELECT "nco:county" FROM "nco:PostalAddress"
         1958  +WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1959  +NOCASE||COALESCE((SELECT "nco:locality" FROM "nco:PostalAddress"
         1960  +WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1961  +NOCASE||COALESCE((SELECT "nco:postalcode" FROM
         1962  +"nco:PostalAddress" WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE
         1963  +NOCASE)||? COLLATE NOCASE||COALESCE((SELECT "nco:streetAddress"
         1964  +FROM "nco:PostalAddress" WHERE ID = "7_u") COLLATE NOCASE, ?
         1965  +COLLATE NOCASE)||? COLLATE NOCASE||COALESCE((SELECT Uri FROM
         1966  +Resource WHERE ID = (SELECT "nco:addressLocation" FROM
         1967  +"nco:PostalAddress" WHERE ID = "7_u")), ? COLLATE NOCASE)||?
         1968  +COLLATE NOCASE||COALESCE((SELECT "nco:extendedAddress" FROM
         1969  +"nco:PostalAddress" WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE
         1970  +NOCASE)||? COLLATE NOCASE||COALESCE((SELECT "nco:country" FROM
         1971  +"nco:PostalAddress" WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE
         1972  +NOCASE)||? COLLATE NOCASE||COALESCE((SELECT "nco:region" FROM
         1973  +"nco:PostalAddress" WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE
         1974  +NOCASE), '\n') FROM (SELECT
         1975  +"nco:PersonContact_nco:hasAffiliation11"."nco:hasAffiliation" AS
         1976  +"2_u", "nco:Role_nco:hasPostalAddress12"."nco:hasPostalAddress"
         1977  +AS "7_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1978  +"nco:PersonContact_nco:hasAffiliation11",
         1979  +"nco:Role_nco:hasPostalAddress" AS
         1980  +"nco:Role_nco:hasPostalAddress12" WHERE "1_u" =
         1981  +"nco:PersonContact_nco:hasAffiliation11"."ID" AND
         1982  +"nco:PersonContact_nco:hasAffiliation11"."nco:hasAffiliation" =
         1983  +"nco:Role_nco:hasPostalAddress12"."ID")), (SELECT
         1984  +GROUP_CONCAT("10_u" COLLATE NOCASE, ',') FROM (SELECT
         1985  +"nie:InformationElement_nao:hasProperty13"."nao:hasProperty" AS
         1986  +"8_u", "nao:Property14"."nao:propertyName" AS "9_u",
         1987  +"nao:Property14"."nao:propertyValue" AS "10_u" FROM
         1988  +"nie:InformationElement_nao:hasProperty" AS
         1989  +"nie:InformationElement_nao:hasProperty13", "nao:Property" AS
         1990  +"nao:Property14" WHERE "1_u" =
         1991  +"nie:InformationElement_nao:hasProperty13"."ID" AND
         1992  +"nie:InformationElement_nao:hasProperty13"."nao:hasProperty" =
         1993  +"nao:Property14"."ID" AND "9_u" IS NOT NULL AND "10_u" IS NOT
         1994  +NULL AND ("9_u" COLLATE NOCASE = ? COLLATE NOCASE))) FROM (SELECT
         1995  +"nco:PersonContact1"."ID" AS "1_u" FROM "nco:PersonContact" AS
         1996  +"nco:PersonContact1") ORDER BY "1_u";
         1997  +  }
         1998  +} {/.* Goto .*/}
         1999  +
         2000  +
         2001  +finish_test

Changes to test/shell1.test.

   170    170     list $rc \
   171    171          [regexp {Error: missing argument for option: -nullvalue} $res]
   172    172   } {1 1}
   173    173   
   174    174   # -version             show SQLite version
   175    175   do_test shell1-1.16.1 {
   176    176     set x [catchcmd "-version test.db" ""]
   177         -  regexp {0 \{3.\d.\d+ 20\d\d-[01]\d-\d\d \d\d:\d\d:\d\d [0-9a-f]+\}} $x 
   178         -} 1
          177  +} {/3.[0-9.]+ 20\d\d-[01]\d-\d\d \d\d:\d\d:\d\d [0-9a-f]+/}
   179    178   
   180    179   #----------------------------------------------------------------------------
   181    180   # Test cases shell1-2.*: Basic "dot" command token parsing.
   182    181   #
   183    182   
   184    183   # check first token handling
   185    184   do_test shell1-2.1.1 {
................................................................................
   280    279     # too many arguments
   281    280     catchcmd "test.db" ".bail OFF BAD"
   282    281   } {1 {Error: unknown command or invalid arguments:  "bail". Enter ".help" for help}}
   283    282   
   284    283   # .databases             List names and files of attached databases
   285    284   do_test shell1-3.3.1 {
   286    285     catchcmd "-csv test.db" ".databases"
   287         -} {/0 +.*main +.*test.db.*/}
          286  +} "/0 +.*main +[string map {/ .} [string range [pwd] 0 10]].*/"
   288    287   do_test shell1-3.3.2 {
   289    288     # too many arguments
   290    289     catchcmd "test.db" ".databases BAD"
   291    290   } {1 {Error: unknown command or invalid arguments:  "databases". Enter ".help" for help}}
   292    291   
   293    292   # .dump ?TABLE? ...      Dump the database in an SQL text format
   294    293   #                          If TABLE specified, only dump tables matching
................................................................................
   574    573     catchcmd "test.db" ".schema FOO"
   575    574   } {0 {}}
   576    575   do_test shell1-3.21.3 {
   577    576     # too many arguments
   578    577     catchcmd "test.db" ".schema FOO BAD"
   579    578   } {1 {Error: unknown command or invalid arguments:  "schema". Enter ".help" for help}}
   580    579   
          580  +do_test shell1-3.21.4 {
          581  +  catchcmd "test.db" {
          582  +     CREATE TABLE t1(x);
          583  +     CREATE VIEW v2 AS SELECT x+1 AS y FROM t1;
          584  +     CREATE VIEW v1 AS SELECT y+1 FROM v2;
          585  +  }
          586  +  catchcmd "test.db" ".schema"
          587  +} {0 {CREATE TABLE t1(x);
          588  +CREATE VIEW v2 AS SELECT x+1 AS y FROM t1;
          589  +CREATE VIEW v1 AS SELECT y+1 FROM v2;}}
          590  +db eval {DROP VIEW v1; DROP VIEW v2; DROP TABLE t1;}
          591  +
   581    592   # .separator STRING      Change separator used by output mode and .import
   582    593   do_test shell1-3.22.1 {
   583    594     catchcmd "test.db" ".separator"
   584    595   } {1 {Error: unknown command or invalid arguments:  "separator". Enter ".help" for help}}
   585    596   do_test shell1-3.22.2 {
   586    597     catchcmd "test.db" ".separator FOO"
   587    598   } {0 {}}

Changes to test/subquery.test.

   372    372                     GROUP BY c.x
   373    373                    HAVING avg(a.y) > avg(c.y))
   374    374         FROM t34 AS a
   375    375        GROUP BY a.x
   376    376        ORDER BY a.x;
   377    377     }
   378    378   } {106 4.5 0 1 107 4.0 1 0}
          379  +
          380  +do_test subquery-3.5.1 {
          381  +  execsql {
          382  +    CREATE TABLE t35a(x); INSERT INTO t35a VALUES(1),(2),(3);
          383  +    CREATE TABLE t35b(y); INSERT INTO t35b VALUES(98), (99);
          384  +    SELECT max((SELECT avg(y) FROM t35b)) FROM t35a;
          385  +  }
          386  +} {98.5}
          387  +do_test subquery-3.5.2 {
          388  +  execsql {
          389  +    SELECT max((SELECT count(y) FROM t35b)) FROM t35a;
          390  +  }
          391  +} {2}
          392  +do_test subquery-3.5.3 {
          393  +  execsql {
          394  +    SELECT max((SELECT count() FROM t35b)) FROM t35a;
          395  +  }
          396  +} {2}
          397  +do_test subquery-3.5.4 {
          398  +  catchsql {
          399  +    SELECT max((SELECT count(x) FROM t35b)) FROM t35a;
          400  +  }
          401  +} {1 {misuse of aggregate: count()}}
          402  +do_test subquery-3.5.5 {
          403  +  catchsql {
          404  +    SELECT max((SELECT count(x) FROM t35b)) FROM t35a;
          405  +  }
          406  +} {1 {misuse of aggregate: count()}}
          407  +do_test subquery-3.5.6 {
          408  +  catchsql {
          409  +    SELECT max((SELECT a FROM (SELECT count(x) AS a FROM t35b))) FROM t35a;
          410  +  }
          411  +} {1 {misuse of aggregate: count()}}
          412  +do_test subquery-3.5.7 {
          413  +  execsql {
          414  +    SELECT max((SELECT a FROM (SELECT count(y) AS a FROM t35b))) FROM t35a;
          415  +  }
          416  +} {2}
   379    417   
   380    418   
   381    419   #------------------------------------------------------------------
   382    420   # These tests - subquery-4.* - use the TCL statement cache to try 
   383    421   # and expose bugs to do with re-using statements that have been 
   384    422   # passed to sqlite3_reset().
   385    423   #