Package net.sourceforge.squirrel_sql.fw.sql

Examples of net.sourceforge.squirrel_sql.fw.sql.ISQLDatabaseMetaData


        testColType(md, toDb, column);
    }   

    private void testBinaryColType(String fromDb, String toDb) throws Exception
    {
        ISQLDatabaseMetaData md = FwTestUtil.getEasyMockSQLMetaData(fromDb, null);
        TableColumnInfo column = FwTestUtil.getBinaryColumnInfo(md, true);
        // This is for brute force detection of columns whose column size is 0
        ResultSet rs = getColLengthResult();
        testColType(md, toDb, column, rs);
    }   
View Full Code Here


        testColType(md, toDb, column, rs);
    }   
   
    private void testBlobColType(String fromDb, String toDb) throws Exception
    {
        ISQLDatabaseMetaData md = FwTestUtil.getEasyMockSQLMetaData(fromDb, null);
        TableColumnInfo column = FwTestUtil.getBlobColumnInfo(md, true);
        //This is for brute force detection of BLOB/CLOB lengths if necessary
        ResultSet rs = getColLengthResult();
        testColType(md, toDb, column, rs);
    }   
View Full Code Here

        testColType(md, toDb, column, rs);
    }   

    private void testClobColType(String fromDb, String toDb) throws Exception
    {
        ISQLDatabaseMetaData md = FwTestUtil.getEasyMockSQLMetaData(fromDb, null);
        TableColumnInfo column = FwTestUtil.getClobColumnInfo(md, true);
        // This is for brute force detection of BLOB/CLOB lengths if necessary
        ResultSet rs = getColLengthResult();
        testColType(md, toDb, column, rs);       
    }   
View Full Code Here

    }   

   
    private void testDateColType(String fromDb, String toDb) throws Exception
    {
        ISQLDatabaseMetaData md = FwTestUtil.getEasyMockSQLMetaData(fromDb, null);
        TableColumnInfo column = FwTestUtil.getDateColumnInfo(md, true);
        testColType(md, toDb, column);
    }   
View Full Code Here

    }   

    private void testLongVarcharColType(String fromDb, String toDb)
        throws Exception
    {
        ISQLDatabaseMetaData md = FwTestUtil.getEasyMockSQLMetaData(fromDb, null);
        TableColumnInfo column =
            FwTestUtil.getLongVarcharColumnInfo(md, true, Integer.MAX_VALUE);
        testColType(md, toDb, column);
    }       
View Full Code Here

        testColType(md, toDb, column);
    }       
   
    private void testVarcharColType(String fromDb, String toDb) throws Exception
    {
        ISQLDatabaseMetaData md = FwTestUtil.getEasyMockSQLMetaData(fromDb, null);
        TableColumnInfo column = FwTestUtil.getVarcharColumnInfo(md, true, 2000);
        testColType(md, toDb, column);
    }   
View Full Code Here

        testColType(md, toDb, column);
    }   
   
    private void testIntegerColType(String fromDb, String toDb) throws Exception
    {
        ISQLDatabaseMetaData md = FwTestUtil.getEasyMockSQLMetaData(fromDb, null);
        TableColumnInfo column = FwTestUtil.getIntegerColumnInfo(md, true);
        testColType(md, toDb, column);
    }
View Full Code Here

    // Bug #1714476 (DB copy uses wrong case for table names):  When the
    // catalog/schema/object names come from the source session, don't mess
    // with the case, as the case is provided by the driver for the existing
    // table, and doesn't need to be fixed.   
    public void testGetQualifiedObjectName() throws SQLException {
        ISQLDatabaseMetaData md = createNiceMock(ISQLDatabaseMetaData.class);
        expect(md.getCatalogSeparator()).andReturn(".");
        expect(md.supportsCatalogsInTableDefinitions()).andReturn(true);
        expect(md.supportsSchemasInTableDefinitions()).andReturn(true);
        replay(md);
        ISession session = createNiceMock(ISession.class);
        expect(session.getMetaData()).andReturn(md).anyTimes();
        replay(session);
        String catalog = "TestCatalog";
View Full Code Here

  public void setUp() throws Exception
  {
    super.setUp();
   
    ISession session = EasyMock.createMock(ISession.class);
    ISQLDatabaseMetaData metaData = EasyMock.createMock(ISQLDatabaseMetaData.class);
    expect(session.getMetaData()).andStubReturn(metaData);
    expect(metaData.getDatabaseProductName()).andStubReturn("Oracle");
    expect(metaData.getDatabaseProductVersion()).andStubReturn("10g");
   
    classUnderTest = new SupportedRefactoringsTab(session);
    clazz = SupportedRefactoringsTab.class;
  }
View Full Code Here

        if (!sanityCheck(sourceObjs, destObjs)) {
            return;
        }
       
        ISQLDatabaseMetaData sourceMetaData =
            prov.getDiffSourceSession().getMetaData();
        ISQLDatabaseMetaData destMetaData =
            prov.getDiffDestSession().getMetaData();

       
       
        Map<String, ITableInfo> tableMap1 = getTableMap(sourceMetaData, sourceObjs);
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.sql.ISQLDatabaseMetaData

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.