[banshee] [Hyena.Data.Sqlite] Case-insensitive column checks
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Hyena.Data.Sqlite] Case-insensitive column checks
- Date: Sat, 15 May 2010 02:20:14 +0000 (UTC)
commit 8fc140a79683e321e56937c32cd5df7a012d3527
Author: Gabriel Burt <gabriel burt gmail com>
Date: Fri May 14 18:51:13 2010 -0700
[Hyena.Data.Sqlite] Case-insensitive column checks
.../Hyena.Data.Sqlite/HyenaSqliteConnection.cs | 2 +-
.../Hyena/Hyena.Data.Sqlite/SqliteModelProvider.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs b/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
index 976102d..99c6aa0 100644
--- a/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
+++ b/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
@@ -352,7 +352,7 @@ namespace Hyena.Data.Sqlite
{
Dictionary<string, string> schema = new Dictionary<string,string> ();
SchemaClosure (table_name, delegate (string column) {
- schema.Add (column, null);
+ schema.Add (column.ToLower (), null);
});
return schema;
}
diff --git a/src/Libraries/Hyena/Hyena.Data.Sqlite/SqliteModelProvider.cs b/src/Libraries/Hyena/Hyena.Data.Sqlite/SqliteModelProvider.cs
index 048ab8e..073467f 100644
--- a/src/Libraries/Hyena/Hyena.Data.Sqlite/SqliteModelProvider.cs
+++ b/src/Libraries/Hyena/Hyena.Data.Sqlite/SqliteModelProvider.cs
@@ -199,7 +199,7 @@ namespace Hyena.Data.Sqlite
IDictionary<string, string> schema = connection.GetSchema (TableName);
if (schema.Count > 0) {
foreach (DatabaseColumn column in columns) {
- if (!schema.ContainsKey (column.Name)) {
+ if (!schema.ContainsKey (column.Name.ToLower ())) {
AddColumnToTable (column.Schema);
}
if (column.Index != null && !connection.IndexExists (column.Index)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]