Greetings, I trust everyone is doing well.

Our code base uses SQLAlchemy and some of the old code uses expression 
language style code e.g. 


appts = Table("Appointment", META, autoload=True, autoload_with=DB)
    statement = select([appts.c.appointmentId], and_(
        appts.c.appointmentId == 212
        
        
        ))
    results = select_all(statement)


where as some of our code uses declarative style classes e.g.

class Appointment(Alchemy_Base, QueryMixin):
    
    __tablename__ = "Appointment"
    appointmentId = Column(Integer, primary_key=True)
    
    @classmethod
    def get_by_id(cls, appointment_id):
        query = cls.query.filter_by(appointmentId=appointment_id)
        return query.one()
    

Some of our scripts are going to use both of these files (both expression 
style and declarative style) so my question is, is it (i.e. mixing two 
styles of code) going to cause any sort of problems or we're going to be 
okay? 

I am asking because some people in our company are suggesting that we 
convert all code into one format (devs want to convert expression style old 
code into declarative style code).

Kindly let me know your suggestions. BTW, we're using MySQL as database and 
Python 2.6.4. Thanks in advance. 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to