Beispiel #1
0
        private void ProcessCreateSequence(Session session, SchemaManager schemaManager)
        {
            NumberSequence sequence = (NumberSequence)this.Arguments[0];

            this.SetOrCheckObjectName(session, null, sequence.GetName(), true);
            schemaManager.AddSchemaObject(sequence);
        }
Beispiel #2
0
 public override void WriteSequenceStatement(Session session, NumberSequence seq)
 {
     base.SchemaToLog = seq.GetName().schema;
     base.BusyWriting = true;
     this.WriteSessionIdAndSchema(session);
     this.RowOut.Reset();
     this.RowOut.Write(BytesSequence);
     this.RowOut.WriteString(seq.GetSchemaName().StatementName);
     this.RowOut.Write(0x2e);
     this.RowOut.WriteString(seq.GetName().StatementName);
     this.RowOut.Write(BytesSequenceMid);
     this.RowOut.WriteLong(seq.Peek());
     this.RowOut.Write(BytesLineSep);
     this.WriteRowOutToFile();
     base.ByteCount  += this.RowOut.Size();
     base.NeedsSync   = true;
     base.BusyWriting = false;
     if (base.forceSync)
     {
         base.Sync();
     }
 }
Beispiel #3
0
        public object GetSequenceValue(NumberSequence sequence)
        {
            if (this._sequenceMap == null)
            {
                this._sequenceMap      = new HashMap <QNameManager.QName, object>();
                this.SequenceUpdateSet = new OrderedHashSet <NumberSequence>();
            }
            QNameManager.QName key         = sequence.GetName();
            object             valueObject = this._sequenceMap.Get(key);

            if (valueObject == null)
            {
                valueObject = sequence.GetValueObject();
                this._sequenceMap.Put(key, valueObject);
                this.SequenceUpdateSet.Add(sequence);
            }
            return(valueObject);
        }