dave08
10/29/2024, 9:11 AM?
in KomapperCommands(/templates?), they don't seem to make sense... and one might forget a few when migrating queries to templates.Toshihiro Nakamura
10/29/2024, 10:08 AMstray
?`` mean?dave08
10/29/2024, 10:12 AM@KomapperCommand("""
....
WHERE id = ?
...
""")
in a very long sql, one might forget to replace ?
with /* ... */1
dave08
10/29/2024, 10:12 AMdave08
10/29/2024, 10:22 AMToshihiro Nakamura
10/29/2024, 11:14 AMKomapperCommand
in an SQL tool like pgAdmin might help resolve the issue.dave08
10/29/2024, 11:20 AMToshihiro Nakamura
10/29/2024, 11:23 AM?
. For example, in PostgreSQLās R2DBC driver, a format like $1
is used instead of ?
. We donāt know which format to check for at compile time.dave08
10/29/2024, 11:25 AMWith some drivers, bind variables arenāt always represented by? is for sure a culprit... but if it would be able to check for both notations, it would be better... since in any case, both wouldn't be valid in a KomapperCommand. For example, in PostgreSQLās R2DBC driver, a format like?
is used instead of$1
. We donāt know which format to check for at compile time.?
dave08
10/29/2024, 11:25 AMToshihiro Nakamura
10/29/2024, 11:37 AM@id
. Checking all formats would be difficult to maintain and could lead to false negatives, mistakenly identifying valid SQL for a particular database as invalid. If we were to perform a check, it would be better to do so at runtime, where we can determine which driver is in use, rather than at compile time.
Another idea is to use an LLM application like ChatGPT for this check, which would be a convenient and effective option.dave08
10/29/2024, 12:00 PM