Hi
I made couple more patches for better Oracle support
SchemaLoader.TypeMapping.cs.patch - added two more oracle types
OracleSchemaLoader.cs.patch - avoid exception when trigger doesn't set any
field value
OracleSchemaLoader.Constraints.cs.patch - modified regular expression for
better guessing of field value in trigger
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
--- OracleSchemaLoader.Constraints.cs.old 2008-11-18 13:44:12.861011000 +0300
+++ OracleSchemaLoader.Constraints.cs 2008-11-18 13:46:36.810450800 +0300
@@ -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)
--- OracleSchemaLoader.cs.old 2008-11-18 13:44:33.063618800 +0300
+++ OracleSchemaLoader.cs 2008-11-18 11:53:55.796037200 +0300
@@ -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;
--- C:\Documents and Settings\e_kotlyarov\Ìîè äîêóìåíòû\work\dblinq2007-read-only\src\DbLinq\Vendor\Implementation\SchemaLoader.TypeMapping.cs.old 2008-11-17 15:57:38.262466800 +0300
+++ C:\Documents and Settings\e_kotlyarov\Ìîè äîêóìåíòû\work\dblinq2007-read-only\src\DbLinq\Vendor\Implementation\SchemaLoader.TypeMapping.cs 2008-11-17 15:58:16.137466800 +0300
@@ -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