Created
June 14, 2017 09:14
-
-
Save infinite-Joy/f4db9380a6402086b67bb3de2b3ca66b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transactions_filtered_in_python_code(): | |
with profiled(): | |
mysql_engine = create_engine('mysql://{0}:{1}@{2}/{3}'.format(user, pwd, host, db)) | |
Session = sessionmaker(bind=mysql_engine) | |
session = Session() | |
transactions = session.query(Transactions).all() | |
return [(t.id, t.name, t.billing_type) for t in transactions if t.created_at == '2015-05-11' ] | |
transactions_filtered_in_python_code() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment