Package java.sql

Examples of java.sql.DatabaseMetaData.storesLowerCaseIdentifiers()


    boolean found = false;

    while (dbTblCols.next()) {
      String catalog = dbTblCols.getString("TABLE_CAT");
      String table = dbTblCols.getString("TABLE_NAME");
      boolean useLowerCaseTableNames = dbmd.storesLowerCaseIdentifiers();

      if (catalog.equals(nullCatConn.getCatalog())
          && (((useLowerCaseTableNames && "testBug31187"
              .equalsIgnoreCase(table)) || "testBug31187"
              .equals(table)))) {
View Full Code Here


   */
  public void testBug11575() throws Exception {
    DatabaseMetaData dbmd = this.conn.getMetaData();

    if (isServerRunningOnWindows()) {
      assertEquals(true, dbmd.storesLowerCaseIdentifiers());
      assertEquals(true, dbmd.storesLowerCaseQuotedIdentifiers());
      assertEquals(false, dbmd.storesMixedCaseIdentifiers());
      assertEquals(false, dbmd.storesMixedCaseQuotedIdentifiers());
      assertEquals(false, dbmd.storesUpperCaseIdentifiers());
      assertEquals(true, dbmd.storesUpperCaseQuotedIdentifiers());
View Full Code Here

     * @throws RepositoryException if a repository exception occurs.
     */
    protected boolean checkTablesExist() throws SQLException, RepositoryException {
        DatabaseMetaData metaData = connectionManager.getConnection().getMetaData();
        String tableName = schemaObjectPrefix + "BUNDLE";
        if (metaData.storesLowerCaseIdentifiers()) {
            tableName = tableName.toLowerCase();
        } else if (metaData.storesUpperCaseIdentifiers()) {
            tableName = tableName.toUpperCase();
        }
        String userName = checkTablesWithUser() ? metaData.getUserName() : null;
View Full Code Here

     * @throws Exception if an error occurs
     */
    protected void checkSchema() throws Exception {
        DatabaseMetaData metaData = con.getMetaData();
        String tableName = schemaObjectPrefix + "FSENTRY";
        if (metaData.storesLowerCaseIdentifiers()) {
            tableName = tableName.toLowerCase();
        } else if (metaData.storesUpperCaseIdentifiers()) {
            tableName = tableName.toUpperCase();
        }
        ResultSet rs = metaData.getTables(null, null, tableName, null);
View Full Code Here

     * @throws RepositoryException if a repository exception occurs.
     */
    protected boolean checkTablesExist() throws SQLException, RepositoryException {
        DatabaseMetaData metaData = connectionManager.getConnection().getMetaData();
        String tableName = schemaObjectPrefix + "BUNDLE";
        if (metaData.storesLowerCaseIdentifiers()) {
            tableName = tableName.toLowerCase();
        } else if (metaData.storesUpperCaseIdentifiers()) {
            tableName = tableName.toUpperCase();
        }
        String userName = checkTablesWithUser() ? metaData.getUserName() : null;
View Full Code Here

     * @throws RepositoryException if a repository exception occurs.
     */
    protected boolean checkTablesExist() throws SQLException, RepositoryException {
        DatabaseMetaData metaData = connectionManager.getConnection().getMetaData();
        String tableName = schemaObjectPrefix + "BUNDLE";
        if (metaData.storesLowerCaseIdentifiers()) {
            tableName = tableName.toLowerCase();
        } else if (metaData.storesUpperCaseIdentifiers()) {
            tableName = tableName.toUpperCase();
        }
        String userName = checkTablesWithUser() ? metaData.getUserName() : null;
View Full Code Here

     */
    public void testIdentifierStorage() throws SQLException
    {
        DatabaseMetaData dmd = getDMD();
       
        assertFalse(dmd.storesLowerCaseIdentifiers());
        assertFalse(dmd.storesLowerCaseQuotedIdentifiers());
        assertFalse(dmd.storesMixedCaseIdentifiers());
       
        assertTrue(dmd.storesMixedCaseQuotedIdentifiers());
        assertTrue(dmd.storesUpperCaseIdentifiers());
View Full Code Here

            if (table.indexOf('.') != -1) {
                schema = table.substring(0, table.indexOf('.'));
                table = table.substring(table.indexOf('.') + 1);
            }

            if (metaData.storesLowerCaseIdentifiers()) {
                table = table.toLowerCase();
                if (schema != null)
                    schema = table.toLowerCase();
            } else if (metaData.storesUpperCaseIdentifiers()) {
                table = table.toUpperCase();
View Full Code Here

                if (name == null || "".equals(name))
                    throw new ExternalVariableModuleException("External variable " + evarId
                            + " <column> element must have \"name\" attribute. ");

                if (metaData.storesLowerCaseIdentifiers())
                    colname = colname.toLowerCase();
                else if (metaData.storesUpperCaseIdentifiers())
                    colname = colname.toUpperCase();

                GenType gtype;
View Full Code Here

     * @throws SQLException if an SQL erro occurs.
     */
    protected boolean checkTablesExist() throws SQLException {
        DatabaseMetaData metaData = con.getMetaData();
        String tableName = schemaObjectPrefix + "BUNDLE";
        if (metaData.storesLowerCaseIdentifiers()) {
            tableName = tableName.toLowerCase();
        } else if (metaData.storesUpperCaseIdentifiers()) {
            tableName = tableName.toUpperCase();
        }
        String userName = checkTablesWithUser() ? metaData.getUserName() : null;
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.