Complete PostGres from previous commit - (Not Tested)

Signed-off-by: Terry <terry@digiworldz.com>
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
0.9.1.1
Terry 2019-11-12 11:35:30 -05:00 committed by UbitUmarov
parent 2f79f463ea
commit 999a068172
1 changed files with 18 additions and 2 deletions

View File

@ -115,9 +115,25 @@ namespace OpenSim.Data.PGSQL
}
//BA MOD...
public RegionData GetSpecific(string regionName, UUID ScopeID)
public RegionData GetSpecific(string regionName, UUID scopeID)
{
return null;
string sql = "select * from " + m_Realm + " where lower(\"regionName\") = lower(:regionName) ";
if (scopeID != UUID.Zero)
sql += " and \"ScopeID\" = :scopeID";
using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString))
using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
{
cmd.Parameters.Add(m_database.CreateParameter("regionName", regionName));
if (scopeID != UUID.Zero)
cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID));
conn.Open();
List<RegionData> ret = RunCommand(cmd);
if (ret.Count == 0)
return null;
return ret[0];
}
}
public RegionData Get(int posX, int posY, UUID scopeID)