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

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


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

    {
      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

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

    private SchemaDescriptor newSystemSchemaDesc(
    String  name,
    String  uuid)
    {
        return new SchemaDescriptor(
                this,
                name,
                authorizationDatabaseOwner,
                uuidFactory.recreateUUID(uuid),
                true);
View Full Code Here

                true);
    }

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

    ** we must have just read ourselves in. 
    ** So we will get the corresponding schema
    ** descriptor from the data dictionary.
    */

    SchemaDescriptor tdSd = td.getSchemaDescriptor();
    SchemaDescriptor constraintSd =
      constraintSchemaName == null ? tdSd : dd.getSchemaDescriptor(constraintSchemaName, tc, true);


    /* Get the constraint descriptor for the index, along
     * with an exclusive row lock on the row in sys.sysconstraints
     * in order to ensure that no one else compiles against the
     * index.
     */
    if (constraintName == null// this means "alter table drop primary key"
      conDesc = dd.getConstraintDescriptors(td).getPrimaryKey();
    else
      conDesc = dd.getConstraintDescriptorByName(td, constraintSd, constraintName, true);

    // Error if constraint doesn't exist
    if (conDesc == null)
    {
      String errorName = constraintName == null ? "PRIMARY KEY" :
                (constraintSd.getSchemaName() + "."+ constraintName);

      throw StandardException.newException(SQLState.LANG_DROP_NON_EXISTENT_CONSTRAINT,
            errorName,
            td.getQualifiedName());
    }
View Full Code Here

   */
  public QueryTreeNode bind() throws StandardException
  {
    CompilerContext      cc = getCompilerContext();
    DataDictionary      dd = getDataDictionary();
    SchemaDescriptor    sd;

    sd = getSchemaDescriptor();

    if (sd.getUUID() != null)
      cd = dd.getConglomerateDescriptor(getRelativeName(), sd, false);

    if (cd == null)
    {
      throw StandardException.newException(SQLState.LANG_INDEX_NOT_FOUND, getFullName());
View Full Code Here

   */
  public QueryTreeNode bind() throws StandardException
  {
    CompilerContext      cc = getCompilerContext();
    DataDictionary      dd = getDataDictionary();
    SchemaDescriptor    sd;

    sd = getSchemaDescriptor();

    if (sd.getUUID() != null)
      cd = dd.getConglomerateDescriptor(getRelativeName(), sd, false);

    if (cd == null)
    {
      throw StandardException.newException(SQLState.LANG_INDEX_NOT_FOUND, getFullName());
View Full Code Here

    ** we are caching it).
    */
    DataDictionary dd = getDataDictionary();

    String schemaName = name.getSchemaName();
    SchemaDescriptor sd = getSchemaDescriptor(name.getSchemaName());
    if (schemaName == null)
      name.setSchemaName(sd.getSchemaName());

    if (sd.getUUID() != null)
      spsd = dd.getSPSDescriptor(name.getTableName(), sd);

    if (spsd == null)
    {
      throw StandardException.newException(SQLState.LANG_OBJECT_NOT_FOUND, "STATEMENT", name);
View Full Code Here

TOP

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

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.