Examples of Sequence


Examples of org.h2.schema.Sequence

        return fileLockMethod == FileLock.LOCK_SERIALIZED;
    }

    private void flushSequences() {
        for (SchemaObject obj : getAllSchemaObjects(DbObject.SEQUENCE)) {
            Sequence sequence = (Sequence) obj;
            sequence.flushWithoutMargin();
        }
    }

Examples of org.h2.schema.Sequence

        case NULLIF:
            result = database.areEqual(v0, v1) ? ValueNull.INSTANCE : v0;
            break;
            // system
        case NEXTVAL: {
            Sequence sequence = getSequence(session, v0, v1);
            SequenceValue value = new SequenceValue(sequence);
            result = value.getValue(session);
            break;
        }
        case CURRVAL: {
            Sequence sequence = getSequence(session, v0, v1);
            result = ValueLong.get(sequence.getCurrentValue());
            break;
        }
        case CSVREAD: {
            String fileName = v0.getString();
            String columnList = v1 == null ? null : v1.getString();

Examples of org.h2.schema.Sequence

        }
        if (schema == null) {
            schema = session.getCurrentSchemaName();
        }
        if (readIf("NEXTVAL")) {
            Sequence sequence = findSequence(schema, objectName);
            if (sequence != null) {
                return new SequenceValue(sequence);
            }
        } else if (readIf("CURRVAL")) {
            Sequence sequence = findSequence(schema, objectName);
            if (sequence != null) {
                Function function = Function.getFunction(database, "CURRVAL");
                function.setParameter(0, ValueExpression.get(ValueString.get(sequence.getSchema().getName())));
                function.setParameter(1, ValueExpression.get(ValueString.get(sequence.getName())));
                function.doneWithParameters();
                return function;
            }
        }
        return null;

Examples of org.h2.schema.Sequence

                    } else {
                        r = new ExpressionColumn(database, null, null, name);
                    }
                } else if (equalsToken("NEXT", name) && readIf("VALUE")) {
                    read("FOR");
                    Sequence sequence = readSequence();
                    r = new SequenceValue(sequence);
                } else if (currentTokenType == VALUE && currentValue.getType() == Value.STRING) {
                    if (equalsToken("DATE", name)) {
                        String date = currentValue.getString();
                        read();

Examples of org.h2.schema.Sequence

        }
        if (readIf("NULL_TO_DEFAULT")) {
            column.setConvertNullToDefault(true);
        }
        if (readIf("SEQUENCE")) {
            Sequence sequence = readSequence();
            column.setSequence(sequence);
        }
        if (readIf("SELECTIVITY")) {
            int value = getPositiveInt();
            column.setSelectivity(value);

Examples of org.h2.schema.Sequence

        return command;
    }

    private AlterSequence parseAlterSequence() {
        String sequenceName = readIdentifierWithSchema();
        Sequence sequence = getSchema().getSequence(sequenceName);
        AlterSequence command = new AlterSequence(session, sequence.getSchema());
        command.setSequence(sequence);
        if (readIf("RESTART")) {
            read("WITH");
            command.setStartWith(readExpression());
        }

Examples of org.h2.schema.Sequence

        }
        return null;
    }

    private Sequence findSequence(String schema, String sequenceName) {
        Sequence sequence = database.getSchema(schema).findSequence(sequenceName);
        if (sequence != null) {
            return sequence;
        }
        String[] schemaNames = session.getSchemaSearchPath();
        if (schemaNames != null) {

Examples of org.hamcrest.text.pattern.internal.ast.Sequence

    public static PatternComponent either(Object... alternatives) {
  return new Choice(toPatterns(alternatives));
    }

    public static PatternComponent sequence(Object... elements) {
  return new Sequence(toPatterns(elements));
    }

Examples of org.hibernate.validator.internal.engine.groups.Sequence

    }

    // now we process sequences. For sequences I have to traverse the object graph since I have to stop processing when an error occurs.
    Iterator<Sequence> sequenceIterator = validationOrder.getSequenceIterator();
    while ( sequenceIterator.hasNext() ) {
      Sequence sequence = sequenceIterator.next();
      for ( Group group : sequence.getComposingGroups() ) {
        int numberOfViolations = context.getFailingConstraints().size();
        valueContext.setCurrentGroup( group.getDefiningClass() );

        validateConstraintsForCurrentGroup( context, valueContext );
        if ( shouldFailFast( context ) ) {

Examples of org.jboss.test.xb.builder.object.type.accessor.support.Sequence

      super(name);
   }

   public void testUnmarshal() throws Exception
   {
      Sequence sequence = unmarshalObject(Sequence.class);
      assertEquals("one", sequence.getOne());
      assertEquals("two", sequence.getTwo());
      assertEquals("three", sequence.getThree());
   }
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.