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

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


             TupleDescriptor parentTupleDescriptor,
             DataDictionary dd)
            throws StandardException {

        DataValueDescriptor col;
        SequenceDescriptor descriptor;
        UUID ouuid;
        String sequenceName;
        UUID suuid;
        Long currentValue;
        long startValue;
View Full Code Here


           
            _dd.computeSequenceRowLocation( readOnlyTC, _uuidString, rowLocation, sequenceDescriptor );
           
            _sequenceRowLocation = rowLocation[ 0 ];
           
            SequenceDescriptor isd = sequenceDescriptor[ 0 ];
           
            return new SequenceGenerator
                (
                 isd.getCurrentValue(),
                 isd.canCycle(),
                 isd.getIncrement(),
                 isd.getMaximumValue(),
                 isd.getMinimumValue(),
                 isd.getStartValue(),
                 isd.getSchemaDescriptor().getSchemaName(),
                 isd.getSequenceName(),
                 makePreallocator( readOnlyTC )
                 );
        }
View Full Code Here

        if (
            targetTableDescriptor.tableHasAutoincrement() &&
            dd.checkVersion( DataDictionary.DD_VERSION_DERBY_10_11, null )
            )
        {
            SequenceDescriptor  seq = dd.getSequenceDescriptor
                (
                 dd.getSystemSchemaDescriptor(),
                 TableDescriptor.makeSequenceName( targetTableDescriptor.getUUID() )
                 );
            identitySequenceUUIDString = seq.getUUID().toString();
        }
       
        getCompilerContext().removePrivilegeFilter( ignorePermissions );
    getCompilerContext().popCurrentPrivType();
  }
View Full Code Here

                csca.executeConstantAction( activation );

                // reset the current value of the sequence generator as necessary
                if ( columnInfo[ix].action == ColumnInfo.MODIFY_COLUMN_DEFAULT_INCREMENT )
                {
                    SequenceDescriptor  sequence = dd.getSequenceDescriptor
                        ( dd.getSystemSchemaDescriptor(), sequenceName );
                    RowLocation[] rowLocation = new RowLocation[ 1 ];
                    SequenceDescriptor[] sequenceDescriptor = new SequenceDescriptor[ 1 ];
           
                    dd.computeSequenceRowLocation
                        ( tc, sequence.getUUID().toString(), rowLocation, sequenceDescriptor );
                    dd.updateCurrentSequenceValue
                        ( tc, rowLocation[ 0 ], true, null, currentValue );
                }
               
            }
View Full Code Here

           
            _dd.computeSequenceRowLocation( readOnlyTC, _uuidString, rowLocation, sequenceDescriptor );
           
            _sequenceRowLocation = rowLocation[ 0 ];
           
            SequenceDescriptor isd = sequenceDescriptor[ 0 ];
           
            return new SequenceGenerator
                (
                 isd.getCurrentValue(),
                 isd.canCycle(),
                 isd.getIncrement(),
                 isd.getMaximumValue(),
                 isd.getMinimumValue(),
                 isd.getStartValue(),
                 isd.getSequenceName()
                 );
        }
View Full Code Here

        ** the transaction.
        */
        dd.startWriting(lcc);
        dd.clearSequenceCaches();

        SequenceDescriptor sequenceDescriptor = dd.getSequenceDescriptor(schemaDescriptor, sequenceName);

        if (sequenceDescriptor == null) {

            throw StandardException.newException(SQLState.LANG_OBJECT_NOT_FOUND_DURING_EXECUTION, "SEQUENCE",
                    (schemaDescriptor.getObjectName() + "." + sequenceName));
        }

        sequenceDescriptor.drop(lcc);
    }
View Full Code Here

        /* Set up the start/stop position for the scan */
        ExecIndexRow keyRow = exFactory.getIndexableRow(1);
        keyRow.setColumn(1, UUIDStringOrderable);

        SequenceDescriptor  sequenceDescriptor = (SequenceDescriptor)
                getDescriptorViaIndex(
                        SYSSEQUENCESRowFactory.SYSSEQUENCES_INDEX1_ID,
                        keyRow,
                        (ScanQualifier[][]) null,
                        ti,
View Full Code Here

        /* Set up the start/stop position for the scan */
        ExecIndexRow keyRow = exFactory.getIndexableRow(2);
        keyRow.setColumn(1, schemaIDOrderable);
        keyRow.setColumn(2, sequenceNameOrderable);

        SequenceDescriptor  sequenceDescriptor = (SequenceDescriptor)
                getDescriptorViaIndex(
                        SYSSEQUENCESRowFactory.SYSSEQUENCES_INDEX2_ID,
                        keyRow,
                        (ScanQualifier[][]) null,
                        ti,
View Full Code Here

            if ( uuid !=  null ) { return uuid; }
        }

        // oops, not saved in the sequenceID map yet. lookup the sequence.
        // this will save the uuid in the sequenceID map.
        SequenceDescriptor    desc = getSequenceDescriptor
            ( getSchemaDescriptor( schemaName, getTransactionCompile(), true ), sequenceName );

        if ( desc == null ) { return null; }
        else { return desc.getUUID().toString(); }
    }
View Full Code Here

           
            _dd.computeSequenceRowLocation( readOnlyTC, _uuidString, rowLocation, sequenceDescriptor );
           
            _sequenceRowLocation = rowLocation[ 0 ];
           
            SequenceDescriptor isd = sequenceDescriptor[ 0 ];
           
            return new SequenceGenerator
                (
                 isd.getCurrentValue(),
                 isd.canCycle(),
                 isd.getIncrement(),
                 isd.getMaximumValue(),
                 isd.getMinimumValue(),
                 isd.getStartValue(),
                 isd.getSequenceName()
                 );
        }
View Full Code Here

TOP

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

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.