Package nexj.core.persistence.sql.SQLSchemaManager

Examples of nexj.core.persistence.sql.SQLSchemaManager.SQLAppender


      assertNull(schema.findTable(m_singlePKColTableStep.getName()));
   }

   public void testDropUpgradeSchema()
   {
      SQLAppender origAppender = m_manager.getSQLAppender();
      RelationalSchema schema = new RelationalSchema(); // schema used for dropTable step
      Table table = new Table(schema);
      StringWriter sql = new StringWriter();
      DropTableStep dropStep = new DropTableStep();
      String sDropSQL;
View Full Code Here


      assertTrue(table.isHintEnabled("test3"));
   }

   public void testIndexDiscardState()
   {
      SQLAppender origAppender = m_manager.getSQLAppender();
      RelationalSchema schema = new RelationalSchema();
      Table table = new Table(schema);
      Column column = new Column("col", table);
      Index index = new Index("indx", Index.CLUSTER, table);
View Full Code Here

   {
      RelationalSchema schema = (RelationalSchema)m_database.getSchema();
      Metadata metadata = schema.getMetadata();
      StringWriter writer = new StringWriter();
      Table origVersionTable = schema.getVersionTable(); // note original
      SQLAppender origAppender = m_manager.getSQLAppender();

      try
      {
         schema.setVersionTable(schema.getTable("Version"));
         m_manager.setSQLAppender(m_manager.new SQLWriterAppender(writer));
View Full Code Here

      }

      RelationalSchemaUpgradeState state = new RelationalSchemaUpgradeState(schema, null, null);
      SchemaVersion version = new SchemaVersion();
      RelationalSchemaUpgrade upgrade = new RelationalSchemaUpgrade();
      SQLAppender origAppender = m_manager.getSQLAppender();

      upgrade.addStep(step);
      upgrade.setUpgrade(new Upgrade(null));
      m_manager.setSQLAppender(
         (writer == null) ? new SQLSchemaManager.SQLConnectionAppender(m_connection.getConnection())
View Full Code Here

    * @return The SQL generated during the execution of the upgrade.
    */
   protected String upgrade(VersionUpgrade version, RelationalSchema schema)
   {
      Upgrade upgrade = new Upgrade(null);
      SQLAppender origAppender = m_manager.getSQLAppender();
      StringWriter sql = new StringWriter();

      upgrade.setMetadata(getMetadata());
      upgrade.addVersion(version);
      m_manager.setSQLAppender(m_manager.new SQLWriterAppender(sql));
View Full Code Here

TOP

Related Classes of nexj.core.persistence.sql.SQLSchemaManager.SQLAppender

Copyright © 2018 www.massapicom. 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.