123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Reflection;
- using System.Threading;
- using log4net;
- using OpenMetaverse;
- using OpenSim.Framework;
- #if CSharpSqlite
- using Community.CsharpSqlite.Sqlite;
- #else
- using Mono.Data.Sqlite;
- #endif
- namespace OpenSim.Data.SQLite
- {
-
-
-
- public class SQLiteAvatarData : SQLiteGenericTableHandler<AvatarBaseData>,
- IAvatarData
- {
- public SQLiteAvatarData(string connectionString, string realm) :
- base(connectionString, realm, "Avatar")
- {
- }
- public bool Delete(UUID principalID, string name)
- {
- using (SqliteCommand cmd = new SqliteCommand())
- {
- cmd.CommandText = String.Format("delete from {0} where `PrincipalID` = :PrincipalID and `Name` = :Name", m_Realm);
- cmd.Parameters.AddWithValue(":PrincipalID", principalID.ToString());
- cmd.Parameters.AddWithValue(":Name", name);
- if (ExecuteNonQuery(cmd, m_Connection) > 0)
- return true;
- }
- return false;
- }
- }
- }
|