read current data of db row from plc
778794
def read(self, client):
        
        assert(isinstance(self._bytearray, DB))
        assert(self.row_size >= 0)
        db_nr = self._bytearray.db_number
        _bytearray = client.db_read(db_nr, self.db_offset, self.row_size)

        data = self.get_bytearray()
        # replace data in bytearray
        for i, b in enumerate(_bytearray):
            data[i + self.db_offset] = b
114871
def retrieve_nulldata(self, txid):
        """"""
        rawtx = self.retrieve_tx(txid)
        return self.get_nulldata(rawtx)
682236
def get_data(self, ptr, unbuffered=False):
        """"""
        result = _decode(self.get_raw_data(ptr, unbuffered),
                         self._reading_format[self.ws_type])
        return result
566505
protected function prepareCurrentRow(): void
    {
        $this->currentRow = array_shift($this->bufferedRow);
        if (\is_array($this->currentRow)) {
            $datas = [];
            foreach ($this->currentRow as $key => $value) {
                if ($this->hasHeaders) {
                    $datas[$this->columns[$key]] = html_entity_decode($value);
                } else {
                    $datas[$key] = html_entity_decode($value);
                }
            }
            $this->currentRow = $datas;
        }
    }
377193
def read_info(self):
        '''
        
        '''
        self.select('*')
        row = self._cursor.fetchone()
        if not row:
            return None
        info_d = self.row_to_dict(row)
        return SessionInfo.from_dict(info_d)
678202
def read(database, table, key):
    """"""
    with database.snapshot() as snapshot:
        result = snapshot.execute_sql('SELECT u.* FROM %s u WHERE u.id="%s"' %
                                      (table, key))
        for row in result:
            key = row[0]
        for i in range(NUM_FIELD):
            field = row[i + 1]
674065
def read(self):
        

        if self._current >= len(self._data):
            return None
        self._current += 1
        return self._data[self._current - 1]
131932
public function current()
    {
        $this->result = array();

        // revert necessary delimiter
        $this->revert = $this->option['delimiter'];

        // loop over the lines
        while ($this->iterator->valid()) {
            $line = $this->iterator->current();
            $line = mb_convert_encoding($line, 'UTF-8', isset($this->option['encoding']) ? $this->option['encoding'] : 'auto');

            // split the line by 'delimiter'
            $tokens = explode($this->option['delimiter'], $line);

            // loop over the columns
            foreach ($tokens as $value) {
                $value = preg_replace('/"(\r\n|\r|\n)*$/', '"', $value);

                // check the first letter is 'enclosure' or not
                if (substr($value, 0, 1) == $this->option['enclosure']) {
                    // check the last letter is 'enclosure'
                    if (substr($value, -1) == $this->option['enclosure']) {
                        $this->processEnclosedField($value, $this->option);
                    } else {
                        $this->processContinuousField($value, $this->option);
                    }

                } else { // first letter is NOT 'enclosure'
                    // check the last letter is 'enclosure'
                    if(substr($value, -1) == $this->option['enclosure']) {
                        $this->processClosingField($value, $this->option);
                    } else {
                        $this->processField($value, $this->option);
                    }
                }

                if ($this->revert == "") {
                    $this->revert = $this->option['delimiter'];
                }
            }

            // If the cell is closed, reset the column index and go to next row.
            if(!$this->continue) {
                $this->col = 0;
                break;
            }

            $this->revert = "";
            $this->iterator->next();
        }

        return $this->result;
    }
861848
@Override
    public List readData(String tableName, EntityMetadata m, final Object rowKey, byte[] startRow, byte[] endRow,
            List<Map<String, Object>> columnsToOutput, FilterList filterList) throws IOException
    {
        Table hTable = gethTable(tableName);
        filterList = getExtPropertyFilters(m, filterList);
        boolean isFindKeyOnly = HBaseUtils.isFindKeyOnly(m, columnsToOutput);
        filterList = onFindKeyOnly(filterList, isFindKeyOnly);
        List<HBaseDataWrapper> results = hbaseReader.loadData(hTable, rowKey, startRow, endRow, null, filterList,
                !isFindKeyOnly ? columnsToOutput : new ArrayList<Map<String, Object>>());
        return onRead(m, columnsToOutput, hTable, results);
    }
536926
def _perform_read(self, addr, size):
        """"""
        return self._machine_controller.read(addr, size, self._x, self._y, 0)
320563
def read_table(self):
        """"""
        self.bitcount = self.bits = 0
        tlen = unpack('>I', self.input.read(4))[0]
        table_data = AMQPReader(self.input.read(tlen))
        result = {}
        while table_data.input.tell() < tlen:
            name = table_data.read_shortstr()
            val = table_data.read_item()
            result[name] = val
        return result
162872
@Override
	public synchronized RecordContext read(long dataId) throws DatabaseException {
		try {
			psRead.setLong(1, dataId);
			
			try (ResultSet rs = psRead.executeQuery()) {
				RecordContext result = build(rs);
				return result;
			}
		} catch (SQLException e) {
			throw new DatabaseException(e);
		}
	}
459269
def stdin_read(self, data):
        

        data = data.strip().decode("utf-8")
        self.log("Incoming:", data, lvl=verbose)

        if len(data) == 0:
            self.log('Use /help to get a list of enabled cli hooks')
            return

        if data[0] == "/":
            cmd = data[1:]
            args = []
            if ' ' in cmd:
                cmd, args = cmd.split(' ', maxsplit=1)
                args = args.split(' ')
            if cmd in self.hooks:
                self.log('Firing hooked event:', cmd, args, lvl=debug)
                self.fireEvent(self.hooks[cmd](*args))
            # TODO: Move these out, so we get a simple logic here
            elif cmd == 'frontend':
                self.log("Sending %s frontend rebuild event" %
                         ("(forced)" if 'force' in args else ''))
                self.fireEvent(
                    frontendbuildrequest(force='force' in args,
                                         install='install' in args),
                    "setup")
            elif cmd == 'backend':
                self.log("Sending backend reload event")
                self.fireEvent(componentupdaterequest(force=False), "setup")
            else:
                self.log('Unknown Command:', cmd, '. Use /help to get a list of enabled '
                                                  'cli hooks')
272712
function _parseControllerInfoOneDriveData(dataBlock) {
        //split output by empty line
        var dataSegments = dataBlock.split(/\n/); //Divided by line
        var drvObj = {};
        _.forEach(dataSegments, function(data) {
            data = data.trim();

            // Ignore empty line
            if (data.length === 0) {
                return;
            }

            //Split key and value by "="
            var fields = data.split("="); //Divided by "="
            drvObj[fields[0]] = fields[1].trim();
        });

        return drvObj;
    }
652482
public void readData(FieldTable table) throws DBException
    {
        if (this.getLookupKey() instanceof String)
        {
            FieldList record = table.getRecord();
            String strTableName = (String)this.getLookupKey();
            String strDBName = null;
            if (strTableName != null)
            {
                if (strTableName.lastIndexOf('/') != -1)
                {
                    strDBName = strTableName.substring(0, strTableName.lastIndexOf('/'));
                    if (strDBName.lastIndexOf('/') != -1)
                        strDBName = strDBName.substring(strDBName.lastIndexOf('/') + 1);
                    strTableName = strTableName.substring(strTableName.lastIndexOf('/') + 1);
                    if (strTableName.indexOf('.') != -1)
                        strTableName = strTableName.substring(0, strTableName.indexOf('.'));
                }
            }

            String strThickRecordClass = record.getClass().getName();
            
            RecordOwner recordOwner = ((Record)record).getRecordOwner();
            BaseDatabase database = (BaseDatabase)recordOwner.getDatabase(record.getDatabaseName(), record.getDatabaseType(), null);
            Record recSource = Record.makeRecordFromClassName(strThickRecordClass, recordOwner, false, true);
            if (recSource == null)
                return;
            if (strTableName != null)
                if (strTableName.length() > 0)
                    if ((!strTableName.equalsIgnoreCase(recSource.getTableNames(false))))
                        if ((recSource.getDatabaseType() & DBConstants.MAPPED) != 0)
                            recSource.setTableNames(strTableName);
            recSource.setTable(database.makeTable(recSource));
            recSource.init(recordOwner);

            recSource.populateThinTable(record, true);
            
            recSource.free();
        }
    }
987253
def read(cls, iprot):
        '''
        
        '''

        init_kwds = {}

        iprot.read_struct_begin()
        while True:
            ifield_name, ifield_type, _ifield_id = iprot.read_field_begin()
            if ifield_type == 0:  # STOP
                break
            elif ifield_name == 'dbf':
                init_kwds['dbf'] = pastpy.gen.database.impl.dbf.dbf_database_configuration.DbfDatabaseConfiguration.read(iprot)
            elif ifield_name == 'dummy':
                init_kwds['dummy'] = pastpy.gen.database.impl.dummy.dummy_database_configuration.DummyDatabaseConfiguration.read(iprot)
            elif ifield_name == 'online':
                init_kwds['online'] = pastpy.gen.database.impl.online.online_database_configuration.OnlineDatabaseConfiguration.read(iprot)
            iprot.read_field_end()
        iprot.read_struct_end()

        return cls(**init_kwds)
1055063
public function current()
    {
        $rowDataForRowToBeProcessed = $this->rowDataBuffer;

        if ($this->shouldPreserveEmptyRows) {
            // when we need to preserve empty rows, we will either return
            // an empty row or the last row read. This depends whether the
            // index of last row that was read matches the index of the last
            // row whose value should be returned.
            if ($this->lastRowIndexProcessed !== $this->nextRowIndexToBeProcessed) {
                // return empty row if mismatch between last processed row
                // and the row that needs to be returned
                $rowDataForRowToBeProcessed = [''];
            }
        }

        return $rowDataForRowToBeProcessed;
    }