diff options
author | mingchen | 2007-06-26 17:50:27 +0000 |
---|---|---|
committer | mingchen | 2007-06-26 17:50:27 +0000 |
commit | 8ff1d0968ff3c4173b036398359ef62a356ad2b2 (patch) | |
tree | 46e740c18866096e1c4f03e4a42cf7e0c0a4539c /OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs | |
parent | * Updated demo filter to show more common usage (as well as embedding multipl... (diff) | |
download | opensim-SC-8ff1d0968ff3c4173b036398359ef62a356ad2b2.zip opensim-SC-8ff1d0968ff3c4173b036398359ef62a356ad2b2.tar.gz opensim-SC-8ff1d0968ff3c4173b036398359ef62a356ad2b2.tar.bz2 opensim-SC-8ff1d0968ff3c4173b036398359ef62a356ad2b2.tar.xz |
*Added support for reservations in OpenGridServices (mysql only for now)
*SQL file coming soon (as soon as I can figure out how to get the
Diffstat (limited to 'OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs')
-rw-r--r-- | OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs index 76d3faf..53b3bdd 100644 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs +++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs | |||
@@ -241,6 +241,34 @@ namespace OpenGrid.Framework.Data.MySQL | |||
241 | } | 241 | } |
242 | 242 | ||
243 | /// <summary> | 243 | /// <summary> |
244 | /// Reads a reservation row from a database reader | ||
245 | /// </summary> | ||
246 | /// <param name="reader">An active database reader</param> | ||
247 | /// <returns>A reservation data object</returns> | ||
248 | public ReservationData readReservationRow(IDataReader reader) | ||
249 | { | ||
250 | ReservationData retval = new ReservationData(); | ||
251 | if (reader.Read()) | ||
252 | { | ||
253 | retval.gridRecvKey = (string)reader["gridRecvKey"]; | ||
254 | retval.gridSendKey = (string)reader["gridSendKey"]; | ||
255 | retval.reservationCompany = (string)reader["resCompany"]; | ||
256 | retval.reservationMaxX = (int)reader["resXMax"]; | ||
257 | retval.reservationMaxY = (int)reader["resYMax"]; | ||
258 | retval.reservationMinX = (int)reader["resXMin"]; | ||
259 | retval.reservationMinY = (int)reader["resYMin"]; | ||
260 | retval.reservationName = (string)reader["resName"]; | ||
261 | retval.status = (bool)reader["status"]; | ||
262 | retval.userUUID = new libsecondlife.LLUUID((string)reader["userUUID"]); | ||
263 | |||
264 | } | ||
265 | else | ||
266 | { | ||
267 | return null; | ||
268 | } | ||
269 | return retval; | ||
270 | } | ||
271 | /// <summary> | ||
244 | /// Reads an agent row from a database reader | 272 | /// Reads an agent row from a database reader |
245 | /// </summary> | 273 | /// </summary> |
246 | /// <param name="reader">An active database reader</param> | 274 | /// <param name="reader">An active database reader</param> |