Introduce Unsafe method on Queryx

It enables local control over `unsafe` mode for .Bind methods of `Queryx` and iterators
spawn by it.
This commit is contained in:
Dmitry Kropachev
2024-06-14 11:21:57 -04:00
committed by Sylwia Szunejko
parent a222c1f067
commit c6f942afc7
4 changed files with 17 additions and 9 deletions

View File

@@ -51,6 +51,7 @@ func (s Session) ContextQuery(ctx context.Context, stmt string, names []string)
Names: names,
Mapper: s.Mapper,
tr: DefaultBindTransformer,
unsafe: DefaultUnsafe,
}
}
@@ -65,6 +66,7 @@ func (s Session) Query(stmt string, names []string) *Queryx {
Names: names,
Mapper: s.Mapper,
tr: DefaultBindTransformer,
unsafe: DefaultUnsafe,
}
}