diff options
author | Adam Frisby | 2007-06-01 23:53:02 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-01 23:53:02 +0000 |
commit | 14babaaeceded845f7dc88c03b145a43c799d47a (patch) | |
tree | 23345f630ac0cfe3510e7a64ccf13c65cf17282f /OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs | |
parent | * DB4o Storage provider is now well documented (diff) | |
download | opensim-SC-14babaaeceded845f7dc88c03b145a43c799d47a.zip opensim-SC-14babaaeceded845f7dc88c03b145a43c799d47a.tar.gz opensim-SC-14babaaeceded845f7dc88c03b145a43c799d47a.tar.bz2 opensim-SC-14babaaeceded845f7dc88c03b145a43c799d47a.tar.xz |
* MS-SQL Interface is now well documented (and probably defunct)
Diffstat (limited to 'OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs')
-rw-r--r-- | OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs index 0925df1..8362a1d 100644 --- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs +++ b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.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 | */ | ||
1 | using System; | 27 | using System; |
2 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
3 | using System.Text; | 29 | using System.Text; |
@@ -5,8 +31,14 @@ using OpenGrid.Framework.Data; | |||
5 | 31 | ||
6 | namespace OpenGrid.Framework.Data.MSSQL | 32 | namespace OpenGrid.Framework.Data.MSSQL |
7 | { | 33 | { |
34 | /// <summary> | ||
35 | /// A grid data interface for Microsoft SQL Server | ||
36 | /// </summary> | ||
8 | public class SqlGridData : IGridData | 37 | public class SqlGridData : IGridData |
9 | { | 38 | { |
39 | /// <summary> | ||
40 | /// Database manager | ||
41 | /// </summary> | ||
10 | private MSSqlManager database; | 42 | private MSSqlManager database; |
11 | 43 | ||
12 | /// <summary> | 44 | /// <summary> |
@@ -25,16 +57,32 @@ namespace OpenGrid.Framework.Data.MSSQL | |||
25 | database.Close(); | 57 | database.Close(); |
26 | } | 58 | } |
27 | 59 | ||
60 | /// <summary> | ||
61 | /// Returns the storage system name | ||
62 | /// </summary> | ||
63 | /// <returns>A string containing the storage system name</returns> | ||
28 | public string getName() | 64 | public string getName() |
29 | { | 65 | { |
30 | return "Sql OpenGridData"; | 66 | return "Sql OpenGridData"; |
31 | } | 67 | } |
32 | 68 | ||
69 | /// <summary> | ||
70 | /// Returns the storage system version | ||
71 | /// </summary> | ||
72 | /// <returns>A string containing the storage system version</returns> | ||
33 | public string getVersion() | 73 | public string getVersion() |
34 | { | 74 | { |
35 | return "0.1"; | 75 | return "0.1"; |
36 | } | 76 | } |
37 | 77 | ||
78 | /// <summary> | ||
79 | /// Returns a list of regions within the specified ranges | ||
80 | /// </summary> | ||
81 | /// <param name="a">minimum X coordinate</param> | ||
82 | /// <param name="b">minimum Y coordinate</param> | ||
83 | /// <param name="c">maximum X coordinate</param> | ||
84 | /// <param name="d">maximum Y coordinate</param> | ||
85 | /// <returns>An array of region profiles</returns> | ||
38 | public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d) | 86 | public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d) |
39 | { | 87 | { |
40 | return null; | 88 | return null; |
@@ -80,6 +128,11 @@ namespace OpenGrid.Framework.Data.MSSQL | |||
80 | return row; | 128 | return row; |
81 | } | 129 | } |
82 | 130 | ||
131 | /// <summary> | ||
132 | /// Adds a new specified region to the database | ||
133 | /// </summary> | ||
134 | /// <param name="profile">The profile to add</param> | ||
135 | /// <returns>A dataresponse enum indicating success</returns> | ||
83 | public DataResponse AddProfile(SimProfileData profile) | 136 | public DataResponse AddProfile(SimProfileData profile) |
84 | { | 137 | { |
85 | if (database.insertRow(profile)) | 138 | if (database.insertRow(profile)) |