Pascal Craponne wrote:
> Also, if possible (just because I'm a big lazy guy), can you submit all
> changes in a single patch?
>
> So can you provide again a set of patches that I can check and apply?
Yes, here it is
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---
Index: DbLinq/Vendor/Implementation/SchemaLoader.TypeMapping.cs
===================================================================
--- DbLinq/Vendor/Implementation/SchemaLoader.TypeMapping.cs (revision 954)
+++ DbLinq/Vendor/Implementation/SchemaLoader.TypeMapping.cs (working copy)
@@ -1,4 +1,4 @@
-#region MIT license
+#region MIT license
//
// MIT license
//
@@ -98,6 +98,10 @@
case "text":
case "varchar":
case "varchar2":
+ case "clob": // oracle type
+ case "nclob": // oracle type
+ case "rowid": // oracle type
+ case "urowid": // oracle type
return typeof(String);
// bool
@@ -140,11 +144,13 @@
case "float":
case "float4":
case "real":
+ case "binary_float": // oracle type
return typeof(Single);
// double
case "double":
case "double precision":
+ case "binary_double": // oracle type
return typeof(Double);
// decimal
@@ -193,6 +199,8 @@
case "oid":
case "sytea":
case "mediumblob":
+ case "raw": // oracle type
+ case "long raw": // oracle type
return typeof(Byte[]);
// PostgreSQL, for example has an uuid type that can be mapped as a Guid
Index: DbLinq.Oracle/OracleSchemaLoader.Columns.cs
===================================================================
--- DbLinq.Oracle/OracleSchemaLoader.Columns.cs (revision 954)
+++ DbLinq.Oracle/OracleSchemaLoader.Columns.cs (working copy)
@@ -1,4 +1,4 @@
-#region MIT license
+#region MIT license
//
// MIT license
//
@@ -52,12 +52,19 @@
protected override IList<IDataTableColumn> ReadColumns(IDbConnection connectionString, string databaseName)
{
const string sql = @"
-SELECT owner, table_name, column_name, data_type, data_length, data_precision, data_scale, nullable
+SELECT owner, table_name, column_name,
+ case when data_type like 'TIMESTAMP%' then 'TIMESTAMP'
+ when data_type like 'INTERVAL%' then 'INTERVAL'
+ else data_type
+ end data_type ,
+ data_length, data_precision, data_scale, nullable
FROM all_tab_columns
WHERE table_name NOT LIKE '%$%'
AND table_name NOT LIKE 'LOGMNR%'
AND table_name NOT LIKE 'MVIEW%'
AND table_name NOT IN ('SQLPLUS_PRODUCT_PROFILE','HELP', 'PRODUCT_PRIVS')
+ -- skip nested table columns
+ AND data_type_owner is null
AND lower(owner) = :owner
ORDER BY table_name, column_id";
Index: DbLinq.Oracle/OracleSchemaLoader.cs
===================================================================
--- DbLinq.Oracle/OracleSchemaLoader.cs (revision 954)
+++ DbLinq.Oracle/OracleSchemaLoader.cs (working copy)
@@ -84,7 +84,7 @@
}
// custom type, this is a trigger
- else if (constraint.ConstraintType == "T")
+ else if (constraint.ConstraintType == "T" && constraint.ColumnName != null)
{
var column = table.Type.Columns.Where(c => c.Name == constraint.ColumnName).First();
column.Expression = constraint.Expression;
Index: DbLinq.Oracle/OracleSchemaLoader.Constraints.cs
===================================================================
--- DbLinq.Oracle/OracleSchemaLoader.Constraints.cs (revision 954)
+++ DbLinq.Oracle/OracleSchemaLoader.Constraints.cs (working copy)
@@ -63,7 +63,7 @@
return constraint;
}
- private static Regex TriggerMatch1 = new Regex(@".*SELECT\s+(?<exp>\S+)\s+INTO\s+\:new.(?<col>\S+)\s+FROM\s+DUAL.*",
+ private static Regex TriggerMatch1 = new Regex(@".*SELECT\s+(?<exp>\S+.*)\s+INTO\s+\:new.(?<col>\S+)\s+FROM\s+DUAL.*",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
protected bool MatchTrigger(Regex regex, string fullText, out string expression, out string column)
Index: DbLinq.Oracle/OracleSchemaLoader.Tables.cs
===================================================================
--- DbLinq.Oracle/OracleSchemaLoader.Tables.cs (revision 954)
+++ DbLinq.Oracle/OracleSchemaLoader.Tables.cs (working copy)
@@ -1,4 +1,4 @@
-#region MIT license
+#region MIT license
//
// MIT license
//
@@ -41,7 +41,12 @@
WHERE table_name NOT LIKE '%$%'
AND table_name NOT LIKE 'LOGMNR%'
AND table_name NOT IN ('SQLPLUS_PRODUCT_PROFILE','HELP')
-and lower(owner) = :owner";
+and lower(owner) = :owner
+UNION
+SELECT view_name, owner
+FROM all_views
+WHERE lower(owner) = :owner
+";
return DataCommand.Find<IDataName>(connectionString, sql, ":owner", databaseName.ToLower(), ReadDataNameAndSchema);
}