Package org.apache.derby.iapi.sql.dictionary

Examples of org.apache.derby.iapi.sql.dictionary.DataDictionary.checkVersion()


    DataDictionary dd = getLanguageConnectionContext().getDataDictionary();

    // If dictionary version is below 10.2, special case
    // getColumnPrivileges and getTablePrivileges since new system tables
    // for privileges wouldn't be present.
    if (!dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_2, null))
    {
      if (queryName.equals("getColumnPrivileges"))
        queryName = "getColumnPrivileges_10_1";

      if (queryName.equals("getTablePrivileges"))
View Full Code Here


           SQLState.LANG_MODIFY_COLUMN_FKEY_CONSTRAINT,
                     name, existingConstraint.getConstraintName());
     
      else
      {
        if (!dd.checkVersion(
          DataDictionary.DD_VERSION_DERBY_10_4, null))
        {
          //if a column is part of unique constraint it can't be
          //made nullable in soft upgrade mode from a pre-10.4 db.
          if ((getNodeType() ==
View Full Code Here

           SQLState.LANG_MODIFY_COLUMN_FKEY_CONSTRAINT,
                     name, existingConstraint.getConstraintName());
     
      else
      {
        if (!dd.checkVersion(
          DataDictionary.DD_VERSION_DERBY_10_4, null))
        {
          //if a column is part of unique constraint it can't be
          //made nullable in soft upgrade mode from a pre-10.4 db.
          if ((getNodeType() ==
View Full Code Here

      // Check is only performed if we have
      // derby.database.sqlAuthorization == true and we have
      // upgraded dictionary to at least level 10.4 (roles
      // introduced in 10.4):
      if (lcc.usesSqlAuthorization() &&
        dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_4, null)) {

        TransactionController tc = lcc.getTransactionExecute();

        String failedString =
          MessageService.getTextMessage(MessageId.AUTH_INVALID);
View Full Code Here

    DataDictionary dd = getLanguageConnectionContext().getDataDictionary();

    // If dictionary version is below 10.2, special case
    // getColumnPrivileges and getTablePrivileges since new system tables
    // for privileges wouldn't be present.
    if (!dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_2, null))
    {
      if (queryName.equals("getColumnPrivileges"))
        queryName = "getColumnPrivileges_10_1";

      if (queryName.equals("getTablePrivileges"))
View Full Code Here

    indexProperties.put("baseConglomerateId",
              Long.toString(td.getHeapConglomerateId()));
       
    if (uniqueWithDuplicateNulls)
        {
            if (dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_4, null))
            {
        indexProperties.put(
                    "uniqueWithDuplicateNulls", Boolean.toString(true));
      }
      else
View Full Code Here

              Integer.toString(baseColumnPositions.length + 1));

    // For now, assume that all index columns are ordered columns
    if (! shareExisting)
    {
            if (dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_4, null))
            {
                indexRowGenerator = new IndexRowGenerator(
                                            indexType,
                                            unique,
                                            uniqueWithDuplicateNulls,
View Full Code Here

    DataDictionary dd = getLanguageConnectionContext().getDataDictionary();

    // If dictionary version is below 10.2, special case
    // getColumnPrivileges and getTablePrivileges since new system tables
    // for privileges wouldn't be present.
    if (!dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_2, null))
    {
      if (queryName.equals("getColumnPrivileges"))
        queryName = "getColumnPrivileges_10_1";

      if (queryName.equals("getTablePrivileges"))
View Full Code Here

            throw new IllegalStateException("No context, unable to determine " +
                    "which stream header format to generate");
        } else {
            DataDictionary dd = dbCtx.getDatabase().getDataDictionary();
            try {
                isPreDerbyTenFive = Boolean.valueOf(!dd.checkVersion(
                        DataDictionary.DD_VERSION_DERBY_10_5, null));
            } catch (StandardException se) {
                // This should never happen as long as the second argument
                // above is null. If it happens, just bomb out.
                IllegalStateException ise =
View Full Code Here

    TemporaryRowHolderImpl singleRow;
    DataDictionary dd = activation.getLanguageConnectionContext().getDataDictionary();
    // In soft upgrade mode, we could be dealing with databases created
    // with 10.8 or prior and for such databases, we do not want to do
    // any column reading optimization to maintain backward compatibility
    if (!dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_9,null)) {
        singleRow =
          new TemporaryRowHolderImpl(activation, null,
               rs.getResultDescription());
      singleRow.insert(rs.getCurrentRow());
      return (TemporaryRowHolderResultSet) singleRow.getResultSet();
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.