Fetches a tx by id
187130
def get_by_id(self, tx_id: str) -> ScheduledTransaction:
        
        return self.query.filter(ScheduledTransaction.guid == tx_id).first()
746620
def txinfo(self, txid: str) -> dict:
        ''''''

        return cast(dict, self.ext_fetch('txinfo/' + txid))
1040610
public function fetch($transaction_id)
    {
        $url = 'transactions/' . $transaction_id;

        $api_response = $this->paylike->client->request('GET', $url);

        return $api_response->json['transaction'];
    }
250668
public static BaasResult<BaasDocument> fetchSync(String collection,String id){
        return fetchSync(collection,id,false);
    }
1190895
function find(model, id, tx, callback) {
    var
        sql,
        select,
        where,
        append,
        params,
        parsed,
        complexFind = typeof id === 'object';
    if (complexFind) {
        parsed = parseFindOptions(model, id, true);

        select = parsed.select;
        where = parsed.where;
        append = parsed.append;
        params = parsed.params;
    } else {
        // by primary key:
        select = model.__selectAttributesNames;
        where = '`' + model.__primaryKey + '`=?';
        append = '';
        params = [id];
    }
    sql = utils.format('select %s from `%s` where %s %s', select, model.__table, where, append);
    smartRunSQL(model.__pool, sql, params, tx, function (err, results) {
        if (err) {
            return callback(err);
        }
        if (results.length > 1) {
            return callback(new Error('Multiple results found.'));
        }
        return callback(null, results.length === 0 ? null : model.__warp.__createInstance(model, results[0]));
    });
}
401167
def tx_for_tx_hash(self, tx_hash):
        ""
        url = self.base_url("get_tx", b2h_rev(tx_hash))
        r = json.loads(urlopen(url).read().decode("utf8"))
        tx = Tx.parse(io.BytesIO(h2b(r.get("data").get("tx_hex"))))
        return tx
599133
def fetch(bank, key):
    '''
    
    '''
    _init_client()
    query = "SELECT data FROM {0} WHERE bank='{1}' AND etcd_key='{2}'".format(
        _table_name, bank, key)
    cur, _ = run_query(client, query)
    r = cur.fetchone()
    cur.close()
    if r is None:
        return {}
    return __context__['serial'].loads(r[0])
1167658
def fetch_transaction_status(self, transaction_id):
        
        url = "%s%s%s/status" % (self.api_endpoint, constants.TRANSACTION_STATUS_ENDPOINT, transaction_id)

        username = self.base.get_username()
        password = self.base.get_password(username=username, request_url=url)

        response = requests.get(url, auth=HTTPBasicAuth(username=username, password=password))

        if response.status_code == 404:
            raise TransactionDoesNotExist('Wrong transaction ID!')

        if not self.base.verify_response(response.json()):
            raise SignatureValidationException('Server signature verification has failed')

        return response.json()
965638
static function fetch( $contentAttributeID, $contentObjectVersion, $currencyCode = false, $type = false, $asObjects = true )
    {
        $priceList = null;
        $conds = array();

        $conds['contentobject_attr_id'] = $contentAttributeID;
        $conds['contentobject_attr_version'] = $contentObjectVersion;

        if ( is_array( $currencyCode ) )
            $conds['currency_code'] = array( $currencyCode );
        else if ( $currencyCode != false )
            $conds['currency_code'] = $currencyCode;

        if ( is_array( $type ) )
            $conds['type'] = array( $type );
        else if ( $type != false )
            $conds['type'] = $type;



        $sort = null;
        $limitation = null;

        $rows = eZPersistentObject::fetchObjectList( eZMultiPriceData::definition(),
                                                     null,
                                                     $conds,
                                                     $sort,
                                                     $limitation,
                                                     $asObjects );


        if ( count( $rows ) > 0 )
        {
            $keys = array_keys( $rows );
            foreach ( $keys as $key )
            {
                if ( $asObjects )
                    $priceList[$rows[$key]->attribute( 'currency_code' )] = $rows[$key];
                else
                    $priceList[$rows[$key]['currency_code']] = $rows[$key];
            }
        }

        return $priceList;
    }
1174243
def get_by_id(id)
      accts = @accounts.select {|acct| acct.uuid == id }

      if accts.size == 0
        raise KeyError, "account with id #{id} unknown"
      elsif accts.size > 1
        logger.warn "multiple accounts with same UUID found", uuid: id
      end

      accts[0]
    end
525484
def _get(self, id):
		""
		VALUE_SQL = "SELECT karmavalue from karma_values where karmaid = ?"
		KEYS_SQL = "SELECT karmakey from karma_keys where karmaid = ?"
		value = self.db.execute(VALUE_SQL, [id]).fetchall()[0][0]
		keys_cur = self.db.execute(KEYS_SQL, [id]).fetchall()
		keys = sorted(x[0] for x in keys_cur)
		return keys, value
1169907
def namedb_get_value_hash_txids(cur, value_hash):
    
    query = 'SELECT txid FROM history WHERE value_hash = ? ORDER BY block_id,vtxindex;'
    args = (value_hash,)

    rows = namedb_query_execute(cur, query, args)
    txids = []
    
    for r in rows:
        # present
        txid = str(r['txid'])
        txids.append(txid)

    return txids
493555
def get_by_id(self, id):
        """"""
        with contextlib.closing(self.database.cursor()) as cursor:
            cursor.execute('SELECT id, name FROM users WHERE id=?', (id,))
            return cursor.fetchone()
731807
def get_asset_id(self, tx_id):
        
        tx = self.driver.instance.transactions.retrieve(txid=tx_id)
        assert tx is not None
        return tx['id'] if tx['operation'] == 'CREATE' else tx['asset']['id']
102532
def fetch(cls, id, api_key=None, endpoint=None, add_headers=None,
              **kwargs):
        
        if endpoint is None:
            endpoint = cls.get_endpoint()

        inst = cls(api_key=api_key)
        parse_key = cls.sanitize_ep(endpoint).split("/")[-1]
        endpoint = '/'.join((endpoint, id))
        data = cls._parse(inst.request('GET',
                                       endpoint=endpoint,
                                       add_headers=add_headers,
                                       query_params=kwargs),
                          key=parse_key)
        inst._set(data)
        return inst
486861
@Override
    public Record get(final String tableName, final URI id) throws IOException
    {
        logger.debug("TEPHRA Begin of get(" + tableName + ", " + id + ")");
        final TransactionAwareHTable txTable = (TransactionAwareHTable) getTable(tableName);
        Record resGotten = null;
        if (txTable != null) {
            // Resource's Key
            final Get get = new Get(Bytes.toBytes(id.toString())).setMaxVersions(1);
            final Result rs = txTable.get(get);
            logger.debug("Value obtained: " + new String(rs.value()));
            final AvroSerializer serializer = getSerializer();
            resGotten = (Record) serializer.fromBytes(rs.value());
        }
        return resGotten;
    }
236844
def retrieve_by_id(self, id_):
        """"""
        items_with_id = [item for item in self if item.id == int(id_)]
        if len(items_with_id) == 1:
            return items_with_id[0].retrieve()