Find a transaction on the distributed ledger by its sequence number.

        :param seq_no: transaction number
        :return: json sequence number of transaction, null for no match
323785
async def get_txn(self, seq_no: int) -> str:
        

        LOGGER.debug('BaseAnchor.get_txn >>> seq_no: %s', seq_no)

        rv_json = json.dumps({})
        req_json = await ledger.build_get_txn_request(self.did, None, seq_no)
        resp = json.loads(await self._submit(req_json))

        rv_json = self.pool.protocol.txn2data(resp)

        LOGGER.debug('BaseAnchor.get_txn <<< %s', rv_json)
        return rv_json
2686
public T get(long seqno) {
        lock.lock();
        try {
            if(seqno - low <= 0 || seqno - hr > 0)
                return null;
            int row_index=computeRow(seqno);
            if(row_index < 0 || row_index >= matrix.length)
                return null;
            T[] row=matrix[row_index];
            if(row == null)
                return null;
            int index=computeIndex(seqno);
            return index >= 0? row[index] : null;
        }
        finally {
            lock.unlock();
        }
    }
24035
def schema_key_for(self, seq_no: int) -> SchemaKey:
        

        LOGGER.debug('SchemaCache.schema_key_for >>> seq_no: %s', seq_no)

        rv = self._seq_no2schema_key.get(seq_no, None)

        LOGGER.debug('SchemaCache.schema_key_for <<< %s', rv)
        return rv
1268401
def get_transaction(num)
      index = RLP.encode num
      tx = @transactions.get index

      raise IndexError, "Transaction does not exist" if tx == Trie::BLANK_NODE
      RLP.decode tx, sedes: Transaction
    end
278032
private Node getSequence(IdSourceKey idSourceKey) {
		String updateSequenceQuery = getQuery( idSourceKey );
		Result result = neo4jDb.execute( updateSequenceQuery, singletonMap( SEQUENCE_NAME_QUERY_PARAM, (Object) sequenceName( idSourceKey ) ) );
		ResourceIterator<Node> column = result.columnAs( "n" );
		Node node = null;
		if ( column.hasNext() ) {
			node = column.next();
		}
		column.close();
		return node;
	}
570455
public T _get(long seqno) {
        lock.lock();
        try {
            int row_index=computeRow(seqno);
            if(row_index < 0 || row_index >= matrix.length)
                return null;
            T[] row=matrix[row_index];
            if(row == null)
                return null;
            int index=computeIndex(seqno);
            return index >= 0? row[index] : null;
        }
        finally {
            lock.unlock();
        }
    }
530681
def get_seq_number_from_id(id, id_template, prefix, **kw):
    
    separator = kw.get("separator", "-")
    postfix = id.replace(prefix, "").strip(separator)
    postfix_segments = postfix.split(separator)
    seq_number = 0
    possible_seq_nums = filter(lambda n: n.isalnum(), postfix_segments)
    if possible_seq_nums:
        seq_number = possible_seq_nums[-1]

    # Check if this id has to be expressed as an alphanumeric number
    seq_number = get_alpha_or_number(seq_number, id_template)
    seq_number = to_int(seq_number)
    return seq_number
692591
def get_next_value(
        sequence_name='default', initial_value=1, reset_value=None,
        *, nowait=False, using=None):
    
    # Inner import because models cannot be imported before their application.
    from .models import Sequence

    if reset_value is not None:
        assert initial_value < reset_value

    if using is None:
        using = router.db_for_write(Sequence)

    connection = connections[using]

    if (getattr(connection, 'pg_version', 0) >= 90500
            and reset_value is None and not nowait):

        # PostgreSQL ≥ 9.5 supports "upsert".

        with connection.cursor() as cursor:
            cursor.execute(UPSERT_QUERY, [sequence_name, initial_value])
            last, = cursor.fetchone()
        return last

    else:

        # Other databases require making more database queries.

        with transaction.atomic(using=using, savepoint=False):
            sequence, created = (
                Sequence.objects
                        .select_for_update(nowait=nowait)
                        .get_or_create(name=sequence_name,
                                       defaults={'last': initial_value})
            )

            if not created:
                sequence.last += 1
                if reset_value is not None and sequence.last >= reset_value:
                    sequence.last = initial_value
                sequence.save()

            return sequence.last
961458
def can_pp_seq_no_be_in_view(self, view_no, pp_seq_no):
        
        if view_no > self.viewNo:
            raise PlenumValueError(
                'view_no', view_no,
                "<= current view_no {}".format(self.viewNo),
                prefix=self
            )

        return view_no == self.viewNo or (
            view_no < self.viewNo and self.last_prepared_before_view_change and compare_3PC_keys(
                (view_no, pp_seq_no), self.last_prepared_before_view_change) >= 0)
927331
private Long getSequence(String sequenceName)
    {
        Long result = null;
        // now lookup the sequence map for calling DB
        Map mapForDB = (Map) sequencesDBMap.get(getBrokerForClass()
                .serviceConnectionManager().getConnectionDescriptor().getJcdAlias());
        if(mapForDB != null)
        {
            result = (Long) mapForDB.get(sequenceName);
        }
        return result;
    }
948853
def get_sequence(cls, entry):
        
        seq_tag = entry.find("./sequence")
        seq = seq_tag.text
        seq_tag.clear()
        return models.Sequence(sequence=seq)
189582
def get_sequence(self):
        
        if not self.address:
            raise StellarAddressInvalidError('No address provided.')

        address = self.horizon.account(self.address)
        return int(address.get('sequence'))
18970
async def get_txn(self, txn: int) -> str:
        

        LOGGER.debug('_BaseAgent.get_txn >>> txn: %s', txn)

        rv_json = json.dumps({})
        req_json = await ledger.build_get_txn_request(self.did, None, txn)
        resp = json.loads(await self._submit(req_json))

        rv_json = json.dumps((resp['result'].get('data', {}) or {}).get('txn', {}))  # "data": null for no such txn
        LOGGER.debug('_BaseAgent.get_txn <<< %s', rv_json)
        return rv_json
266484
def check_tx(self, tx) -> ResponseCheckTx:
        
        value = decode_number(tx)
        if not value == (self.txCount + 1):
            # respond with non-zero code
            return ResponseCheckTx(code=1)
        return ResponseCheckTx(code=CodeTypeOk)
362237
def seq():
    
    current_frame     = inspect.currentframe().f_back
    trace_string      = ""
    while current_frame.f_back:
      trace_string = trace_string + current_frame.f_back.f_code.co_name
      current_frame = current_frame.f_back
    return counter.get_from_trace(trace_string)
199907
protected function getNextTransactionSequenceNumber()
    {
        $query = "SELECT MAX(sequence_number) AS max_sequence_number
                    FROM `pkg_shop_payment_transaction`
                   WHERE `pkg_shop_payment_transaction`.`shop_order_id` = '".MySqlLegacySupport::getInstance(
            )->real_escape_string(
                $this->order->id
            )."'
                GROUP BY `pkg_shop_payment_transaction`.`shop_order_id`
                 ";
        if ($aSum = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {
            $iSequenceNumber = $aSum['max_sequence_number'] + 1;
        } else {
            $iSequenceNumber = 1;
        }

        return $iSequenceNumber;
    }
1004877
@Programmatic
    public PublishedEvent findByTransactionIdAndSequence(final UUID transactionId, final int sequence) {
        return repositoryService.uniqueMatch(
                new QueryDefault<>(PublishedEvent.class,
                        "findByTransactionIdAndSequence",
                        "transactionId", transactionId,
                        "sequence", sequence
                ));
    }