diff options
author | onefang | 2021-08-26 06:21:19 +1000 |
---|---|---|
committer | onefang | 2021-08-26 06:21:19 +1000 |
commit | cdfbb899f1112dab44d5490838765e9bd73bc60e (patch) | |
tree | 52cddd0b76e7ad8544a0ada533f91bb5fc402025 /OpenSim/Data/PGSQL/PGSQLRegionData.cs | |
parent | Still failing to reconnect for dbCount(), just set the fucking timeout to a y... (diff) | |
parent | Don't strip (OWNER) out of script error report. (diff) | |
download | opensim-SC-cdfbb899f1112dab44d5490838765e9bd73bc60e.zip opensim-SC-cdfbb899f1112dab44d5490838765e9bd73bc60e.tar.gz opensim-SC-cdfbb899f1112dab44d5490838765e9bd73bc60e.tar.bz2 opensim-SC-cdfbb899f1112dab44d5490838765e9bd73bc60e.tar.xz |
Merge branch 'switch' into Domme.
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLRegionData.cs')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLRegionData.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLRegionData.cs b/OpenSim/Data/PGSQL/PGSQLRegionData.cs index 1272e37..a58fc8a 100644 --- a/OpenSim/Data/PGSQL/PGSQLRegionData.cs +++ b/OpenSim/Data/PGSQL/PGSQLRegionData.cs | |||
@@ -114,6 +114,27 @@ namespace OpenSim.Data.PGSQL | |||
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | public RegionData GetSpecific(string regionName, UUID scopeID) | ||
118 | { | ||
119 | string sql = "select * from " + m_Realm + " where lower(\"regionName\") = lower(:regionName) "; | ||
120 | if (scopeID != UUID.Zero) | ||
121 | sql += " and \"ScopeID\" = :scopeID"; | ||
122 | |||
123 | using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString)) | ||
124 | using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) | ||
125 | { | ||
126 | cmd.Parameters.Add(m_database.CreateParameter("regionName", regionName)); | ||
127 | if (scopeID != UUID.Zero) | ||
128 | cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID)); | ||
129 | conn.Open(); | ||
130 | List<RegionData> ret = RunCommand(cmd); | ||
131 | if (ret.Count == 0) | ||
132 | return null; | ||
133 | |||
134 | return ret[0]; | ||
135 | } | ||
136 | } | ||
137 | |||
117 | public RegionData Get(int posX, int posY, UUID scopeID) | 138 | public RegionData Get(int posX, int posY, UUID scopeID) |
118 | { | 139 | { |
119 | // extend database search for maximum region size area | 140 | // extend database search for maximum region size area |