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

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


   */
  private void finishDDTransaction() throws StandardException {

    /* Was the data dictionary put into write mode? */
    if (ddWriteMode) {
      DataDictionary dd = getDataDictionary();

      /* Tell the data dictionary that the transaction is finished */
      dd.transactionFinished();

      /* The data dictionary isn't in write mode any more */
      ddWriteMode = false;
    }
  }
View Full Code Here


     * later, and the recompile is in a sub transaction, and will update the SYSSTATEMENTS
     * entry.  Don't want to block.
     */
    lcc.beginNestedTransaction(true);

    DataDictionary dd = getLanguageConnectionContext().getDataDictionary();
    SPSDescriptor spsd = dd.getSPSDescriptor(
                    spsName,
                    net ? dd.getSysIBMSchemaDescriptor() :
                    dd.getSystemSchemaDescriptor());
    lcc.commitNestedTransaction();

    if (spsd == null)
    {
      throw Util.notImplemented(spsName);
View Full Code Here

      return;

    if (autoincrementHT == null)
      autoincrementHT = new HashMap();

    DataDictionary dd = getDataDictionary();
    for (Iterator it = autoincrementCacheHashtable.keySet().iterator();
       it.hasNext(); )
    {
      Object key = it.next();
      AutoincrementCounter aic =
View Full Code Here

   * @exception StandardException    Thrown on error
   */

  public void bindStatement() throws StandardException
  {
    DataDictionary        dataDictionary;

    dataDictionary = getDataDictionary();
        checkIndexStats = (dataDictionary.getIndexStatsRefresher(true) != null);

    // This is how we handle queries like: SELECT A FROM T ORDER BY B.
    // We pull up the order by columns (if they don't appear in the SELECT
    // LIST) and let the bind() do the job.  Note that the pullup is done
    // before the bind() and we may avoid pulling up ORDERBY columns that
View Full Code Here

   * @exception StandardException    Thrown on error
   */
  void verifyTargetTable()
    throws StandardException
  {
                DataDictionary dataDictionary = getDataDictionary();
    if (targetTableName != null)
    {
      /*
      ** Get the TableDescriptor for the table we are inserting into
      */
 
View Full Code Here

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

   *
   * @exception StandardException    Thrown on error
   */
  public TableName resolveTableToSynonym(TableName tabName) throws StandardException
  {
    DataDictionary dd = getDataDictionary();
    String nextSynonymTable = tabName.getTableName();
    String nextSynonymSchema = tabName.getSchemaName();
    boolean found = false;
    CompilerContext cc = getCompilerContext();

    // 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

        // also nothing to do if the type has already been resolved
        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);
    }
View Full Code Here

   * @exception StandardException    Thrown on error
   */
  public void bindStatement() throws StandardException
  {
    CompilerContext compilerContext = getCompilerContext();
    DataDictionary  dd = getDataDictionary();
    /*
    ** Grab the current schema.  We will use that for
    ** sps compilation
    */
    LanguageConnectionContext lcc = getLanguageConnectionContext();
View Full Code Here

        ** default schema to the the schema with the same name as the
        ** user.
        ** - 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,
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.dictionary.DataDictionary

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.