aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-06-02 00:37:31 +0000
committerAdam Frisby2007-06-02 00:37:31 +0000
commit55f7fe0ae3d979cb0988f385bfee27b8c7f75820 (patch)
treea180507b45bdf2492e9c08b9da6adbc830202409 /OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
parent* MS-SQL Interface is now well documented (and probably defunct) (diff)
downloadopensim-SC-55f7fe0ae3d979cb0988f385bfee27b8c7f75820.zip
opensim-SC-55f7fe0ae3d979cb0988f385bfee27b8c7f75820.tar.gz
opensim-SC-55f7fe0ae3d979cb0988f385bfee27b8c7f75820.tar.bz2
opensim-SC-55f7fe0ae3d979cb0988f385bfee27b8c7f75820.tar.xz
Dont want to do that again --- MySQL interface is now fully documented. Added little bit more documentation to the MSSQL interface.
Diffstat (limited to 'OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs')
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs55
1 files changed, 54 insertions, 1 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
index e047c6d..5c2e567 100644
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
@@ -1,3 +1,29 @@
1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*
26*/
1using System; 27using System;
2using System.Collections.Generic; 28using System.Collections.Generic;
3using System.Text; 29using System.Text;
@@ -5,8 +31,14 @@ using OpenGrid.Framework.Data;
5 31
6namespace OpenGrid.Framework.Data.MySQL 32namespace OpenGrid.Framework.Data.MySQL
7{ 33{
34 /// <summary>
35 /// A MySQL Interface for the Grid Server
36 /// </summary>
8 public class MySQLGridData : IGridData 37 public class MySQLGridData : IGridData
9 { 38 {
39 /// <summary>
40 /// MySQL Database Manager
41 /// </summary>
10 private MySQLManager database; 42 private MySQLManager database;
11 43
12 /// <summary> 44 /// <summary>
@@ -33,16 +65,32 @@ namespace OpenGrid.Framework.Data.MySQL
33 database.Close(); 65 database.Close();
34 } 66 }
35 67
68 /// <summary>
69 /// Returns the plugin name
70 /// </summary>
71 /// <returns>Plugin name</returns>
36 public string getName() 72 public string getName()
37 { 73 {
38 return "MySql OpenGridData"; 74 return "MySql OpenGridData";
39 } 75 }
40 76
77 /// <summary>
78 /// Returns the plugin version
79 /// </summary>
80 /// <returns>Plugin version</returns>
41 public string getVersion() 81 public string getVersion()
42 { 82 {
43 return "0.1"; 83 return "0.1";
44 } 84 }
45 85
86 /// <summary>
87 /// Returns all the specified region profiles within coordates -- coordinates are inclusive
88 /// </summary>
89 /// <param name="xmin">Minimum X coordinate</param>
90 /// <param name="ymin">Minimum Y coordinate</param>
91 /// <param name="xmax">Maximum X coordinate</param>
92 /// <param name="ymax">Maximum Y coordinate</param>
93 /// <returns></returns>
46 public SimProfileData[] GetProfilesInRange(uint xmin, uint ymin, uint xmax, uint ymax) 94 public SimProfileData[] GetProfilesInRange(uint xmin, uint ymin, uint xmax, uint ymax)
47 { 95 {
48 try 96 try
@@ -145,11 +193,16 @@ namespace OpenGrid.Framework.Data.MySQL
145 } 193 }
146 } 194 }
147 195
196 /// <summary>
197 /// Adds a new profile to the database
198 /// </summary>
199 /// <param name="profile">The profile to add</param>
200 /// <returns>Successful?</returns>
148 public DataResponse AddProfile(SimProfileData profile) 201 public DataResponse AddProfile(SimProfileData profile)
149 { 202 {
150 lock (database) 203 lock (database)
151 { 204 {
152 if (database.insertRow(profile)) 205 if (database.insertRegion(profile))
153 { 206 {
154 return DataResponse.RESPONSE_OK; 207 return DataResponse.RESPONSE_OK;
155 } 208 }