Package org.apache.derby.impl.tools.planexporter

Examples of org.apache.derby.impl.tools.planexporter.AccessDatabase


        try{
            if(args.length>4 && args.length<10 ){
                dbURL = args[0];

                AccessDatabase access = new AccessDatabase(dbURL, args[1], args[2]);
               
                if(access.verifySchemaExistance()){
               
                  if(access.initializeDataArray()){
                    access.createXMLFragment();
                    access.markTheDepth();
                    String stmt=access.statement();
                    String time=access.time();
                    access.closeConnection();

                    //advanced XSL feature
                    //possible occurrences are
                    //-adv -xml {path} -xsl {path} or
                    //-adv -xsl {path} -xml {path}
View Full Code Here


    }

    public void testPlanExporterSchemaExistence()
  throws Exception
    {
  AccessDatabase access =
        new AccessDatabase(getConnection(), "NoSuchSchema", "nostmt");
  assertTrue( "Unexpectedly thought schema exists",
    ! access.verifySchemaExistance() );
    }
View Full Code Here

       * Added by DERBY-4587 to test the generation of XML files
       * from PlanExporter tool.
       */
      String stmt_id="";
      ResultSet rs;
      AccessDatabase access;

      rs = s.executeQuery(
          "select stmt_id from XPLTEST.sysxplain_statements");
      while (rs.next())
      {
        stmt_id = rs.getString(1);
        access =
          new AccessDatabase(s.getConnection(), "XPLTEST", stmt_id);
        if(access.initializeDataArray()){
          access.createXMLFragment();
          access.markTheDepth();

          CreateXMLFile xml_file = new CreateXMLFile(access);
          xml_file.writeTheXMLFile(
              access.statement(),
              access.time(),
              access.getData(),
              SupportFilesSetup.getReadWriteURL(stmt_id + ".xml")
              .getPath(),
              null);
        }
      }
View Full Code Here

    }

    public void testPlanExporterSchemaExistence()
  throws Exception
    {
  AccessDatabase access =
        new AccessDatabase(getConnection(), "NoSuchSchema", "nostmt");
  assertTrue( "Unexpectedly thought schema exists",
    ! access.verifySchemaExistance() );
    }
View Full Code Here

    }

    public void testPlanExporterIllegalFileAccess()
  throws Exception
    {
  AccessDatabase access =
        new AccessDatabase(getConnection(), "NoSuchSchema", "nostmt");
      CreateXMLFile xml_file = new CreateXMLFile(access);
  try
  {
        xml_file.writeTheXMLFile("nostmt", "notime", null,
      "/illegal.xml", null);
View Full Code Here

        assertEquals(query, rs.getString(2));
        assertFalse(rs.next());
        rs.close();

        // Create the XML file. This used to result in a syntax error.
        AccessDatabase access =
                new AccessDatabase(getConnection(), schema, stmtId);
        assertTrue(access.initializeDataArray());
        access.createXMLFragment();
        access.markTheDepth();
        CreateXMLFile create = new CreateXMLFile(access);
        create.writeTheXMLFile(
                access.statement(),
                access.time(),
                access.getData(),
                SupportFilesSetup.getReadWriteURL(stmtId + ".xml").getPath(),
                null);

        // If we have the required libraries for parsing XML files, verify
        // that the output contains valid data.
View Full Code Here

       * Added by DERBY-4587 to test the generation of XML files
       * from PlanExporter tool.
       */
      String stmt_id="";
      ResultSet rs;
      AccessDatabase access;

      rs = s.executeQuery(
          "select stmt_id from XPLTEST.sysxplain_statements");
      while (rs.next())
      {
        stmt_id = rs.getString(1);
        access =
          new AccessDatabase(s.getConnection(), "XPLTEST", stmt_id);
        if(access.initializeDataArray()){
          access.createXMLFragment();
          access.markTheDepth();

          CreateXMLFile xml_file = new CreateXMLFile(access);
          xml_file.writeTheXMLFile(
              access.statement(),
              access.time(),
              access.getData(),
              SupportFilesSetup.getReadWriteURL(stmt_id + ".xml")
              .getPath(),
              null);
        }
      }
View Full Code Here

    }

    public void testPlanExporterSchemaExistence()
  throws Exception
    {
  AccessDatabase access =
        new AccessDatabase(getConnection(), "NoSuchSchema", "nostmt");
  assertTrue( "Unexpectedly thought schema exists",
    ! access.verifySchemaExistance() );
    }
View Full Code Here

    }

    public void testPlanExporterIllegalFileAccess()
  throws Exception
    {
  AccessDatabase access =
        new AccessDatabase(getConnection(), "NoSuchSchema", "nostmt");
      CreateXMLFile xml_file = new CreateXMLFile(access);
  try
  {
        xml_file.writeTheXMLFile("nostmt", "notime", null,
      "/illegal.xml", null);
View Full Code Here

        assertEquals(query, rs.getString(2));
        assertFalse(rs.next());
        rs.close();

        // Create the XML file. This used to result in a syntax error.
        AccessDatabase access =
                new AccessDatabase(getConnection(), schema, stmtId);
        assertTrue(access.initializeDataArray());
        access.createXMLFragment();
        access.markTheDepth();
        CreateXMLFile create = new CreateXMLFile(access);
        create.writeTheXMLFile(
                access.statement(),
                access.time(),
                access.getData(),
                SupportFilesSetup.getReadWriteURL(stmtId + ".xml").getPath(),
                null);

        // If we have the required libraries for parsing XML files, verify
        // that the output contains valid data.
View Full Code Here

TOP

Related Classes of org.apache.derby.impl.tools.planexporter.AccessDatabase

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.