/* * ここのWriteは即書き込み */ public void Write(string _strKey, string _strValue) { //Debug.LogError (string.Format ("key:{0} value:{1}", _strKey, _strValue)); foreach (KVSData data in m_soDataKvs.list) { if (data.key.Equals(_strKey) == true) { data.value = _strValue; return; } } KVSData insert_data = new KVSData(); insert_data.key = _strKey; insert_data.value = _strValue; m_soDataKvs.list.Add(insert_data); return; /* * // オープンしてる前提 * string strQuery = "replace into kvs (key,value) values ('" + _strKey + "','" + _strValue + "');"; * if( m_bDebugLog ){ * Debug.Log( "DBKvs.Write:"+strQuery); * } * SQLiteQuery query = new SQLiteQuery(m_sqlDB , strQuery ); * query.Step(); * query.Release(); */ return; }
protected override void pickup_data(SQLiteQuery _qr) { KVSData data = new KVSData(); string strKey = _qr.GetString("key"); string strValue = _qr.GetString("value"); if (m_bDebugLog) { //Debug.Log( "key :" + strKey ); //Debug.Log( "value:" + strValue ); } data.key = strKey; data.value = strValue; data_list.Add(data); return; }