Add support for prepared statement caching.

This commit is contained in:
go-jet 2024-03-07 18:01:31 +01:00
parent 1b63280b74
commit 0918e5503e
30 changed files with 603 additions and 289 deletions

View file

@ -12,7 +12,7 @@ import (
"time"
)
func TestSelect(t *testing.T) {
func TestSelectAlbum(t *testing.T) {
stmt := SELECT(Album.AllColumns).
FROM(Album).
ORDER_BY(Album.AlbumId.ASC())
@ -782,9 +782,11 @@ func TestQueryWithContext(t *testing.T) {
return // context cancellation doesn't work for pq driver
}
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Microsecond)
defer cancel()
time.Sleep(1 * time.Millisecond)
var dest []model.Album
err := Album.