Examples of SequenceProperties


Examples of net.sf.hajdbc.SequenceProperties

   * @see net.sf.hajdbc.dialect.StandardDialectTest#getAlterSequenceSQL()
   */
  @Override
  public void getAlterSequenceSQL() throws SQLException
  {
    SequenceProperties sequence = mock(SequenceProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(sequence.getName()).thenReturn(name);
    when(name.getDDLName()).thenReturn("sequence");
    when(sequence.getIncrement()).thenReturn(1);
   
    String result = this.dialect.getSequenceSupport().getAlterSequenceSQL(sequence, 1000L);

    assertEquals("SET GENERATOR sequence TO 1000", result);
  }
View Full Code Here

Examples of net.sf.hajdbc.SequenceProperties

   */
  @Override
  public void getSequences() throws SQLException
  {
    SequencePropertiesFactory factory = mock(SequencePropertiesFactory.class);
    SequenceProperties sequence1 = mock(SequenceProperties.class);
    SequenceProperties sequence2 = mock(SequenceProperties.class);
    DatabaseMetaData metaData = mock(DatabaseMetaData.class);
    Connection connection = mock(Connection.class);
    Statement statement = mock(Statement.class);
    ResultSet resultSet = mock(ResultSet.class);
   
View Full Code Here

Examples of net.sf.hajdbc.SequenceProperties

   * @see net.sf.hajdbc.dialect.StandardDialectTest#getNextSequenceValueSQL()
   */
  @Override
  public void getNextSequenceValueSQL() throws SQLException
  {
    SequenceProperties sequence = mock(SequenceProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(sequence.getName()).thenReturn(name);
    when(name.getDMLName()).thenReturn("sequence");
   
    String result = this.dialect.getSequenceSupport().getNextSequenceValueSQL(sequence);
   
    assertEquals("SELECT GEN_ID(sequence, 1) FROM RDB$DATABASE", result);
View Full Code Here

Examples of net.sf.hajdbc.SequenceProperties

   * @see net.sf.hajdbc.dialect.StandardDialectTest#getNextSequenceValueSQL()
   */
  @Override
  public void getNextSequenceValueSQL() throws SQLException
  {
    SequenceProperties sequence = mock(SequenceProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(sequence.getName()).thenReturn(name);
    when(name.getDMLName()).thenReturn("sequence");
   
    String result = this.dialect.getSequenceSupport().getNextSequenceValueSQL(sequence);
   
    assertEquals("VALUES NEXT VALUE FOR sequence", result);
View Full Code Here

Examples of net.sf.hajdbc.SequenceProperties

   */
  @Override
  public void getSequences() throws SQLException
  {
    SequencePropertiesFactory factory = mock(SequencePropertiesFactory.class);
    SequenceProperties sequence1 = mock(SequenceProperties.class);
    SequenceProperties sequence2 = mock(SequenceProperties.class);
    DatabaseMetaData metaData = mock(DatabaseMetaData.class);
    Connection connection = mock(Connection.class);
    Statement statement = mock(Statement.class);
    ResultSet resultSet = mock(ResultSet.class);
   
View Full Code Here

Examples of net.sf.hajdbc.SequenceProperties

   * @see net.sf.hajdbc.dialect.StandardDialectTest#getNextSequenceValueSQL()
   */
  @Override
  public void getNextSequenceValueSQL() throws SQLException
  {
    SequenceProperties sequence = mock(SequenceProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(sequence.getName()).thenReturn(name);
    when(name.getDMLName()).thenReturn("sequence");
   
    String result = this.dialect.getSequenceSupport().getNextSequenceValueSQL(sequence);
   
    assertEquals("CALL NEXT VALUE FOR sequence", result);
View Full Code Here

Examples of net.sf.hajdbc.SequenceProperties

   */
  @Override
  public void getSequences() throws SQLException
  {
    SequencePropertiesFactory factory = mock(SequencePropertiesFactory.class);
    SequenceProperties sequence1 = mock(SequenceProperties.class);
    SequenceProperties sequence2 = mock(SequenceProperties.class);
    DatabaseMetaData metaData = mock(DatabaseMetaData.class);
    Connection connection = mock(Connection.class);
    Statement statement = mock(Statement.class);
    ResultSet resultSet = mock(ResultSet.class);
   
View Full Code Here

Examples of net.sf.hajdbc.SequenceProperties

   */
  @Override
  public void getSequences() throws SQLException
  {
    SequencePropertiesFactory factory = mock(SequencePropertiesFactory.class);
    SequenceProperties sequence1 = mock(SequenceProperties.class);
    SequenceProperties sequence2 = mock(SequenceProperties.class);
    DatabaseMetaData metaData = mock(DatabaseMetaData.class);
    Connection connection = mock(Connection.class);
    Statement statement = mock(Statement.class);
    ResultSet resultSet = mock(ResultSet.class);
   
View Full Code Here

Examples of net.sf.hajdbc.SequenceProperties

   * @see net.sf.hajdbc.dialect.StandardDialectTest#getNextSequenceValueSQL()
   */
  @Override
  public void getNextSequenceValueSQL() throws SQLException
  {
    SequenceProperties sequence = mock(SequenceProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(sequence.getName()).thenReturn(name);
    when(name.getDMLName()).thenReturn("sequence");
   
    String result = this.dialect.getSequenceSupport().getNextSequenceValueSQL(sequence);

    assertEquals("SELECT sequence.NEXTVAL FROM DUAL", result);
View Full Code Here

Examples of net.sf.hajdbc.SequenceProperties

   * @see net.sf.hajdbc.dialect.StandardDialectTest#getAlterSequenceSQL()
   */
  @Override
  public void getAlterSequenceSQL() throws SQLException
  {
    SequenceProperties sequence = mock(SequenceProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(sequence.getName()).thenReturn(name);
    when(name.getDDLName()).thenReturn("sequence");
    when(sequence.getIncrement()).thenReturn(1);
   
    String result = this.dialect.getSequenceSupport().getAlterSequenceSQL(sequence, 1000L);
   
    assertEquals("ALTER SEQUENCE sequence INCREMENT BY (1000 - (SELECT sequence.NEXTVAL FROM DUAL)); SELECT sequence.NEXTVAL FROM DUAL; ALTER SEQUENCE sequence INCREMENT BY 1", result);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.