Examples of DataDictionary


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

    LanguageConnectionContext lcc       = ConnectionUtil.getCurrentLCC();
    TransactionController     tc        = lcc.getTransactionExecute();

    try
        {
            DataDictionary data_dictionary = lcc.getDataDictionary();

            // Each of the following may give up locks allowing ddl on the
            // table, so each phase needs to do the data dictionary lookup.
            // The order is important as it makes sense to first purge
            // deleted rows, then defragment existing non-deleted rows, and
View Full Code Here

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

    ** user.
        ** - Else Set the default schema to APP.
        */
    // SchemaDescriptor sd;

    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.DataDictionary

   * @exception StandardException if an error occurs
   */
  private String getQueryFromDescription(String queryName, boolean net)
    throws StandardException
  {
    DataDictionary dd = getLanguageConnectionContext().getDataDictionary();

    // If dictionary version is below 10.2, special case
    // getColumnPrivileges and getTablePrivileges since new system tables
    // for privileges wouldn't be present.
    if (!dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_2, null))
    {
      if (queryName.equals("getColumnPrivileges"))
        queryName = "getColumnPrivileges_10_1";

      if (queryName.equals("getTablePrivileges"))
View Full Code Here

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

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

     * 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

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

      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

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

   * @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

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

   * @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

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

        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

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

   *
   * @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
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.