Examples of SchemaDescriptor


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

        if ( userTypeID.isBound() ) { return originalDTD; }

        // ok, we have an unbound UDT. lookup this type in the data dictionary

        DataDictionary dd = getDataDictionary();
        SchemaDescriptor typeSchema = getSchemaDescriptor( userTypeID.getSchemaName() );
        char  udtNameSpace = AliasInfo.ALIAS_NAME_SPACE_UDT_AS_CHAR;
        String unqualifiedTypeName = userTypeID.getUnqualifiedName();
        AliasDescriptor ad = dd.getAliasDescriptor( typeSchema.getUUID().toString(), unqualifiedTypeName, udtNameSpace );

    if (ad == null)
    {
      throw StandardException.newException(SQLState.LANG_OBJECT_NOT_FOUND, AliasDescriptor.getAliasType(udtNameSpace),  unqualifiedTypeName);
    }

        createTypeDependency( ad );

        DataTypeDescriptor result = new DataTypeDescriptor
            (
             TypeId.getUserDefinedTypeId( typeSchema.getSchemaName(), unqualifiedTypeName, ad.getJavaClassName() ),
             originalDTD.isNullable()
             );

        return result;
    }
View Full Code Here

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

    //Verify that all jar files on the database classpath are in the data dictionary.
    if (dbcp != null)
    {
      for (int ix=0;ix<dbcp.length;ix++)
      {
        SchemaDescriptor sd = dd.getSchemaDescriptor(dbcp[ix][IdUtil.DBCP_SCHEMA_NAME], null, false);

                FileInfoDescriptor fid = null
        if (sd != null)
          fid = dd.getFileInfoDescriptor(sd,dbcp[ix][IdUtil.DBCP_SQL_JAR_NAME]);     
View Full Code Here

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

  ** Methods of JarReader
  */
  public StorageFile getJarFile(String schemaName, String sqlName)
    throws StandardException {

    SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, null, true);
    FileInfoDescriptor fid = dd.getFileInfoDescriptor(sd,sqlName);
    if (fid == null)
      throw StandardException.newException(SQLState.LANG_FILE_DOES_NOT_EXIST, sqlName,schemaName);

    long generationId = fid.getGenerationId();
View Full Code Here

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

    {
      FromSubquery                fsq;
      ResultSetNode        rsn;
      ViewDescriptor        vd;
      CreateViewNode        cvn;
      SchemaDescriptor      compSchema;

      /* Get the associated ViewDescriptor so that we can get
       * the view definition text.
       */
      vd = dataDictionary.getViewDescriptor(tableDescriptor);
View Full Code Here

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

    */
  private  TableDescriptor  bindTableDescriptor()
    throws StandardException
  {
    String schemaName = tableName.getSchemaName();
    SchemaDescriptor sd = getSchemaDescriptor(schemaName);

    tableDescriptor = getTableDescriptor(tableName.getTableName(), sd);
    if (tableDescriptor == null)
    {
      // Check if the reference is for a synonym.
View Full Code Here

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

        ** - Else Set the default schema to APP.
        */
        if (cachedInitialDefaultSchemaDescr == null) {
            DataDictionary dd = getDataDictionary();
            String authorizationId = getSessionUserId();
            SchemaDescriptor sd =
                dd.getSchemaDescriptor(
                    getSessionUserId(), getTransactionCompile(), false);

            if (sd == null) {
                sd = new SchemaDescriptor(
                    dd,
                    getSessionUserId(),
                    getSessionUserId(),
                    (UUID) null,
                    false);
View Full Code Here

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

        // can be relied on, AFAICT.
        //
        // (*) SpaceTable#getConglomInfo,
        //     SystemProcedures#{INSTALL|REPLACE|REMOVE}_JAR

        SchemaDescriptor s = getDefaultSchema();
        if( null == s)
            return null;
        return s.getSchemaName();
    }
View Full Code Here

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

    /**
     * @see LanguageConnectionContext#getCurrentSchemaName(Activation a)
     */
    public String getCurrentSchemaName(Activation a)
    {
        SchemaDescriptor s = getDefaultSchema(a);
        if( null == s)
            return null;
        return s.getSchemaName();
    }
View Full Code Here

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

     */
    public void resetSchemaUsages(Activation activation, String schemaName)
            throws StandardException {

        Activation parent = activation.getParentActivation();
        SchemaDescriptor defaultSchema = getInitialDefaultSchemaDescriptor();

        // walk SQL session context chain
        while (parent != null) {
            SQLSessionContext ssc = parent.getSQLSessionContextForChildren();
            SchemaDescriptor s = ssc.getDefaultSchema();

            if (SanityManager.DEBUG) {
                SanityManager.ASSERT(s != null, "s should not be empty here");
            }

            if (schemaName.equals(s.getSchemaName())) {
                ssc.setDefaultSchema(defaultSchema);
            }
            parent = parent.getParentActivation();
        }

        // finally top level
        SQLSessionContext top = getTopLevelSQLSessionContext();
        SchemaDescriptor sd = top.getDefaultSchema();

        if (SanityManager.DEBUG) {
            SanityManager.ASSERT(sd != null, "sd should not be empty here");
        }

        if (schemaName.equals(sd.getSchemaName())) {
            top.setDefaultSchema(defaultSchema);
        }
    }
View Full Code Here

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

            sc.setRole(getCurrentRoleId(a));
        }


        if (definersRights) {
            SchemaDescriptor sd = getDataDictionary().getSchemaDescriptor(
                definer,
                getTransactionExecute(),
                false);

            if (sd == null) {
                sd = new SchemaDescriptor(
                    getDataDictionary(), definer, definer, (UUID) null, false);
            }

            sc.setDefaultSchema(sd);
        } else {
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.