C# 클래스 Amazon.CognitoSync.SyncManager.Internal.SQLiteLocalStorage

An implementation for Amazon.CognitoSync.SyncManager.ILocalStorage using SQLite
상속: ILocalStorage
파일 보기 프로젝트 열기: aws/aws-sdk-net 1 사용 예제들

공개 메소드들

메소드 설명
CacheIdentity ( string key, string identity ) : void

cache the identity

ChangeIdentityId ( string oldIdentityId, string newIdentityId ) : void

Reparents all datasets from old identity id to a new one.

ConditionallyPutRecords ( String identityId, String datasetName, List records, List localRecords ) : void

Puts a list of raw records into that dataset if the local version hasn't changed (to be used in synchronizations).

CreateDataset ( string identityId, string datasetName ) : void

Create a dataset

DeleteCachedIdentity ( string key ) : void

Delete the cached identity id

DeleteDataset ( string identityId, string datasetName ) : void

Deletes a dataset. All the records associated with dataset are cleared and dataset is marked as deleted for future sync.

Dispose ( ) : void

Releases the resources consumed by this object

GetDatasetMetadata ( string identityId ) : List

Gets a list of dataset's metadata information.

GetLastSyncCount ( string identityId, string datasetName ) : long

Retrieves the last sync count. This sync count is a counter that represents when the last sync happened. The counter should be updated on a successful sync.

GetModifiedRecords ( string identityId, string datasetName ) : List

Retrieves a list of locally modified records since last successful sync operation.

GetRecord ( string identityId, string datasetName, string key ) : Record

Gets a raw record from local store. If the dataset/key combo doesn't // exist, null will be returned.

GetRecords ( string identityId, string datasetName ) : List

Gets a list of all records.

GetValue ( string identityId, string datasetName, string key ) : string

Retrieves the string value of a key in dataset. The value can be null when the record doesn't exist or is marked as deleted.

GetValueMap ( string identityId, string datasetName ) : string>.Dictionary

Retrieves a key-value map from dataset, excluding marked as deleted values.

PurgeDataset ( string identityId, string datasetName ) : void

This is different from DeleteDataset(String,String). Not only does it clears all records in the dataset, it also remove it from metadata table. It won't be visible in GetDatasetMetadata(String,String).

PutAllValues ( string identityId, string datasetName, string>.IDictionary values ) : void

Puts a key-value map into a dataset. This is optimized for batch operation. It's the preferred way to put a list of records into dataset.

PutRecords ( string identityId, string datasetName, List records ) : void

Puts a list of raw records into dataset.

PutValue ( string identityId, string datasetName, string key, string value ) : void

Puts the value of a key in dataset. If a new value is assigned to the key, the record is marked as dirty. If the value is null, then the record is marked as deleted. The changed record will be synced with remote storage.

SQLiteLocalStorage ( ) : Mono.Data.Sqlite

An implementation for Amazon.CognitoSync.SyncManager.ILocalStorage using SQLite

SQLiteLocalStorage ( ) : System

Creates a new instance of SQLiteLocalStorage

UpdateDatasetMetadata ( string identityId, List datasetMetadata ) : void

Updates local dataset metadata

UpdateLastModifiedTimestamp ( string identityId, string datasetName ) : void

Updates the last modified timestamp

UpdateLastSyncCount ( string identityId, string datasetName, long lastSyncCount ) : void

Updates the last sync count after successful sync with the remote data store.

WipeData ( ) : void

Wipes all locally cached data including dataset metadata and records. All opened dataset handler should not perform further operations to avoid inconsistent state.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Implements the Dispose pattern

비공개 메소드들

메소드 설명
BindData ( SQLiteCommand command ) : void
BindData ( SQLitePCL.sqlite3_stmt statement ) : void
BindData ( SqliteCommand command ) : void
CreateDatasetHelper ( string query ) : void
DatasetMetadataFromReader ( SqliteDataReader reader ) : DatasetMetadata
DeleteDataset ( string identityId, string datasetName, List additionalStatements ) : void
Execute ( string query ) : void
ExecuteMultipleHelper ( List statements ) : void
ExecuteQuery ( string query ) : SQLitePCL.sqlite3_stmt
GetColumnValue ( SQLitePCL.sqlite3_stmt stmt, Type t, string columnName ) : object
GetCommonDatasetNames ( string oldIdentityId, string newIdentityId ) : HashSet
GetDatasetMetadata ( string identityId, string datasetName ) : DatasetMetadata
GetDatasetMetadataHelper ( string query ) : List
GetIdentity ( string key ) : string
GetLastSyncCountHelper ( string query ) : long
GetMetadataHelper ( string identityId, string datasetName ) : DatasetMetadata
GetModifiedRecordsHelper ( string query ) : List
GetRecordHelper ( string query ) : Record
GetRecordsHelper ( string query ) : List
PutValueHelper ( string identityId, string datasetName, string key, string value ) : bool
RecordFromReader ( SqliteDataReader reader ) : Record
SetupDatabase ( ) : void
SqliteStmtToDatasetMetadata ( SQLiteDataReader reader ) : DatasetMetadata
SqliteStmtToDatasetMetadata ( SQLitePCL.sqlite3_stmt stmt ) : DatasetMetadata
SqliteStmtToRecord ( SQLiteDataReader reader ) : Record
SqliteStmtToRecord ( SQLitePCL.sqlite3_stmt stmt ) : Record
ToUtf8 ( string sText ) : byte[]
UpdateDatasetMetadataInternal ( string identityId, DatasetMetadata metadata ) : bool
UpdateLastModifiedTimestampHelper ( string query ) : void
UpdateLastSyncCountHelper ( string query ) : void
UpdateOrInsertRecord ( string identityId, string datasetName, Record record ) : void

메소드 상세

CacheIdentity() 공개 메소드

cache the identity
public CacheIdentity ( string key, string identity ) : void
key string
identity string
리턴 void

ChangeIdentityId() 공개 메소드

Reparents all datasets from old identity id to a new one.
public ChangeIdentityId ( string oldIdentityId, string newIdentityId ) : void
oldIdentityId string Old identity identifier.
newIdentityId string New identity identifier.
리턴 void

ConditionallyPutRecords() 공개 메소드

Puts a list of raw records into that dataset if the local version hasn't changed (to be used in synchronizations).
public ConditionallyPutRecords ( String identityId, String datasetName, List records, List localRecords ) : void
identityId String Identity id.
datasetName String Dataset name.
records List A list of remote records to compare with
localRecords List A list of records to check for changes.
리턴 void

CreateDataset() 공개 메소드

Create a dataset
public CreateDataset ( string identityId, string datasetName ) : void
identityId string Identity Id
datasetName string Dataset name.
리턴 void

DeleteCachedIdentity() 공개 메소드

Delete the cached identity id
public DeleteCachedIdentity ( string key ) : void
key string
리턴 void

DeleteDataset() 공개 메소드

Deletes a dataset. All the records associated with dataset are cleared and dataset is marked as deleted for future sync.
public DeleteDataset ( string identityId, string datasetName ) : void
identityId string Identity identifier.
datasetName string Dataset name.
리턴 void

Dispose() 공개 메소드

Releases the resources consumed by this object
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Implements the Dispose pattern
protected Dispose ( bool disposing ) : void
disposing bool Whether this object is being disposed via a call to Dispose /// or garbage collected.
리턴 void

GetDatasetMetadata() 공개 메소드

Gets a list of dataset's metadata information.
public GetDatasetMetadata ( string identityId ) : List
identityId string Identity identifier.
리턴 List

GetLastSyncCount() 공개 메소드

Retrieves the last sync count. This sync count is a counter that represents when the last sync happened. The counter should be updated on a successful sync.
public GetLastSyncCount ( string identityId, string datasetName ) : long
identityId string Identity identifier.
datasetName string Dataset name.
리턴 long

GetModifiedRecords() 공개 메소드

Retrieves a list of locally modified records since last successful sync operation.
public GetModifiedRecords ( string identityId, string datasetName ) : List
identityId string Identity identifier.
datasetName string Dataset name.
리턴 List

GetRecord() 공개 메소드

Gets a raw record from local store. If the dataset/key combo doesn't // exist, null will be returned.
public GetRecord ( string identityId, string datasetName, string key ) : Record
identityId string Identity identifier.
datasetName string Dataset name.
key string Key for the record.
리턴 Amazon.CognitoSync.SyncManager.Record

GetRecords() 공개 메소드

Gets a list of all records.
public GetRecords ( string identityId, string datasetName ) : List
identityId string Identity identifier.
datasetName string Dataset name.
리턴 List

GetValue() 공개 메소드

Retrieves the string value of a key in dataset. The value can be null when the record doesn't exist or is marked as deleted.
public GetValue ( string identityId, string datasetName, string key ) : string
identityId string Identity identifier.
datasetName string Dataset name.
key string record key.
리턴 string

GetValueMap() 공개 메소드

Retrieves a key-value map from dataset, excluding marked as deleted values.
public GetValueMap ( string identityId, string datasetName ) : string>.Dictionary
identityId string Identity identifier.
datasetName string Dataset name.
리턴 string>.Dictionary

PurgeDataset() 공개 메소드

This is different from DeleteDataset(String,String). Not only does it clears all records in the dataset, it also remove it from metadata table. It won't be visible in GetDatasetMetadata(String,String).
public PurgeDataset ( string identityId, string datasetName ) : void
identityId string Identity identifier.
datasetName string Dataset name.
리턴 void

PutAllValues() 공개 메소드

Puts a key-value map into a dataset. This is optimized for batch operation. It's the preferred way to put a list of records into dataset.
public PutAllValues ( string identityId, string datasetName, string>.IDictionary values ) : void
identityId string Identity identifier.
datasetName string Dataset name.
values string>.IDictionary a key-value map.
리턴 void

PutRecords() 공개 메소드

Puts a list of raw records into dataset.
public PutRecords ( string identityId, string datasetName, List records ) : void
identityId string Identity identifier.
datasetName string Dataset name.
records List A list of Records.
리턴 void

PutValue() 공개 메소드

Puts the value of a key in dataset. If a new value is assigned to the key, the record is marked as dirty. If the value is null, then the record is marked as deleted. The changed record will be synced with remote storage.
public PutValue ( string identityId, string datasetName, string key, string value ) : void
identityId string Identity identifier.
datasetName string Dataset name.
key string record key.
value string string value. If null, the record is marked as deleted.
리턴 void

SQLiteLocalStorage() 공개 메소드

An implementation for Amazon.CognitoSync.SyncManager.ILocalStorage using SQLite
public SQLiteLocalStorage ( ) : Mono.Data.Sqlite
리턴 Mono.Data.Sqlite

SQLiteLocalStorage() 공개 메소드

Creates a new instance of SQLiteLocalStorage
public SQLiteLocalStorage ( ) : System
리턴 System

UpdateDatasetMetadata() 공개 메소드

Updates local dataset metadata
public UpdateDatasetMetadata ( string identityId, List datasetMetadata ) : void
identityId string Identity identifier.
datasetMetadata List Dataset metadata.
리턴 void

UpdateLastModifiedTimestamp() 공개 메소드

Updates the last modified timestamp
public UpdateLastModifiedTimestamp ( string identityId, string datasetName ) : void
identityId string Identity Identifier.
datasetName string Dataset name.
리턴 void

UpdateLastSyncCount() 공개 메소드

Updates the last sync count after successful sync with the remote data store.
public UpdateLastSyncCount ( string identityId, string datasetName, long lastSyncCount ) : void
identityId string Identity identifier.
datasetName string Dataset name.
lastSyncCount long Last sync count.
리턴 void

WipeData() 공개 메소드

Wipes all locally cached data including dataset metadata and records. All opened dataset handler should not perform further operations to avoid inconsistent state.
public WipeData ( ) : void
리턴 void