Add support for automatic query logging.
This commit is contained in:
parent
5d742837f1
commit
0d3ec872d6
22 changed files with 152 additions and 13 deletions
|
|
@ -89,6 +89,7 @@ VALUES (100, 'http://www.postgresqltutorial.com', 'PostgreSQL Tutorial', DEFAULT
|
|||
100, "http://www.postgresqltutorial.com", "PostgreSQL Tutorial")
|
||||
|
||||
AssertExec(t, stmt, 1)
|
||||
requireLogged(t, stmt)
|
||||
}
|
||||
|
||||
func TestInsertOnConflict(t *testing.T) {
|
||||
|
|
@ -108,6 +109,7 @@ VALUES ($1, $2, $3, $4, $5),
|
|||
ON CONFLICT (employee_id) DO NOTHING;
|
||||
`)
|
||||
AssertExec(t, stmt, 1)
|
||||
requireLogged(t, stmt)
|
||||
})
|
||||
|
||||
t.Run("on constraint do nothing", func(t *testing.T) {
|
||||
|
|
@ -125,6 +127,7 @@ VALUES ($1, $2, $3, $4, $5),
|
|||
ON CONFLICT ON CONSTRAINT employee_pkey DO NOTHING;
|
||||
`)
|
||||
AssertExec(t, stmt, 1)
|
||||
requireLogged(t, stmt)
|
||||
})
|
||||
|
||||
t.Run("do update", func(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue