// ========================================================
namespace Kerosene.ORM.Direct.Concrete
{
using Kerosene.ORM.Core;
using Kerosene.ORM.Core.Concrete;
using Kerosene.Tools;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Text;
// ====================================================
/// <summary>
/// Represents the characteristics of a generic ORACLE database engine, and the factory to create specific objects
/// adapted to it, in a direct connection scenario.
/// </summary>
public partial class KEngineOracleDirect : KEngineOracleBase, IKEngineDirect
{
/// <summary>
/// Creates a new generic direct ORACLE database engine.
/// </summary>
/// <param name="invariantName">The case insensitive invariant name of this engine.</param>
/// <param name="serverVersion">The server version or null if this information is not available.</param>
/// <param name="caseSensitive">Whether the identifiers in the database can be case sensitive or not.</param>
/// <param name="parameterPrefix">The default prefix to use when naming automatic parameters.</param>
/// <param name="positionalParameters">Whether parameters are treated as positional ones instead of by name.</param>
/// <param name="normalizedSkipTake"> Whether the dialect provides a normalized Skip/Take functionality or not.</param>
public KEngineOracleDirect(
string invariantName = "System.Data.OracleClient",
string serverVersion = null,
bool caseSensitive = true,
string parameterPrefix = ":",
bool positionalParameters = false,
bool normalizedSkipTake = false)
: base(invariantName, serverVersion, caseSensitive, parameterPrefix, positionalParameters, normalizedSkipTake) { }
/// <summary>
/// Returns a new instance that is a copy of this original one.
/// </summary>
public new KEngineOracleDirect Clone()
{
var cloned = new KEngineOracleDirect();
OnClone(cloned, null); return cloned;
}
IKEngineDirect IKEngineDirect.Clone()
{
return this.Clone();
}
IKEngine IKEngine.Clone()
{
return this.Clone();
}
object ICloneable.Clone()
{
return this.Clone();
}
/// <summary>
/// Returns a new instance that initially was a copy of this original one, but that then afterwards its
/// properties are modified using values of the matching entries in the settings dictionary, if any is
/// given.
/// </summary>
/// <param name="settings">An optional dictionary containing entries with the names of the properties whose
/// new values are obtained from the matching entries. The non-matching ones are just ignored.</param>
public new KEngineOracleDirect Clone(Dictionary<string, object> settings)
{
var cloned = new KEngineOracleDirect();
OnClone(cloned, settings); return cloned;
}
IKEngineDirect IKEngineDirect.Clone(Dictionary<string, object> settings)
{
return this.Clone(settings);
}
IKEngine IKEngine.Clone(Dictionary<string, object> settings)
{
return this.Clone(settings);
}
/// <summary>
/// Returns the string representation of this instance.
/// </summary>
public override string ToString()
{
var str = base.ToString() + "::Direct";
return str;
}
/// <summary>
/// Gets the provider factory associated with this engine.
/// </summary>
public DbProviderFactory ProviderFactory
{
get { return DbProviderFactories.GetFactory(InvariantName); }
}
}
}
// ========================================================