Fetch row using primary key -
        will use existing object in session if already present

        :param resource_id:
        :param db_session:
        :return:
324915
def get(cls, resource_id, db_session=None):
        
        db_session = get_db_session(db_session)
        return db_session.query(cls.model).get(resource_id)
1200204
def fetch_by_id(model, id, filters = {})
      get_resource("/v1/public/#{model}/#{id}", filters) if model_exists?(model) && validate_filters(filters)
    end
1173312
def get_resource(self, session, query, api_type, obj_id):
        
        resource = self._fetch_resource(session, api_type, obj_id,
                                        Permissions.VIEW)
        include = self._parse_include(query.get('include', '').split(','))
        fields = self._parse_fields(query)

        response = JSONAPIResponse()

        built = self._render_full_resource(resource, include, fields)

        response.data['included'] = list(built.pop('included').values())
        response.data['data'] = built

        return response
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;
    }
1102995
def fetch(self):
        
        LOGGER.debug('Fetching session data: %s', self.id)
        result = yield gen.Task(RedisSession._redis_client.get, self._key)
        if result:
            self.loads(result)
            raise gen.Return(True)
        else:
            raise gen.Return(False)
878678
def do_get_session(self, session_key):
        
        session_id = session_key.session_id
        msg = ("do_get_session: Attempting to retrieve session with key " +
               str(session_id))
        logger.debug(msg)

        session = self._retrieve_session(session_key)

        if (session is not None):
            self.validate(session, session_key)

        return session
1261016
def post(self):
        

        resource_data = self.request.json

        record = {'id': str(len(resource_db) + 1),
                  'name': resource_data.get('name')}

        resource_db.append(record)

        return self.response_factory.ok(data=record)
798773
function ( req ) {

    var pk = req.options.id || (req.options.where && req.options.where.id) || req.param('id');

    // TODO: make this smarter...
    // (e.g. look for actual primary key of model and look for it
    //  in the absence of `id`.)
    // See coercePK for reference (although be aware it is not currently in use)

    // exclude criteria on id field
    pk = _.isPlainObject(pk) ? undefined : pk;
    return pk;
  }
1469
def fetchone(self):
        
        if self._state == self._STATE_NONE:
            raise Exception("No query yet")
        if not self._data:
            return None
        else:
            self._rownumber += 1
            return self._data.pop(0)
1249256
def FetchResponses(self, session_id):
    
    timestamp = (0, self.frozen_timestamp or rdfvalue.RDFDatetime.Now())

    for response in self.data_store.FetchResponsesForWellKnownFlow(
        session_id, self.response_limit, timestamp=timestamp):
      yield response
1373735
def fetch_related_resource_id_tree(relationship)
      relationship_name = relationship.name.to_sym
      @related_resource_id_trees[relationship_name] ||= RelatedResourceIdTree.new(relationship, self)
    end
48537
def retrieve(self):
        

        data = self.resource(self.id).get()
        self.data = data

        return data
290167
def _get_record(self):
        
        if not self.pk:
            raise AJAXError(400, _('Invalid request for record.'))

        try:
            return self.model.objects.get(pk=self.pk)
        except self.model.DoesNotExist:
            raise AJAXError(404, _('%s with id of "%s" not found.') % (
                self.model.__name__, self.pk))
1117505
def get(self, id):
        
        id = self.key_name(id)
        session_json = self.redis.get(id) or '{}'
        return json_loads(session_json)
970871
def fetch(self, id_, return_fields=None):
        
        game_params = {"id": id_}

        if return_fields is not None:
            self._validate_return_fields(return_fields)
            field_list = ",".join(return_fields)

            game_params["field_list"] = field_list

        response = self._query(game_params, direct=True)

        return response
1141674
def get(self, uid=None):
        
        # Return resource collection

        if uid is None:
            return self.response_factory.ok(data=resource_db)

        # Return resource based on UID.

        try:
            record = [r for r in resource_db if r.get('id') == uid].pop()

        except IndexError:
            return self.response_factory.not_found(errors=['Resource with UID {} does not exist.'.format(uid)])

        return self.response_factory.ok(data=record)
1322589
def get_table(self, id_or_name):
        
        url = self.build_url(self._endpoints.get('get_table').format(id=id_or_name))
        response = self.session.get(url)
        if not response:
            return None
        return self.table_constructor(parent=self, **{self._cloud_data_key: response.json()})