diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Data/PGSQL/PGSQLUserAccountData.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLUserAccountData.cs')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLUserAccountData.cs | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLUserAccountData.cs b/OpenSim/Data/PGSQL/PGSQLUserAccountData.cs index 0a68b23..64cfff0 100644 --- a/OpenSim/Data/PGSQL/PGSQLUserAccountData.cs +++ b/OpenSim/Data/PGSQL/PGSQLUserAccountData.cs | |||
@@ -42,13 +42,13 @@ namespace OpenSim.Data.PGSQL | |||
42 | { | 42 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | 45 | ||
46 | public PGSQLUserAccountData(string connectionString, string realm) : | 46 | public PGSQLUserAccountData(string connectionString, string realm) : |
47 | base(connectionString, realm, "UserAccount") | 47 | base(connectionString, realm, "UserAccount") |
48 | { | 48 | { |
49 | } | 49 | } |
50 | 50 | ||
51 | /* | 51 | /* |
52 | private string m_Realm; | 52 | private string m_Realm; |
53 | private List<string> m_ColumnNames = null; | 53 | private List<string> m_ColumnNames = null; |
54 | private PGSQLManager m_database; | 54 | private PGSQLManager m_database; |
@@ -122,7 +122,7 @@ namespace OpenSim.Data.PGSQL | |||
122 | { | 122 | { |
123 | cmd.Parameters.Add(m_database.CreateParameter("principalID", principalID)); | 123 | cmd.Parameters.Add(m_database.CreateParameter("principalID", principalID)); |
124 | cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID)); | 124 | cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID)); |
125 | 125 | ||
126 | conn.Open(); | 126 | conn.Open(); |
127 | using (NpgsqlDataReader result = cmd.ExecuteReader()) | 127 | using (NpgsqlDataReader result = cmd.ExecuteReader()) |
128 | { | 128 | { |
@@ -158,8 +158,8 @@ namespace OpenSim.Data.PGSQL | |||
158 | } | 158 | } |
159 | return null; | 159 | return null; |
160 | } | 160 | } |
161 | 161 | ||
162 | 162 | ||
163 | public override bool Store(UserAccountData data) | 163 | public override bool Store(UserAccountData data) |
164 | { | 164 | { |
165 | if (data.Data.ContainsKey("PrincipalID")) | 165 | if (data.Data.ContainsKey("PrincipalID")) |
@@ -214,7 +214,7 @@ namespace OpenSim.Data.PGSQL | |||
214 | catch (Exception e){ | 214 | catch (Exception e){ |
215 | m_log.ErrorFormat("[USER]: ERROR opened update user {0} ", e.Message); | 215 | m_log.ErrorFormat("[USER]: ERROR opened update user {0} ", e.Message); |
216 | } | 216 | } |
217 | 217 | ||
218 | 218 | ||
219 | if (conta < 1) | 219 | if (conta < 1) |
220 | { | 220 | { |
@@ -242,14 +242,14 @@ namespace OpenSim.Data.PGSQL | |||
242 | } | 242 | } |
243 | return true; | 243 | return true; |
244 | } | 244 | } |
245 | 245 | ||
246 | 246 | ||
247 | public bool Store(UserAccountData data, UUID principalID, string token) | 247 | public bool Store(UserAccountData data, UUID principalID, string token) |
248 | { | 248 | { |
249 | return false; | 249 | return false; |
250 | } | 250 | } |
251 | 251 | ||
252 | 252 | ||
253 | public bool SetDataItem(UUID principalID, string item, string value) | 253 | public bool SetDataItem(UUID principalID, string item, string value) |
254 | { | 254 | { |
255 | string sql = string.Format(@"update {0} set {1} = :{1} where ""UUID"" = :UUID", m_Realm, item); | 255 | string sql = string.Format(@"update {0} set {1} = :{1} where ""UUID"" = :UUID", m_Realm, item); |
@@ -299,7 +299,7 @@ namespace OpenSim.Data.PGSQL | |||
299 | 299 | ||
300 | string sql = ""; | 300 | string sql = ""; |
301 | UUID scope_id; | 301 | UUID scope_id; |
302 | UUID.TryParse(scopeID.ToString(), out scope_id); | 302 | UUID.TryParse(scopeID.ToString(), out scope_id); |
303 | 303 | ||
304 | using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString)) | 304 | using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString)) |
305 | using (NpgsqlCommand cmd = new NpgsqlCommand()) | 305 | using (NpgsqlCommand cmd = new NpgsqlCommand()) |
@@ -325,5 +325,10 @@ namespace OpenSim.Data.PGSQL | |||
325 | return DoQuery(cmd); | 325 | return DoQuery(cmd); |
326 | } | 326 | } |
327 | } | 327 | } |
328 | |||
329 | public UserAccountData[] GetUsersWhere(UUID scopeID, string where) | ||
330 | { | ||
331 | return null; | ||
332 | } | ||
328 | } | 333 | } |
329 | } | 334 | } |