本文整理汇总了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();
}
示例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 );
}