本文整理汇总了C#中Dialect.GetSequenceNextValString方法的典型用法代码示例。如果您正苦于以下问题:C# Dialect.GetSequenceNextValString方法的具体用法?C# Dialect.GetSequenceNextValString怎么用?C# Dialect.GetSequenceNextValString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dialect
的用法示例。
在下文中一共展示了Dialect.GetSequenceNextValString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SequenceStructure
public SequenceStructure(Dialect.Dialect dialect, string sequenceName, int initialValue, int incrementSize)
{
_sequenceName = sequenceName;
_initialValue = initialValue;
_incrementSize = incrementSize;
_sql = new SqlString(dialect.GetSequenceNextValString(sequenceName));
}
示例2: Configure
/// <summary>
/// Configures the SequenceGenerator by reading the value of <c>sequence</c> and
/// <c>schema</c> from the <c>parms</c> parameter.
/// </summary>
/// <param name="type">The <see cref="IType"/> the identifier should be.</param>
/// <param name="parms">An <see cref="IDictionary"/> of Param values that are keyed by parameter name.</param>
/// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with Configuration.</param>
public virtual void Configure( IType type, IDictionary parms, Dialect.Dialect dialect )
{
this.sequenceName = PropertiesHelper.GetString( Sequence, parms, "hibernate_sequence" );
string schemaName = ( string ) parms[ Schema ];
if( schemaName != null && sequenceName.IndexOf( StringHelper.Dot ) < 0 )
{
sequenceName = schemaName + '.' + sequenceName;
}
returnClass = type.ReturnedClass;
sql = dialect.GetSequenceNextValString( sequenceName );
}
示例3: Configure
/// <summary>
/// Configures the SequenceGenerator by reading the value of <c>sequence</c> and
/// <c>schema</c> from the <c>parms</c> parameter.
/// </summary>
/// <param name="type">The <see cref="IType"/> the identifier should be.</param>
/// <param name="parms">An <see cref="IDictionary"/> of Param values that are keyed by parameter name.</param>
/// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with Configuration.</param>
public virtual void Configure(IType type, IDictionary<string, string> parms, Dialect.Dialect dialect)
{
sequenceName = PropertiesHelper.GetString(Sequence, parms, "hibernate_sequence");
string schemaName;
string catalogName;
parms.TryGetValue(Parameters, out parameters);
parms.TryGetValue(PersistentIdGeneratorParmsNames.Schema, out schemaName);
parms.TryGetValue(PersistentIdGeneratorParmsNames.Catalog, out catalogName);
if (sequenceName.IndexOf('.') < 0)
{
sequenceName = Table.Qualify(catalogName, schemaName, sequenceName);
}
identifierType = type;
sql = new SqlString(dialect.GetSequenceNextValString(sequenceName));
}
示例4: Configure
/// <summary>
/// Configures the SequenceGenerator by reading the value of <c>sequence</c> and
/// <c>schema</c> from the <c>parms</c> parameter.
/// </summary>
/// <param name="type">The <see cref="IType"/> the identifier should be.</param>
/// <param name="parms">An <see cref="IDictionary"/> of Param values that are keyed by parameter name.</param>
/// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with Configuration.</param>
public virtual void Configure(IType type, IDictionary<string, string> parms, Dialect.Dialect dialect)
{
var nativeSequenceName = PropertiesHelper.GetString(Sequence, parms, "hibernate_sequence");
bool needQuote = StringHelper.IsBackticksEnclosed(nativeSequenceName);
bool isQuelified = nativeSequenceName.IndexOf('.') > 0;
if (isQuelified)
{
string qualifier = StringHelper.Qualifier(nativeSequenceName);
nativeSequenceName = StringHelper.Unqualify(nativeSequenceName);
nativeSequenceName = StringHelper.PurgeBackticksEnclosing(nativeSequenceName);
sequenceName = qualifier + '.' + (needQuote ? dialect.QuoteForTableName(nativeSequenceName) : nativeSequenceName);
}
else
{
nativeSequenceName = StringHelper.PurgeBackticksEnclosing(nativeSequenceName);
sequenceName = needQuote ? dialect.QuoteForTableName(nativeSequenceName) : nativeSequenceName;
}
string schemaName;
string catalogName;
parms.TryGetValue(Parameters, out parameters);
parms.TryGetValue(PersistentIdGeneratorParmsNames.Schema, out schemaName);
parms.TryGetValue(PersistentIdGeneratorParmsNames.Catalog, out catalogName);
if (!isQuelified)
{
sequenceName = dialect.Qualify(catalogName, schemaName, sequenceName);
}
identifierType = type;
sql = new SqlString(dialect.GetSequenceNextValString(sequenceName));
}