Created
August 27, 2016 04:18
-
-
Save kurozumi/2a73495420b4bab56b1f309aecddbbbb to your computer and use it in GitHub Desktop.
【Python】peeweeでjoinしたテーブルのデータを取得する方法
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
# joinしたテーブルのデータを取得するにはnaiveメソッドを指定する必要があります | |
for row in T1.select(T1.t1, T2.t2).join(T2).naive(): | |
print(row.t2) | |
# 以下の場合だとrow.t2は取得できません。 | |
for row in T1.select(T1.t1, T2.t2).join(T2): | |
print(row.t2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment