diff options
author | Jeff Ames | 2008-06-26 01:12:28 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-26 01:12:28 +0000 |
commit | 8a0a0f9bb563f2cb7ec823587e13e3f4483d3a68 (patch) | |
tree | 2891fe56398b57e5e9a78fffea9f01c171594bf8 /OpenSim/Data/MySQL/MySQLManager.cs | |
parent | Separate POS classes into mutiple files. (diff) | |
download | opensim-SC_OLD-8a0a0f9bb563f2cb7ec823587e13e3f4483d3a68.zip opensim-SC_OLD-8a0a0f9bb563f2cb7ec823587e13e3f4483d3a68.tar.gz opensim-SC_OLD-8a0a0f9bb563f2cb7ec823587e13e3f4483d3a68.tar.bz2 opensim-SC_OLD-8a0a0f9bb563f2cb7ec823587e13e3f4483d3a68.tar.xz |
Add patch from bug #1596 - adds Doxygen documentation in OpenSim.Data.MySQL files. Thanks kerunix_Flan!
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLManager.cs | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 4b11739..7c3ed28 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -62,6 +62,7 @@ namespace OpenSim.Data.MySQL | |||
62 | /// <param name="username">The username logging into the database</param> | 62 | /// <param name="username">The username logging into the database</param> |
63 | /// <param name="password">The password for the user logging in</param> | 63 | /// <param name="password">The password for the user logging in</param> |
64 | /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param> | 64 | /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param> |
65 | /// <param name="port">The MySQL server port</param> | ||
65 | public MySQLManager(string hostname, string database, string username, string password, string cpooling, | 66 | public MySQLManager(string hostname, string database, string username, string password, string cpooling, |
66 | string port) | 67 | string port) |
67 | { | 68 | { |
@@ -71,11 +72,19 @@ namespace OpenSim.Data.MySQL | |||
71 | Initialise(s); | 72 | Initialise(s); |
72 | } | 73 | } |
73 | 74 | ||
75 | /// <summary> | ||
76 | /// Initialises and creates a new MySQL connection and maintains it. | ||
77 | /// </summary> | ||
78 | /// <param name="connect">connectionString</param> | ||
74 | public MySQLManager(String connect) | 79 | public MySQLManager(String connect) |
75 | { | 80 | { |
76 | Initialise(connect); | 81 | Initialise(connect); |
77 | } | 82 | } |
78 | 83 | ||
84 | /// <summary> | ||
85 | /// Initialises and creates a new MySQL connection and maintains it. | ||
86 | /// </summary> | ||
87 | /// <param name="connect">connectionString</param> | ||
79 | public void Initialise(String connect) | 88 | public void Initialise(String connect) |
80 | { | 89 | { |
81 | try | 90 | try |
@@ -103,6 +112,7 @@ namespace OpenSim.Data.MySQL | |||
103 | /// <summary> | 112 | /// <summary> |
104 | /// Get the connection being used | 113 | /// Get the connection being used |
105 | /// </summary> | 114 | /// </summary> |
115 | /// <returns>MySqlConnection Object</returns> | ||
106 | public MySqlConnection Connection | 116 | public MySqlConnection Connection |
107 | { | 117 | { |
108 | get { return dbcon; } | 118 | get { return dbcon; } |
@@ -184,13 +194,17 @@ namespace OpenSim.Data.MySQL | |||
184 | /// <summary> | 194 | /// <summary> |
185 | /// Execute a SQL statement stored in a resource, as a string | 195 | /// Execute a SQL statement stored in a resource, as a string |
186 | /// </summary> | 196 | /// </summary> |
187 | /// <param name="name"></param> | 197 | /// <param name="name">name of embedded resource</param> |
188 | public void ExecuteResourceSql(string name) | 198 | public void ExecuteResourceSql(string name) |
189 | { | 199 | { |
190 | MySqlCommand cmd = new MySqlCommand(getResourceString(name), dbcon); | 200 | MySqlCommand cmd = new MySqlCommand(getResourceString(name), dbcon); |
191 | cmd.ExecuteNonQuery(); | 201 | cmd.ExecuteNonQuery(); |
192 | } | 202 | } |
193 | 203 | ||
204 | /// <summary> | ||
205 | /// Execute a MySqlCommand | ||
206 | /// </summary> | ||
207 | /// <param name="sql">sql string to execute</param> | ||
194 | public void ExecuteSql(string sql) | 208 | public void ExecuteSql(string sql) |
195 | { | 209 | { |
196 | MySqlCommand cmd = new MySqlCommand(sql, dbcon); | 210 | MySqlCommand cmd = new MySqlCommand(sql, dbcon); |
@@ -536,6 +550,11 @@ namespace OpenSim.Data.MySQL | |||
536 | return retval; | 550 | return retval; |
537 | } | 551 | } |
538 | 552 | ||
553 | /// <summary> | ||
554 | /// Reads an avatar appearence from an active data reader | ||
555 | /// </summary> | ||
556 | /// <param name="reader">An active database reader</param> | ||
557 | /// <returns>An avatar appearence</returns> | ||
539 | public AvatarAppearance readAppearanceRow(IDataReader reader) | 558 | public AvatarAppearance readAppearanceRow(IDataReader reader) |
540 | { | 559 | { |
541 | AvatarAppearance appearance = null; | 560 | AvatarAppearance appearance = null; |
@@ -647,6 +666,7 @@ namespace OpenSim.Data.MySQL | |||
647 | /// <param name="firstText">Firstlife text</param> | 666 | /// <param name="firstText">Firstlife text</param> |
648 | /// <param name="profileImage">UUID for profile image</param> | 667 | /// <param name="profileImage">UUID for profile image</param> |
649 | /// <param name="firstImage">UUID for firstlife image</param> | 668 | /// <param name="firstImage">UUID for firstlife image</param> |
669 | /// <param name="webLoginKey">Ignored</param> | ||
650 | /// <returns>Success?</returns> | 670 | /// <returns>Success?</returns> |
651 | public bool insertUserRow(LLUUID uuid, string username, string lastname, string passwordHash, | 671 | public bool insertUserRow(LLUUID uuid, string username, string lastname, string passwordHash, |
652 | string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, | 672 | string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, |
@@ -718,7 +738,7 @@ namespace OpenSim.Data.MySQL | |||
718 | } | 738 | } |
719 | 739 | ||
720 | /// <summary> | 740 | /// <summary> |
721 | /// Creates a new user and inserts it into the database | 741 | /// Update user data into the database where User ID = uuid |
722 | /// </summary> | 742 | /// </summary> |
723 | /// <param name="uuid">User ID</param> | 743 | /// <param name="uuid">User ID</param> |
724 | /// <param name="username">First part of the login</param> | 744 | /// <param name="username">First part of the login</param> |
@@ -742,6 +762,7 @@ namespace OpenSim.Data.MySQL | |||
742 | /// <param name="firstText">Firstlife text</param> | 762 | /// <param name="firstText">Firstlife text</param> |
743 | /// <param name="profileImage">UUID for profile image</param> | 763 | /// <param name="profileImage">UUID for profile image</param> |
744 | /// <param name="firstImage">UUID for firstlife image</param> | 764 | /// <param name="firstImage">UUID for firstlife image</param> |
765 | /// <param name="webLoginKey">UUID for weblogin Key</param> | ||
745 | /// <returns>Success?</returns> | 766 | /// <returns>Success?</returns> |
746 | public bool updateUserRow(LLUUID uuid, string username, string lastname, string passwordHash, | 767 | public bool updateUserRow(LLUUID uuid, string username, string lastname, string passwordHash, |
747 | string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, | 768 | string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, |
@@ -810,7 +831,7 @@ namespace OpenSim.Data.MySQL | |||
810 | /// <summary> | 831 | /// <summary> |
811 | /// Inserts a new region into the database | 832 | /// Inserts a new region into the database |
812 | /// </summary> | 833 | /// </summary> |
813 | /// <param name="profile">The region to insert</param> | 834 | /// <param name="regiondata">The region to insert</param> |
814 | /// <returns>Success?</returns> | 835 | /// <returns>Success?</returns> |
815 | public bool insertRegion(RegionProfileData regiondata) | 836 | public bool insertRegion(RegionProfileData regiondata) |
816 | { | 837 | { |
@@ -914,7 +935,7 @@ namespace OpenSim.Data.MySQL | |||
914 | /// <summary> | 935 | /// <summary> |
915 | /// Delete a region from the database | 936 | /// Delete a region from the database |
916 | /// </summary> | 937 | /// </summary> |
917 | /// <param name="profile">The region to insert</param> | 938 | /// <param name="uuid">The region to delete</param> |
918 | /// <returns>Success?</returns> | 939 | /// <returns>Success?</returns> |
919 | //public bool deleteRegion(RegionProfileData regiondata) | 940 | //public bool deleteRegion(RegionProfileData regiondata) |
920 | public bool deleteRegion(string uuid) | 941 | public bool deleteRegion(string uuid) |
@@ -995,6 +1016,11 @@ namespace OpenSim.Data.MySQL | |||
995 | return returnval; | 1016 | return returnval; |
996 | } | 1017 | } |
997 | 1018 | ||
1019 | /// <summary> | ||
1020 | /// Create (or replace if existing) an avatar appearence | ||
1021 | /// </summary> | ||
1022 | /// <param name="appearance"></param> | ||
1023 | /// <returns>Succes?</returns> | ||
998 | public bool insertAppearanceRow(AvatarAppearance appearance) | 1024 | public bool insertAppearanceRow(AvatarAppearance appearance) |
999 | { | 1025 | { |
1000 | string sql = String.Empty; | 1026 | string sql = String.Empty; |