本文整理了Java中org.hibernate.boot.model.relational.Namespace.locateSequence()
方法的一些代码示例,展示了Namespace.locateSequence()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Namespace.locateSequence()
方法的具体详情如下:
包路径:org.hibernate.boot.model.relational.Namespace
类名称:Namespace
方法名:locateSequence
暂无
代码示例来源:origin: hibernate/hibernate-orm
.locateSequence( Identifier.toIdentifier( "my_db_sequence" ) );
assertThat( sequence, notNullValue() );
final String[] sqlCreateStrings = new H2Dialect().getSequenceExporter().getSqlCreateStrings(
代码示例来源:origin: hibernate/hibernate-orm
protected void buildSequence(Database database) {
final int sourceIncrementSize = getSourceIncrementSize();
final Namespace namespace = database.locateNamespace(
logicalQualifiedSequenceName.getCatalogName(),
logicalQualifiedSequenceName.getSchemaName()
);
Sequence sequence = namespace.locateSequence( logicalQualifiedSequenceName.getObjectName() );
if ( sequence != null ) {
sequence.validate( initialValue, sourceIncrementSize );
}
else {
sequence = namespace.createSequence( logicalQualifiedSequenceName.getObjectName(), initialValue, sourceIncrementSize );
}
this.sequenceName = database.getJdbcEnvironment().getQualifiedObjectNameFormatter().format(
sequence.getName(),
database.getJdbcEnvironment().getDialect()
);
}
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
public void registerExportables(Database database) {
final Namespace namespace = database.locateNamespace(
logicalQualifiedSequenceName.getCatalogName(),
logicalQualifiedSequenceName.getSchemaName()
);
Sequence sequence = namespace.locateSequence( logicalQualifiedSequenceName.getObjectName() );
if ( sequence != null ) {
sequence.validate( 1, 1 );
}
else {
sequence = namespace.createSequence(
logicalQualifiedSequenceName.getObjectName(),
1,
1
);
}
final JdbcEnvironment jdbcEnvironment = database.getJdbcEnvironment();
final Dialect dialect = jdbcEnvironment.getDialect();
this.sequenceName = jdbcEnvironment.getQualifiedObjectNameFormatter().format(
sequence.getName(),
dialect
);
this.sql = jdbcEnvironment.getDialect().getSequenceNextValString( sequenceName );
}
}
代码示例来源:origin: hibernate/hibernate-ogm
@Override
public void registerExportables(Database database) {
final Namespace namespace = database.locateNamespace(
logicalQualifiedSequenceName.getCatalogName(),
logicalQualifiedSequenceName.getSchemaName()
);
Sequence sequence = namespace.locateSequence( logicalQualifiedSequenceName.getObjectName() );
if ( sequence != null ) {
sequence.validate( getInitialValue(), getIncrementSize() );
}
else {
sequence = namespace.createSequence( logicalQualifiedSequenceName.getObjectName(), getInitialValue(), getIncrementSize() );
}
}
}
内容来源于网络,如有侵权,请联系作者删除!