Get object of record
426494
public static function find($id)
    {
        self::init();
        $query = 'SELECT * FROM ' . self::$modelTable . ' WHERE id = '.$id;
        $qb = new QueryBuilder(self::$connect, $query);
        $rows = $qb->get();
        $collection = self::makeCollection($rows);
        return !empty($collection) ? array_shift($collection) : null;
    }
18194
def read(self, primary_key):
    
        ''' 
             
        '''
        
        title = '%s.read' % self.__class__.__name__
        
    # retrieve record object
        # record_object = self.session.query(self.record).filter_by(id=primary_key).first()
        select_statement = self.table.select(self.table.c.id==primary_key)
        record_object = self.session.execute(select_statement).first()
        if not record_object:
            raise ValueError('%s(primary_key=%s) does not exist.' % (title, primary_key))
        
    # reconstruct record details
        record_details = self._reconstruct_record(record_object)
                    
        return record_details
22118
def get_record(cls, id_, with_deleted=False):
        
        with db.session.no_autoflush:
            query = RecordMetadata.query.filter_by(id=id_)
            if not with_deleted:
                query = query.filter(RecordMetadata.json != None)  # noqa
            obj = query.one()
            return cls(obj.json, model=obj)
146660
function getId(record) {
    Validate.isObject(record);
    Validate.notNull(record);

    for (var property in record) {
        if (property.toLowerCase() === idPropertyName.toLowerCase()) {
            return record[property];
        }
    }
}
875117
def _get_record_fields(d):
    
    if isinstance(d, dict):
        if "fields" in d:
            return d["fields"]
        else:
            for v in d.values():
                fields = _get_record_fields(v)
                if fields:
                    return fields
160458
public function get($object_id = 0, $where = '')
	{
		return new Record($object_id, $this->db, $this->table, $this->primary, $where, $this->select);
	}
414553
def from_record(cls, record):
        
        if not isinstance(record, pymarc.Record):
            raise TypeError('record must be of type pymarc.Record')
        record.__class__ = Record
        return record
854299
def get_record(self, zone_name, record_id):
        
        return self._client.get(
            '/domain/zone/{}/record/{}'.format(zone_name, record_id))
690412
function getRecords(records, config, accum = {}) {
  if ( Object.keys(RecordRegistry).length === 0 ) { return {} }
  return Object.keys(records)
    .reduce( (p, c) => getRecord(c, records[c], config, p), accum )
}
1026378
def get_object(self, item):
        
        if isinstance(item, six.string_types):
            item = self.object_manager.get(item)
        return item
714898
public static function parse($record): Record
    {
        if ($record instanceof Record) {
            return $record;
        }
        if ($record instanceof stdClass) {
            $record = (array)$record;
        }
        if (is_array($record)) {
            return static::make($record);
        }
        $type = gettype($record);
        if ($type === TYPE_OBJECT) {
            $type = get_class($type);
        }
        throw new SimplesRunTimeError("Record must be an array or instanceof Record '{$type}' given");
    }
497487
def object(self, session):
        ''''''
        if not hasattr(self, '_object'):
            pkname = self.model_type._meta.pkname()
            query = session.query(self.model_type).filter(**{pkname:
                                                             self.object_id})
            return query.items(callback=self.__set_object)
        else:
            return self._object
1036471
public function get_db_record() {
        global $DB;
        if ($record = $DB->get_record('course_categories', array('id' => $this->id))) {
            return $record;
        } else {
            return (object)convert_to_array($this);
        }
    }
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))
212604
public function getRecord()
    {
        if ($this->record) {
            return $this->record;
        }
        if (!$this->getForm()) {
            return null;
        }

        // Get record from form
        $record = $this->getForm()->getRecord();
        if ($record && ($record instanceof DataObject)) {
            $this->record = $record;
            return $record;
        }

        // Get record from controller
        $controller = $this->getForm()->getController();
        if ($controller
            && $controller->hasMethod('data')
            && ($record = $controller->data())
            && ($record instanceof DataObject)
        ) {
            $this->record = $record;
            return $record;
        }

        return null;
    }
265170
def get_object(self, queryset=None):
        """"""
        if settings.PODCAST_SINGULAR:
            show = get_object_or_404(Show, id=settings.PODCAST_ID)
        else:
            show = get_object_or_404(Show, slug=self.kwargs['show_slug'])
        obj = get_object_or_404(Episode, show=show, slug=self.kwargs['slug'])
        index = Episode.objects.is_public_or_secret().filter(show=show, pub_date__lt=obj.pub_date).count()
        obj.index = index + 1
        obj.index_next = obj.index + 1
        obj.index_previous = obj.index - 1
        return obj
1257084
def record_id(self, record, type_=None, selector=None):
        """"""
        pk = record_id(record, type_, selector, self.normalize_object_slot)
        return pk