C# Class SunSync.Models.CachedHash

ファイルを表示 Open project: qiniu/QSunSync Class Usage Examples

Public Methods

Method Description
BatchInsertOrUpdate ( List fileItems, SQLiteConnection hashDBConn ) : void

批量插入/更新记录,比逐个插入/更新方式速度更快,待操作的记录越多对比越明显

CreateCachedHashDB ( string localHashDBPath ) : void
GetAllItems ( SQLiteConnection hashDBConn ) : string>.Dictionary
GetAllKeys ( SQLiteConnection hashDBConn ) : List
GetCachedHashByLocalPath ( string localPath, SQLiteConnection localHashDB ) : CachedHash
InsertCachedHash ( string localPath, string etag, string lastModified, SQLiteConnection localHashDB ) : void
InsertOrUpdateCachedHash ( string localPath, string etag, string lastModified, SQLiteConnection localHashDB ) : void
UpdateCachedHash ( string localPath, string etag, string lastModified, SQLiteConnection localHashDB ) : void

Method Details

BatchInsertOrUpdate() public static method

批量插入/更新记录,比逐个插入/更新方式速度更快,待操作的记录越多对比越明显
public static BatchInsertOrUpdate ( List fileItems, SQLiteConnection hashDBConn ) : void
fileItems List
hashDBConn System.Data.SQLite.SQLiteConnection
return void

CreateCachedHashDB() public static method

public static CreateCachedHashDB ( string localHashDBPath ) : void
localHashDBPath string
return void

GetAllItems() public static method

public static GetAllItems ( SQLiteConnection hashDBConn ) : string>.Dictionary
hashDBConn System.Data.SQLite.SQLiteConnection
return string>.Dictionary

GetAllKeys() public static method

public static GetAllKeys ( SQLiteConnection hashDBConn ) : List
hashDBConn System.Data.SQLite.SQLiteConnection
return List

GetCachedHashByLocalPath() public static method

public static GetCachedHashByLocalPath ( string localPath, SQLiteConnection localHashDB ) : CachedHash
localPath string
localHashDB System.Data.SQLite.SQLiteConnection
return CachedHash

InsertCachedHash() public static method

public static InsertCachedHash ( string localPath, string etag, string lastModified, SQLiteConnection localHashDB ) : void
localPath string
etag string
lastModified string
localHashDB System.Data.SQLite.SQLiteConnection
return void

InsertOrUpdateCachedHash() public static method

public static InsertOrUpdateCachedHash ( string localPath, string etag, string lastModified, SQLiteConnection localHashDB ) : void
localPath string
etag string
lastModified string
localHashDB System.Data.SQLite.SQLiteConnection
return void

UpdateCachedHash() public static method

public static UpdateCachedHash ( string localPath, string etag, string lastModified, SQLiteConnection localHashDB ) : void
localPath string
etag string
lastModified string
localHashDB System.Data.SQLite.SQLiteConnection
return void