labpack/databases/sql.py
def read(self, record_id):

        ''' 
            a method to retrieve the details for a record in the table 

        :param record_id: string or number with unique identifier of record
        :return: dictionary with record fields 
        '''

        title = '%s.read' % self.__class__.__name__

        # retrieve record object
        # record_object = self.session.query(self.record).filter_by(id=record_id).first()
        select_statement = self.table.select(self.table.c.id == record_id)
        record_object = self.session.execute(select_statement).first()
        if not record_object:
            return {}

        # reconstruct record details
        record_details = self._reconstruct_record(record_object)

        return record_details
 
            a method to retrieve the details for a record in the table 

        :param record_id: string or number with unique identifier of record
        :return: dictionary with record fields 
        
a method to retrieve the details for a record in the table
a method to retrieve the details for a record in the table
def read(self, record_id):
        title = '%s.read' % self.__class__.__name__
        select_statement = self.table.select(self.table.c.id == record_id)
        record_object = self.session.execute(select_statement).first()
        if not record_object:
            return {}
        record_details = self._reconstruct_record(record_object)
        return record_details
def read ( self , record_id ) : title = '%s.read' % self . __class__ . __name__ select_statement = self . table . select ( self . table . c . id == record_id ) record_object = self . session . execute ( select_statement ) . first ( ) if not record_object : return { } record_details = self . _reconstruct_record ( record_object ) return record_details
a method to retrieve the details for a record in the table
a method to retrieve the details for a record in the table
''' 
            a method to retrieve the details for a record in the table 

        :param record_id: string or number with unique identifier of record
        :return: dictionary with record fields 
        ''' # retrieve record object # record_object = self.session.query(self.record).filter_by(id=record_id).first() # reconstruct record details
dictionary with record fields
dictionary with record fields
self
record_id
string or number with unique identifier of record
string or number with unique identifier of record