Last active
February 6, 2023 13:57
-
-
Save nmaruy27/bcd57f56aae96c3dbca5335005dbc3e3 to your computer and use it in GitHub Desktop.
driftで実行されるSQLを確認する方法
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
final stmt = select(tables); | |
stmt.where((t) => t.ticnameker.equals(name)); | |
stmt.where((t) => t.updated.year.equals(date.year)); | |
stmt.orderBy([(t) => OrderingTerm(expression: t.updated, mode: OrderingMode.desc)]); | |
// この2行で、実行SQLと条件に入る値の両方を出力できる | |
print('Query : ${stmt.constructQuery().sql}'); | |
print('Variables : ${stmt.constructQuery().boundVariables}'); | |
await stmt.get(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment