diff options
author | Dr Scofield | 2008-06-27 23:03:39 +0000 |
---|---|---|
committer | Dr Scofield | 2008-06-27 23:03:39 +0000 |
commit | 748f72326d9a295958bc9ba63bbb1a5d39030ef7 (patch) | |
tree | 58f2c9a5f6b8ffab5ad3621070aa17cb1c1e3e6b /OpenSim/Data/SQLite/SQLiteRegionData.cs | |
parent | more warnings to go. (diff) | |
download | opensim-SC-748f72326d9a295958bc9ba63bbb1a5d39030ef7.zip opensim-SC-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.gz opensim-SC-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.bz2 opensim-SC-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.xz |
last round of warning squashing. calling it a day now.
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteRegionData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 86f4370..13d444e 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -1686,27 +1686,27 @@ namespace OpenSim.Data.SQLite | |||
1686 | /// </summary> | 1686 | /// </summary> |
1687 | /// <param name="dt">Data Table</param> | 1687 | /// <param name="dt">Data Table</param> |
1688 | /// <returns></returns> | 1688 | /// <returns></returns> |
1689 | private static string defineTable(DataTable dt) | 1689 | // private static string defineTable(DataTable dt) |
1690 | { | 1690 | // { |
1691 | string sql = "create table " + dt.TableName + "("; | 1691 | // string sql = "create table " + dt.TableName + "("; |
1692 | string subsql = String.Empty; | 1692 | // string subsql = String.Empty; |
1693 | foreach (DataColumn col in dt.Columns) | 1693 | // foreach (DataColumn col in dt.Columns) |
1694 | { | 1694 | // { |
1695 | if (subsql.Length > 0) | 1695 | // if (subsql.Length > 0) |
1696 | { | 1696 | // { |
1697 | // a map function would rock so much here | 1697 | // // a map function would rock so much here |
1698 | subsql += ",\n"; | 1698 | // subsql += ",\n"; |
1699 | } | 1699 | // } |
1700 | subsql += col.ColumnName + " " + sqliteType(col.DataType); | 1700 | // subsql += col.ColumnName + " " + sqliteType(col.DataType); |
1701 | if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0]) | 1701 | // if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0]) |
1702 | { | 1702 | // { |
1703 | subsql += " primary key"; | 1703 | // subsql += " primary key"; |
1704 | } | 1704 | // } |
1705 | } | 1705 | // } |
1706 | sql += subsql; | 1706 | // sql += subsql; |
1707 | sql += ")"; | 1707 | // sql += ")"; |
1708 | return sql; | 1708 | // return sql; |
1709 | } | 1709 | // } |
1710 | 1710 | ||
1711 | /*********************************************************************** | 1711 | /*********************************************************************** |
1712 | * | 1712 | * |
@@ -2083,32 +2083,32 @@ namespace OpenSim.Data.SQLite | |||
2083 | /// <param name="type">a Type</param> | 2083 | /// <param name="type">a Type</param> |
2084 | /// <returns>an sqliteType</returns> | 2084 | /// <returns>an sqliteType</returns> |
2085 | /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks> | 2085 | /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks> |
2086 | private static string sqliteType(Type type) | 2086 | // private static string sqliteType(Type type) |
2087 | { | 2087 | // { |
2088 | if (type == typeof (String)) | 2088 | // if (type == typeof (String)) |
2089 | { | 2089 | // { |
2090 | return "varchar(255)"; | 2090 | // return "varchar(255)"; |
2091 | } | 2091 | // } |
2092 | else if (type == typeof (Int32)) | 2092 | // else if (type == typeof (Int32)) |
2093 | { | 2093 | // { |
2094 | return "integer"; | 2094 | // return "integer"; |
2095 | } | 2095 | // } |
2096 | else if (type == typeof (Int64)) | 2096 | // else if (type == typeof (Int64)) |
2097 | { | 2097 | // { |
2098 | return "integer"; | 2098 | // return "integer"; |
2099 | } | 2099 | // } |
2100 | else if (type == typeof (Double)) | 2100 | // else if (type == typeof (Double)) |
2101 | { | 2101 | // { |
2102 | return "float"; | 2102 | // return "float"; |
2103 | } | 2103 | // } |
2104 | else if (type == typeof (Byte[])) | 2104 | // else if (type == typeof (Byte[])) |
2105 | { | 2105 | // { |
2106 | return "blob"; | 2106 | // return "blob"; |
2107 | } | 2107 | // } |
2108 | else | 2108 | // else |
2109 | { | 2109 | // { |
2110 | return "string"; | 2110 | // return "string"; |
2111 | } | 2111 | // } |
2112 | } | 2112 | // } |
2113 | } | 2113 | } |
2114 | } | 2114 | } |