当前位置: 首页>>代码示例>>C#>>正文


C# Schema.Clear方法代码示例

本文整理汇总了C#中Schema.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# Schema.Clear方法的具体用法?C# Schema.Clear怎么用?C# Schema.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Schema的用法示例。


在下文中一共展示了Schema.Clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: sqlite3SchemaClear

    /*
    ** Free all resources held by the schema structure. The void* argument points
    ** at a Schema struct. This function does not call sqlite3DbFree(db, ) on the
    ** pointer itself, it just cleans up subsidiary resources (i.e. the contents
    ** of the schema hash tables).
    **
    ** The Schema.cache_size variable is not cleared.
    */
    static void sqlite3SchemaClear( Schema p )
    {
      Hash temp1;
      Hash temp2;
      HashElem pElem;
      Schema pSchema = p;

      temp1 = pSchema.tblHash;
      temp2 = pSchema.trigHash;
      sqlite3HashInit( pSchema.trigHash );
      sqlite3HashClear( pSchema.idxHash );
      for ( pElem = sqliteHashFirst( temp2 ); pElem != null; pElem = sqliteHashNext( pElem ) )
      {
        Trigger pTrigger = (Trigger)sqliteHashData( pElem );
        sqlite3DeleteTrigger( null, ref pTrigger );
      }
      sqlite3HashClear( temp2 );
      sqlite3HashInit( pSchema.trigHash );
      for ( pElem = temp1.first; pElem != null; pElem = pElem.next )//sqliteHashFirst(&temp1); pElem; pElem = sqliteHashNext(pElem))
      {
        Table pTab = (Table)pElem.data; //sqliteHashData(pElem);
        sqlite3DeleteTable( null, ref pTab );
      }
      sqlite3HashClear( temp1 );
      sqlite3HashClear( pSchema.fkeyHash );
      pSchema.pSeqTab = null;
      if ( ( pSchema.flags & DB_SchemaLoaded ) != 0 )
      {
        pSchema.iGeneration++;
        pSchema.flags = (u16)( pSchema.flags & ( ~DB_SchemaLoaded ) );
      }
      p.Clear();
    }
开发者ID:z0rg1nc,项目名称:CsharpSqliteFork,代码行数:41,代码来源:callback_c.cs

示例2: sqlite3SchemaFree

        /*
        ** Free all resources held by the schema structure. The void* argument points
        ** at a Schema struct. This function does not call sqlite3DbFree(db, ) on the
        ** pointer itself, it just cleans up subsiduary resources (i.e. the contents
        ** of the schema hash tables).
        **
        ** The Schema.cache_size variable is not cleared.
        */
        static void sqlite3SchemaFree( Schema p )
        {
            p.Clear();
              //Hash temp1;
              //Hash temp2;
              //HashElem pElem;
              //Schema pSchema = p;

              //temp1 = pSchema.tblHash;
              //temp2 = pSchema.trigHash;
              //sqlite3HashInit( pSchema.trigHash );
              //sqlite3HashClear( pSchema.idxHash );
              //for ( pElem = sqliteHashFirst( temp2 ); pElem != null; pElem = sqliteHashNext( pElem ) )
              //{
              //  Trigger pTrigger = (Trigger)sqliteHashData( pElem );
              //  sqlite3DeleteTrigger( null, ref pTrigger );
              //}
              //sqlite3HashClear( temp2 );
              //sqlite3HashInit( pSchema.trigHash );
              //for ( pElem = temp1.first; pElem != null; pElem = pElem.next )//sqliteHashFirst(&temp1); pElem; pElem = sqliteHashNext(pElem))
              //{
              //  Table pTab = (Table)pElem.data; //sqliteHashData(pElem);
              //  sqlite3DeleteTable(null, ref pTab );
              //}
              //sqlite3HashClear( temp1 );
              //sqlite3HashClear( pSchema.fkeyHash );
              //pSchema.pSeqTab = null;
              //pSchema.flags = (u16)( pSchema.flags & ~DB_SchemaLoaded );
        }
开发者ID:taxilian,项目名称:some_library,代码行数:37,代码来源:callback_c.cs


注:本文中的Schema.Clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。