1

Resolved

DbSettings changes for Oracle support

description

public class DbSettings
{
...
public static DbSettings Oracle;
 
Oracle = new OracleDbSettings
{
firstNameEscapeSymbol = @"""",
secondNameEscapeSymbol = @"""",
paramPrefix = ":p_"
};
}
 
Change DbSettings.GetEscapedName to virtual and then:
 
internal class OracleDbSettings : DbSettings
{
public override string GetEscapedName(string name)
{
  if (name.Contains(' ') || !string.IsNullOrEmpty(name) && char.IsDigit(name.First()))
    return firstNameEscapeSymbol + name.ToUpper() + secondNameEscapeSymbol;
  else
    return name;
}
}

comments