diff options
author | Jeff Ames | 2008-06-26 20:20:30 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-26 20:20:30 +0000 |
commit | d96caaa14e9e869e85eecc6b760221ad0579f68e (patch) | |
tree | ccb720f2b7df128d9db0285c58ee6cc63a291ba8 /OpenSim/Data/Base/BaseDatabaseConnector.cs | |
parent | Apply patch from bug #1605 -- Documentation for Data/SQLite. Thanks kerunix_... (diff) | |
download | opensim-SC_OLD-d96caaa14e9e869e85eecc6b760221ad0579f68e.zip opensim-SC_OLD-d96caaa14e9e869e85eecc6b760221ad0579f68e.tar.gz opensim-SC_OLD-d96caaa14e9e869e85eecc6b760221ad0579f68e.tar.bz2 opensim-SC_OLD-d96caaa14e9e869e85eecc6b760221ad0579f68e.tar.xz |
Apply patch from bug #1606 -- Documentation for Data/Null, Data/Base. Thanks kerunix_Flan!
Diffstat (limited to 'OpenSim/Data/Base/BaseDatabaseConnector.cs')
-rw-r--r-- | OpenSim/Data/Base/BaseDatabaseConnector.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/OpenSim/Data/Base/BaseDatabaseConnector.cs b/OpenSim/Data/Base/BaseDatabaseConnector.cs index 6988839..542004c 100644 --- a/OpenSim/Data/Base/BaseDatabaseConnector.cs +++ b/OpenSim/Data/Base/BaseDatabaseConnector.cs | |||
@@ -32,10 +32,17 @@ using System.Data.Common; | |||
32 | 32 | ||
33 | namespace OpenSim.Data.Base | 33 | namespace OpenSim.Data.Base |
34 | { | 34 | { |
35 | /// <summary> | ||
36 | /// | ||
37 | /// </summary> | ||
35 | public abstract class BaseDatabaseConnector | 38 | public abstract class BaseDatabaseConnector |
36 | { | 39 | { |
37 | protected string m_connectionString; | 40 | protected string m_connectionString; |
38 | 41 | ||
42 | /// <summary> | ||
43 | /// | ||
44 | /// </summary> | ||
45 | /// <param name="connectionString"></param> | ||
39 | public BaseDatabaseConnector(string connectionString) | 46 | public BaseDatabaseConnector(string connectionString) |
40 | { | 47 | { |
41 | m_connectionString = connectionString; | 48 | m_connectionString = connectionString; |
@@ -44,6 +51,14 @@ namespace OpenSim.Data.Base | |||
44 | public abstract DbConnection GetNewConnection(); | 51 | public abstract DbConnection GetNewConnection(); |
45 | public abstract string CreateParamName(string fieldName); | 52 | public abstract string CreateParamName(string fieldName); |
46 | 53 | ||
54 | /// <summary> | ||
55 | /// | ||
56 | /// </summary> | ||
57 | /// <param name="mapper"></param> | ||
58 | /// <param name="connection"></param> | ||
59 | /// <param name="fieldName"></param> | ||
60 | /// <param name="key"></param> | ||
61 | /// <returns></returns> | ||
47 | public DbCommand CreateSelectCommand(BaseTableMapper mapper, DbConnection connection, string fieldName, object key) | 62 | public DbCommand CreateSelectCommand(BaseTableMapper mapper, DbConnection connection, string fieldName, object key) |
48 | { | 63 | { |
49 | string table = mapper.TableName; | 64 | string table = mapper.TableName; |
@@ -61,6 +76,14 @@ namespace OpenSim.Data.Base | |||
61 | return command; | 76 | return command; |
62 | } | 77 | } |
63 | 78 | ||
79 | /// <summary> | ||
80 | /// | ||
81 | /// </summary> | ||
82 | /// <param name="mapper"></param> | ||
83 | /// <param name="command"></param> | ||
84 | /// <param name="fieldName"></param> | ||
85 | /// <param name="key"></param> | ||
86 | /// <returns></returns> | ||
64 | public string CreateCondition(BaseTableMapper mapper, DbCommand command, string fieldName, object key) | 87 | public string CreateCondition(BaseTableMapper mapper, DbCommand command, string fieldName, object key) |
65 | { | 88 | { |
66 | string keyFieldParamName = mapper.CreateParamName(fieldName); | 89 | string keyFieldParamName = mapper.CreateParamName(fieldName); |
@@ -73,6 +96,14 @@ namespace OpenSim.Data.Base | |||
73 | return String.Format("{0}={1}", fieldName, keyFieldParamName); | 96 | return String.Format("{0}={1}", fieldName, keyFieldParamName); |
74 | } | 97 | } |
75 | 98 | ||
99 | /// <summary> | ||
100 | /// | ||
101 | /// </summary> | ||
102 | /// <param name="mapper"></param> | ||
103 | /// <param name="connection"></param> | ||
104 | /// <param name="rowMapper"></param> | ||
105 | /// <param name="primaryKey"></param> | ||
106 | /// <returns></returns> | ||
76 | public DbCommand CreateUpdateCommand(BaseTableMapper mapper, DbConnection connection, object rowMapper, object primaryKey) | 107 | public DbCommand CreateUpdateCommand(BaseTableMapper mapper, DbConnection connection, object rowMapper, object primaryKey) |
77 | { | 108 | { |
78 | string table = mapper.TableName; | 109 | string table = mapper.TableName; |
@@ -105,6 +136,13 @@ namespace OpenSim.Data.Base | |||
105 | return command; | 136 | return command; |
106 | } | 137 | } |
107 | 138 | ||
139 | /// <summary> | ||
140 | /// | ||
141 | /// </summary> | ||
142 | /// <param name="mapper"></param> | ||
143 | /// <param name="connection"></param> | ||
144 | /// <param name="obj"></param> | ||
145 | /// <returns></returns> | ||
108 | public DbCommand CreateInsertCommand(BaseTableMapper mapper, DbConnection connection, object obj) | 146 | public DbCommand CreateInsertCommand(BaseTableMapper mapper, DbConnection connection, object obj) |
109 | { | 147 | { |
110 | string table = mapper.TableName; | 148 | string table = mapper.TableName; |
@@ -132,6 +170,11 @@ namespace OpenSim.Data.Base | |||
132 | return command; | 170 | return command; |
133 | } | 171 | } |
134 | 172 | ||
173 | /// <summary> | ||
174 | /// | ||
175 | /// </summary> | ||
176 | /// <param name="value"></param> | ||
177 | /// <returns></returns> | ||
135 | public virtual object ConvertToDbType(object value) | 178 | public virtual object ConvertToDbType(object value) |
136 | { | 179 | { |
137 | return value; | 180 | return value; |