Package org.apache.derby.catalog

Examples of org.apache.derby.catalog.TypeDescriptor


       
        AliasDescriptor ad = DataDictionaryImpl.SYSFUN_AD[f];
        if (ad == null)
        {
          // details[1] Return type
          TypeDescriptor rt =
            DataTypeDescriptor.getBuiltInDataTypeDescriptor(details[1]);

          // details[4] - zero or single argument type
          String paramType = details[4];
          TypeDescriptor[] pt;
View Full Code Here


    TransactionController   tc)
        throws StandardException
    {
        // Safe to re-use a TypeDescriptor here as they are
        // not modified during the creation of the routine
        TypeDescriptor varchar128 =
            DataTypeDescriptor.getBuiltInDataTypeDescriptor(
                    Types.VARCHAR, 128);

        UUID  sysUtilUUID = getSystemUtilSchemaDescriptor().getUUID();
        /* SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE(IN SCHEMANAME  VARCHAR(128),
View Full Code Here

        " actual is " + classInspector.getType(method));
    }
     setJavaTypeName( javaClassName );
     if (routineInfo != null)
                {
                    TypeDescriptor returnType = routineInfo.getReturnType();
                    if (returnType != null)
                    {
                        setCollationType(returnType.getCollationType());
                    }
                }
     return this;
  }
View Full Code Here

        TypeDescriptor[] columnTypes = originalMultiSet.getTypes();
        int columnCount = columnTypes.length;

        for ( int i = 0; i < columnCount; i++ )
        {
            TypeDescriptor columnType = columnTypes[ i ];

            if ( columnType.isUserDefinedType() )
            {
                DataTypeDescriptor newColumnDTD = DataTypeDescriptor.getType( columnType );

                newColumnDTD = bindUserType( newColumnDTD );

                TypeDescriptor newColumnType = newColumnDTD.getCatalogType();

                // poke the bound type back into the multi set descriptor
                columnTypes[ i ] = newColumnType;
            }
        }
View Full Code Here

     */
    public DataTypeDescriptor getDataType() throws StandardException
    {
        if ( routineInfo != null )
        {
            TypeDescriptor td = routineInfo.getReturnType();

            if ( td != null ) { return DataTypeDescriptor.getType( td ); }
        }

        return super.getDataType();
View Full Code Here

    Compare if two TypeDescriptors are exactly the same
    @param object the dataTypeDescriptor to compare to.
    */
  public boolean equals(Object object)
  {
    TypeDescriptor typeDescriptor = (TypeDescriptor)object;

    if(!this.getTypeName().equals(typeDescriptor.getTypeName()) ||
       this.precision != typeDescriptor.getPrecision() ||
       this.scale != typeDescriptor.getScale() ||
       this.isNullable != typeDescriptor.isNullable() ||
       this.maximumWidth != typeDescriptor.getMaximumWidth())
       return false;
      else
      {
      switch (typeId.getJDBCTypeId()) {
      case Types.CHAR:
      case Types.VARCHAR:
      case Types.LONGVARCHAR:
      case Types.CLOB:
        //if we are dealing with character types, then we should
        //also compare the collation information on them.
        if(this.collationDerivation != typeDescriptor.getCollationDerivation() ||
            this.collationType != typeDescriptor.getCollationType())
          return false;
        else
          return true;
      default:
        //no collation checking required if we are dealing with
View Full Code Here

             (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(),
View Full Code Here

       
        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).
View Full Code Here

    private final void create_SYSCS_procedures(
                                               TransactionController   tc, HashSet newlyCreatedRoutines )
        throws StandardException
    {
        // Types used for routine parameters and return types, all nullable.
        TypeDescriptor varchar32672Type = DataTypeDescriptor.getCatalogType(
                Types.VARCHAR, 32672);

        /*
    ** SYSCS_UTIL routines.
    */
 
View Full Code Here

  7 - Boolean - CALLED ON NULL INPUT
  8 - TypeDescriptor - return type
*/
  final public StatementNode functionDefinition() throws ParseException, StandardException {
        TableName functionName;
        TypeDescriptor  returnType;
        Object[] functionElements = new Object[CreateAliasNode.ROUTINE_ELEMENT_COUNT];
    jj_consume_token(FUNCTION);
    functionName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    functionElements[0] = functionParameterList();
    jj_consume_token(RETURNS);
    returnType = functionReturnDataType();
    label_36:
    while (true) {
      routineElement(false, returnType.isRowMultiSet(), functionElements);
      switch (jj_nt.kind) {
      case EXTERNAL:
      case NO:
      case NOT:
      case CALLED:
View Full Code Here

TOP

Related Classes of org.apache.derby.catalog.TypeDescriptor

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.