本文整理汇总了C#中Dialect.Dialect类的典型用法代码示例。如果您正苦于以下问题:C# Dialect.Dialect类的具体用法?C# Dialect.Dialect怎么用?C# Dialect.Dialect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Dialect.Dialect类属于命名空间,在下文中一共展示了Dialect.Dialect类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MappingRootBinder
public MappingRootBinder(Mappings mappings, XmlNamespaceManager namespaceManager,
Dialect.Dialect dialect)
: base(mappings)
{
this.namespaceManager = namespaceManager;
this.dialect = dialect;
}
示例2: SchemaExport
/// <summary>
/// Create a schema exporter for the given Configuration, with the given
/// database connection properties
/// </summary>
/// <param name="cfg">The NHibernate Configuration to generate the schema from.</param>
/// <param name="connectionProperties">The Properties to use when connecting to the Database.</param>
public SchemaExport(Configuration cfg, IDictionary<string, string> connectionProperties)
{
this.connectionProperties = connectionProperties;
dialect = Dialect.Dialect.GetDialect(connectionProperties);
dropSQL = cfg.GenerateDropSchemaScript(dialect);
createSQL = cfg.GenerateSchemaCreationScript(dialect);
}
示例3: SchemaExport
/// <summary>
/// Create a schema exporter for the given Configuration, with the given
/// database connection properties
/// </summary>
/// <param name="cfg">The NHibernate Configuration to generate the schema from.</param>
/// <param name="configProperties">The Properties to use when connecting to the Database.</param>
public SchemaExport(Configuration cfg, IDictionary<string, string> configProperties)
{
this.configProperties = configProperties;
dialect = Dialect.Dialect.GetDialect(configProperties);
dropSQL = cfg.GenerateDropSchemaScript(dialect);
createSQL = cfg.GenerateSchemaCreationScript(dialect);
formatter = (PropertiesHelper.GetBoolean(Environment.FormatSql, configProperties, true) ? FormatStyle.Ddl : FormatStyle.None).Formatter;
}
示例4: SetUp
public virtual void SetUp()
{
Configuration cfg = new Configuration();
factory = cfg.BuildSessionFactory();
factoryImpl = (ISessionFactoryImplementor) factory;
dialect = factoryImpl.Dialect;
}
示例5: DatabaseMetadata
public DatabaseMetadata(DbConnection connection, Dialect.Dialect dialect, bool extras)
{
meta = dialect.GetDataBaseSchema(connection);
this.dialect = dialect;
this.extras = extras;
InitSequences(connection, dialect);
sqlExceptionConverter = dialect.BuildSQLExceptionConverter();
}
示例6: SchemaUpdate
public SchemaUpdate(Configuration cfg, Settings settings)
{
configuration = cfg;
dialect = settings.Dialect;
connectionHelper = new SuppliedConnectionProviderConnectionHelper(settings.ConnectionProvider);
exceptions = new List<Exception>();
formatter = (settings.SqlStatementLogger.FormatSql ? FormatStyle.Ddl : FormatStyle.None).Formatter;
}
示例7: SchemaUpdate
public SchemaUpdate(Configuration cfg, Settings settings)
{
configuration = cfg;
dialect = settings.Dialect;
connectionHelper = new SuppliedConnectionProviderConnectionHelper(
settings.ConnectionProvider
);
exceptions = new ArrayList();
}
示例8: SetUp
public virtual void SetUp()
{
// Generic Dialect inherits all of the Quoting functions from
// Dialect (which is abstract)
d = new Dialect.GenericDialect();
tableWithNothingToBeQuoted = new string[] {"plainname", "\"plainname\""};
tableAlreadyQuoted = new string[] {"\"Quote\"\"d[Na$`\"", "\"Quote\"\"d[Na$`\"","Quote\"d[Na$`" };
tableThatNeedsToBeQuoted = new string[] {"Quote\"d[Na$`", "\"Quote\"\"d[Na$`\"", "Quote\"d[Na$`"};
}
示例9: MultiQueryImpl
public MultiQueryImpl(ISessionImplementor session)
{
IDriver driver = session.Factory.ConnectionProvider.Driver;
if (!driver.SupportsMultipleQueries)
{
throw new NotSupportedException(
string.Format("The driver {0} does not support multiple queries.", driver.GetType().FullName));
}
this.dialect = session.Factory.Dialect;
this.session = session;
}
示例10: SchemaValidator
public SchemaValidator(Configuration cfg, IDictionary<string, string> connectionProperties)
{
configuration = cfg;
dialect = Dialect.Dialect.GetDialect(connectionProperties);
IDictionary<string, string> props = new Dictionary<string, string>(dialect.DefaultProperties);
foreach (var prop in connectionProperties)
{
props[prop.Key] = prop.Value;
}
connectionHelper = new ManagedProviderConnectionHelper(props);
}
示例11: MultiCriteriaImpl
/// <summary>
/// Initializes a new instance of the <see cref="MultiCriteriaImpl"/> class.
/// </summary>
/// <param name="session">The session.</param>
/// <param name="factory">The factory.</param>
internal MultiCriteriaImpl(SessionImpl session, SessionFactoryImpl factory)
{
dialect = session.Factory.Dialect;
if (!session.Factory.ConnectionProvider.Driver.SupportsMultipleQueries)
{
throw new NotSupportedException(
string.Format("The dialect {0} does not support multiple queries.", dialect.GetType().FullName));
}
this.session = session;
this.factory = factory;
}
示例12: SetUp
public virtual void SetUp()
{
Configuration cfg = new Configuration();
Assembly dm = Assembly.GetAssembly(typeof(Simple));
cfg.AddResource("NHibernate.DomainModel.Simple.hbm.xml", dm);
cfg.AddResource("NHibernate.DomainModel.NHSpecific.SimpleComponent.hbm.xml", dm);
cfg.AddResource("NHibernate.DomainModel.Multi.hbm.xml", dm);
factory = cfg.BuildSessionFactory();
factoryImpl = (ISessionFactoryImplementor) factory;
dialect = factoryImpl.Dialect;
}
示例13: ExportSchema
public void ExportSchema(string[] files, bool exportSchema)
{
cfg = new Configuration();
for (int i=0; i<files.Length; i++)
{
cfg.AddResource("NHibernate.Examples.ForumQuestions." + files[i], Assembly.Load(AssemblyName));
}
if(exportSchema) new SchemaExport(cfg).Create(true, true);
sessions = cfg.BuildSessionFactory( );
dialect = Dialect.Dialect.GetDialect( cfg.Properties );
}
示例14: Initialize
private void Initialize()
{
if(wasInitialized)
{
return;
}
string autoKeyWordsImport = PropertiesHelper.GetString(Environment.Hbm2ddlKeyWords, configProperties, "not-defined");
autoKeyWordsImport = autoKeyWordsImport.ToLowerInvariant();
if (autoKeyWordsImport == Hbm2DDLKeyWords.AutoQuote)
{
SchemaMetadataUpdater.QuoteTableAndColumns(cfg);
}
dialect = Dialect.Dialect.GetDialect(configProperties);
dropSQL = cfg.GenerateDropSchemaScript(dialect);
createSQL = cfg.GenerateSchemaCreationScript(dialect);
formatter = (PropertiesHelper.GetBoolean(Environment.FormatSql, configProperties, true) ? FormatStyle.Ddl : FormatStyle.None).Formatter;
wasInitialized = true;
}
示例15: EntityMapper
public EntityMapper(Mappings mappings, Dialect.Dialect dialect)
{
this.mappings = mappings;
this.dialect = dialect;
}