Examples of SchemaDescriptor


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

                true);
    }

    private SchemaDescriptor newDeclaredGlobalTemporaryTablesSchemaDesc( String name)
    {
        return new SchemaDescriptor(this,
                                        name,
                                        authorizationDatabaseOwner,
                                        (UUID) null,
                                        false);
    }
View Full Code Here

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

    { return getBuiltinVTIClass( td, asTableFunction ); }
    else // see if it's a user-defined table function
    {
        String                          schemaName = td.getSchemaName();
        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

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

  private void dropJDBCMetadataSPSes(TransactionController tc) throws StandardException
  {
    for (java.util.Iterator it = getAllSPSDescriptors().iterator(); it.hasNext(); )
    {
      SPSDescriptor spsd = (SPSDescriptor) it.next();
      SchemaDescriptor sd = spsd.getSchemaDescriptor();

      // don't drop statements in non-system schemas
      if (!sd.isSystemSchema()) {
        continue;
      }

      dropSPSDescriptor(spsd, tc);
      dropDependentsStoredDependencies(spsd.getUUID(),                                                                                                              tc);
View Full Code Here

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

    DataDictionary dd = getDataDictionary();
        String authorizationId = getAuthorizationId();
 
    if ( (sd = dd.getSchemaDescriptor(authorizationId, getTransactionCompile(), false)) == null )
    {
      sd = new SchemaDescriptor(dd, authorizationId, authorizationId, (UUID) null, false);
    }
    return sd;
  }
View Full Code Here

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

    if (targetTableName != null)
    {
      /*
      ** Get the TableDescriptor for the table we are inserting into
      */
      SchemaDescriptor sdtc = getSchemaDescriptor(targetTableName.getSchemaName());

      targetTableDescriptor = getTableDescriptor(
              targetTableName.getTableName(), sdtc);

      if (targetTableDescriptor == null)
View Full Code Here

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

  * @exception  StandardException  throws on schema name
  *            that doesn't exist 
  */
  public SchemaDescriptor getSchemaDescriptor() throws StandardException
  {
    SchemaDescriptor    sd;

    sd = getSchemaDescriptor(targetTableName.getSchemaName());

    return sd;
 
View Full Code Here

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

                //
                // Unqualified function references should resolve to the
                // current schema at the time that the table was
                // created/altered. See DERBY-3945.
                //
                SchemaDescriptor    originalCurrentSchema = getSchemaDescriptor( di.getOriginalCurrentSchema(), true );
                compilerContext.pushCompilationSchema( originalCurrentSchema );

        try {
                    bindRowScopedExpression( getNodeFactory(), getContextManager(), targetTableDescriptor, sourceRCL, generationClause );
                }
View Full Code Here

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

      checkConstraints = generateCheckTree(relevantCdl,
                            targetTableDescriptor);

            if (checkConstraints != null)
      {
                SchemaDescriptor    originalCurrentSchema = targetTableDescriptor.getSchemaDescriptor();
                compilerContext.pushCompilationSchema( originalCurrentSchema );

                try {
                    bindRowScopedExpression(nodeFactory, getContextManager(),
                                            targetTableDescriptor,
View Full Code Here

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

    ** In the above view vt must be compiled against
    ** the X schema.
    */


    SchemaDescriptor sd = null;
    boolean isCurrent = false;
    boolean isCompilation = false;
    if (schemaName == null) {

      CompilerContext cc = getCompilerContext();
      sd = cc.getCompilationSchema();

      if (sd == null) {
        // Set the compilation schema to be the default,
        // notes that this query has schema dependencies.
        sd = getLanguageConnectionContext().getDefaultSchema();

        isCurrent = true;

        cc.setCompilationSchema(sd);
      }
      else
      {
        isCompilation = true;
      }
      schemaName = sd.getSchemaName();
    }

    DataDictionary dataDictionary = getDataDictionary();
    SchemaDescriptor sdCatalog = dataDictionary.getSchemaDescriptor(schemaName,
      getLanguageConnectionContext().getTransactionCompile(), raiseError);

    if (isCurrent || isCompilation) {
      //if we are dealing with a SESSION schema and it is not physically
      //created yet, then it's uuid is going to be null. DERBY-1706
      //Without the getUUID null check below, following will give NPE
      //set schema session; -- session schema has not been created yet
      //create table t1(c11 int);
      if (sdCatalog != null && sdCatalog.getUUID() != null)
      {
        // different UUID for default (current) schema than in catalog,
        // so reset default schema.
        if (!sdCatalog.getUUID().equals(sd.getUUID()))
        {
          if (isCurrent)
            getLanguageConnectionContext().setDefaultSchema(sdCatalog);
          getCompilerContext().setCompilationSchema(sdCatalog);
        }
View Full Code Here

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

    // Circular synonym references should have been detected at the DDL time, so
    // the following loop shouldn't loop forever.
    for (;;)
    {
      SchemaDescriptor nextSD = getSchemaDescriptor(nextSynonymSchema, false);
      if (nextSD == null || nextSD.getUUID() == null)
        break;
 
      AliasDescriptor nextAD = dd.getAliasDescriptor(nextSD.getUUID().toString(),
             nextSynonymTable, AliasInfo.ALIAS_NAME_SPACE_SYNONYM_AS_CHAR);
      if (nextAD == null)
        break;

      /* Query is dependent on the AliasDescriptor */
 
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.