-
Notifications
You must be signed in to change notification settings - Fork 988
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
734df09
commit 7ccf874
Showing
5 changed files
with
48 additions
and
40 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
from allocation.service_layer import unit_of_work | ||
from sqlalchemy.sql import text | ||
|
||
|
||
def allocations(orderid: str, uow: unit_of_work.SqlAlchemyUnitOfWork): | ||
with uow: | ||
results = uow.session.execute( | ||
""" | ||
SELECT sku, batchref FROM allocations_view WHERE orderid = :orderid | ||
""", | ||
text( | ||
"SELECT sku, batchref FROM allocations_view WHERE orderid = :orderid" | ||
), | ||
dict(orderid=orderid), | ||
) | ||
return [dict(r) for r in results] | ||
return [r._asdict() for r in results] |
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
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