<commit_before>from sqlalchemy import Column, Integer, String, Float
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import os
from models import db_connector

class Employee(db_connector.Base, db_connector.DBConnector):
    '''
    Where every row is the details one employee was paid for an entire month.
    There would be an authoritative Employee database with unique IDs already.
    '''
    __tablename__ = 'employee'
    __table_args__ = {'extend_existing': True}
    id = Column(Integer, primary_key=True)
    first_name = Column(String(100), nullable=False)
    last_name = Column(String(100), nullable=False)
    annual_salary = Column(Integer)
    superannuation_rate = Column(Float)

    @classmethod
    def get_by_name(self, first, last):
        session = self.get_session()
        records = session.query(self).filter_by(first_name=first,
             last_name=last).all()
        return records

    @classmethod
    def get_by_id(self, id_number):
        session = self.get_session()
        record = session.query(self).filter_by(id=id_number).first()
        return record<commit_msg>Old comment, confusing, not relevant<commit_after>from sqlalchemy import Column, Integer, String, Float
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import os
from models import db_connector

class Employee(db_connector.Base, db_connector.DBConnector):
    __tablename__ = 'employee'
    __table_args__ = {'extend_existing': True}
    id = Column(Integer, primary_key=True)
    first_name = Column(String(100), nullable=False)
    last_name = Column(String(100), nullable=False)
    annual_salary = Column(Integer)
    superannuation_rate = Column(Float)

    @classmethod
    def get_by_name(self, first, last):
        session = self.get_session()
        records = session.query(self).filter_by(first_name=first,
             last_name=last).all()
        return records

    @classmethod
    def get_by_id(self, id_number):
        session = self.get_session()
        record = session.query(self).filter_by(id=id_number).first()
        return record
{'fraction_non_alphanumeric': 0.08676207513416816, 'fraction_numerical': 0.005366726296958855, 'mean_word_length': 3.9933035714285716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1268462', 'n_tokens_mistral': 671, 'n_tokens_neox': 647, 'n_words': 164}