aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTerry2019-11-12 11:35:30 -0500
committerUbitUmarov2019-11-14 05:28:57 +0000
commit999a0681723f018b9ce85c70e9734226792c0b7b (patch)
treef5c3d5b6d949781ff0e52660b4376e9a1b476af0 /OpenSim
parentAttempt to fix the issue where, when logging into the grid, the user supplies... (diff)
downloadopensim-SC-999a0681723f018b9ce85c70e9734226792c0b7b.zip
opensim-SC-999a0681723f018b9ce85c70e9734226792c0b7b.tar.gz
opensim-SC-999a0681723f018b9ce85c70e9734226792c0b7b.tar.bz2
opensim-SC-999a0681723f018b9ce85c70e9734226792c0b7b.tar.xz
Complete PostGres from previous commit - (Not Tested)
Signed-off-by: Terry <terry@digiworldz.com> Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/PGSQL/PGSQLRegionData.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLRegionData.cs b/OpenSim/Data/PGSQL/PGSQLRegionData.cs
index a5d2266..adea2e0 100644
--- a/OpenSim/Data/PGSQL/PGSQLRegionData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLRegionData.cs
@@ -115,9 +115,25 @@ namespace OpenSim.Data.PGSQL
115 } 115 }
116 116
117 //BA MOD... 117 //BA MOD...
118 public RegionData GetSpecific(string regionName, UUID ScopeID) 118 public RegionData GetSpecific(string regionName, UUID scopeID)
119 { 119 {
120 return null; 120 string sql = "select * from " + m_Realm + " where lower(\"regionName\") = lower(:regionName) ";
121 if (scopeID != UUID.Zero)
122 sql += " and \"ScopeID\" = :scopeID";
123
124 using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString))
125 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
126 {
127 cmd.Parameters.Add(m_database.CreateParameter("regionName", regionName));
128 if (scopeID != UUID.Zero)
129 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID));
130 conn.Open();
131 List<RegionData> ret = RunCommand(cmd);
132 if (ret.Count == 0)
133 return null;
134
135 return ret[0];
136 }
121 } 137 }
122 138
123 public RegionData Get(int posX, int posY, UUID scopeID) 139 public RegionData Get(int posX, int posY, UUID scopeID)