Examples of AliasDescriptor


Examples of org.apache.derby.iapi.sql.dictionary.AliasDescriptor

      forCallStatement ? AliasInfo.ALIAS_NAME_SPACE_PROCEDURE_AS_CHAR : AliasInfo.ALIAS_NAME_SPACE_FUNCTION_AS_CHAR
      );

    for (int i = list.size() - 1; i >= 0; i--) {

      AliasDescriptor proc = (AliasDescriptor) list.get(i);

      RoutineAliasInfo routineInfo = (RoutineAliasInfo) proc.getAliasInfo();
      int parameterCount = routineInfo.getParameterCount();
      if (parameterCount != methodParms.length)
        continue;

      // pre-form the method signature. If it is a dynamic result set procedure
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.AliasDescriptor

  public void bindStatement() throws StandardException
  {
    DataDictionary  dataDictionary = getDataDictionary();
    String      aliasName = getRelativeName();

    AliasDescriptor  ad = null;
    SchemaDescriptor sd = getSchemaDescriptor();
   
    if (sd.getUUID() != null) {
      ad = dataDictionary.getAliasDescriptor
                                (sd.getUUID().toString(), aliasName, nameSpace );
    }
    if ( ad == null )
    {
      throw StandardException.newException(SQLState.LANG_OBJECT_DOES_NOT_EXIST, statementToString(), aliasName);
    }

    // User cannot drop a system alias
    if (ad.getSystemAlias())
    {
      throw StandardException.newException(SQLState.LANG_CANNOT_DROP_SYSTEM_ALIASES, aliasName);
    }

    // Statement is dependent on the AliasDescriptor
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.AliasDescriptor

      forCallStatement ? AliasInfo.ALIAS_NAME_SPACE_PROCEDURE_AS_CHAR : AliasInfo.ALIAS_NAME_SPACE_FUNCTION_AS_CHAR
      );

    for (int i = list.size() - 1; i >= 0; i--) {

      AliasDescriptor proc = (AliasDescriptor) list.get(i);

      RoutineAliasInfo routineInfo = (RoutineAliasInfo) proc.getAliasInfo();
      int parameterCount = routineInfo.getParameterCount();
      if (parameterCount != methodParms.length)
        continue;

      // pre-form the method signature. If it is a dynamic result set procedure
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.AliasDescriptor

       
    keyRow.setColumn(1, new SQLChar( SchemaDescriptor.SYSIBM_SCHEMA_UUID ));
    keyRow.setColumn(2, aliasNameOrderable);
    keyRow.setColumn(3, nameSpaceOrderable);

        AliasDescriptor      oldAD = (AliasDescriptor) getDescriptorViaIndex
            (
             SYSALIASESRowFactory.SYSALIASES_INDEX1_ID,
             keyRow,
             (ScanQualifier [][]) null,
             ti,
             (TupleDescriptor) null,
             (List) null,
             true,
             TransactionController.ISOLATION_REPEATABLE_READ,
             tc);
        RoutineAliasInfo   oldRai = (RoutineAliasInfo) oldAD.getAliasInfo();
        TypeDescriptor     newReturnType = DataTypeDescriptor.getCatalogType( Types.VARCHAR, LOBStoredProcedure.MAX_CLOB_RETURN_LEN );
        RoutineAliasInfo   newRai = new RoutineAliasInfo
            (
             oldRai.getMethodName(),
             oldRai.getParameterCount(),
             oldRai.getParameterNames(),
             oldRai.getParameterTypes(),
             oldRai.getParameterModes(),
             oldRai.getMaxDynamicResultSets(),
             oldRai.getParameterStyle(),
             oldRai.getSQLAllowed(),
             oldRai.isDeterministic(),
             oldRai.calledOnNullInput(),
             newReturnType
             );
        AliasDescriptor      newAD = new AliasDescriptor
            (
             this,
             oldAD.getUUID(),
             oldAD.getObjectName(),
             oldAD.getSchemaUUID(),
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.AliasDescriptor

       
    aliasKeyRow.setColumn(1, new SQLChar( SchemaDescriptor.SYSCS_UTIL_SCHEMA_UUID ));
    aliasKeyRow.setColumn(2, aliasNameOrderable);
    aliasKeyRow.setColumn(3, nameSpaceOrderable);

        AliasDescriptor      oldAD = (AliasDescriptor) getDescriptorViaIndex
            (
             SYSALIASESRowFactory.SYSALIASES_INDEX1_ID,
             aliasKeyRow,
             (ScanQualifier [][]) null,
             aliasTI,
             (TupleDescriptor) null,
             (List) null,
             true,
             TransactionController.ISOLATION_REPEATABLE_READ,
             tc);
        UUID                 aliasID = oldAD.getUUID();

        //
        // Now delete the permissions tuple which has a null grantor
        //
    TabInfoImpl          rpTI = getNonCoreTI(SYSROUTINEPERMS_CATALOG_NUM);
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.AliasDescriptor

        BaseTypeIdImpl btii = dtd.getTypeId().getBaseTypeId();
        if ( !btii.isAnsiUDT() ) { return null; }

        SchemaDescriptor sd = getSchemaDescriptor( btii.getSchemaName(), tc, true );
        AliasDescriptor ad = getAliasDescriptor
            ( sd.getUUID().toString(), btii.getUnqualifiedName(), AliasInfo.ALIAS_NAME_SPACE_UDT_AS_CHAR );

        return ad;
    }
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.AliasDescriptor

        String[] details = DataDictionaryImpl.SYSFUN_FUNCTIONS[f];
        String name = details[0];
        if (!name.equals(routineName))
          continue;
       
        AliasDescriptor ad = DataDictionaryImpl.SYSFUN_AD[f];
        if (ad == null)
        {
          // details[1] Return type
          TypeDescriptor rt =
            DataTypeDescriptor.getBuiltInDataTypeDescriptor(details[1]).getCatalogType();

                    boolean isDeterministic = Boolean.valueOf( details[ SYSFUN_DETERMINISTIC_INDEX ] ).booleanValue();
                   
                    // Determine the number of arguments (could be zero).
                    int paramCount = details.length - SYSFUN_FIRST_PARAMETER_INDEX;
          TypeDescriptor[] pt = new TypeDescriptor[paramCount];
          String[] paramNames = new String[paramCount];
          int[] paramModes = new int[paramCount];
                    for (int i = 0; i < paramCount; i++) {
                        pt[i] = DataTypeDescriptor.getBuiltInDataTypeDescriptor(
                                    details[SYSFUN_FIRST_PARAMETER_INDEX +i]).getCatalogType();
                        paramNames[i] = "P" + (i +1); // Dummy names
                        // All parameters must be IN.
                        paramModes[i] = JDBC30Translation.PARAMETER_MODE_IN;
                    }

          // details[3] = java method
          RoutineAliasInfo ai = new RoutineAliasInfo(details[3],
              paramCount, paramNames,
              pt, paramModes, 0,
                            RoutineAliasInfo.PS_JAVA, RoutineAliasInfo.NO_SQL, isDeterministic,
              false, rt);

          // details[2] = class name
          ad = new AliasDescriptor(this, uuidFactory.createUUID(), name,
              uuidFactory.recreateUUID(schemaID),
              details[2], AliasInfo.ALIAS_TYPE_FUNCTION_AS_CHAR,
              AliasInfo.ALIAS_NAME_SPACE_FUNCTION_AS_CHAR,
              true, ai, null);

          DataDictionaryImpl.SYSFUN_AD[f] = ad;
        }
        list.add(ad);
      }
      return list;
    }
   
    AliasDescriptor ad = getAliasDescriptor(schemaID, routineName, nameSpace);
    if (ad != null) {
      list.add(ad);
    }
    return list;
  }
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.AliasDescriptor

                isDeterministic,             // whether the procedure/function is DETERMINISTIC
                true,                               // true - calledOnNullInput
                return_type);

    UUID routine_uuid = getUUIDFactory().createUUID();
        AliasDescriptor ads =
            new AliasDescriptor(
                this,
                routine_uuid,
                routine_name,
                schema_uuid,
                procClass, 
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.AliasDescriptor

                      char nameSpace,
                      TransactionController tc,
                      String authorizationID)
                        throws StandardException {
      // For system routines, a valid alias descriptor will be returned.
      AliasDescriptor ad = getAliasDescriptor(schemaID, routineName,
                          nameSpace);
        //
        // When upgrading from 10.1, it can happen that we haven't yet created
        // all public procedures. We forgive that possibility here and just return.
        //
        if ( ad == null ) { return; }
     
      UUID routineUUID = ad.getUUID();
      createRoutinePermPublicDescriptor(routineUUID, tc, authorizationID);
    }
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.AliasDescriptor

        String                          functionName = td.getDescriptorName();
        SchemaDescriptor     sd = getSchemaDescriptor( td.getSchemaName(), null, true );

        if ( sd != null )
        {
            AliasDescriptor         ad = getAliasDescriptor( sd.getUUID().toString(), functionName, AliasInfo.ALIAS_TYPE_FUNCTION_AS_CHAR );

            if ( (ad != null) && ad.isTableFunction() ) { return ad.getJavaClassName(); }

            throw StandardException.newException
            ( SQLState.LANG_NOT_TABLE_FUNCTION, schemaName, functionName );
        }
    }
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.