Add and update netquery code based on review discussions

This commit is contained in:
Patrick Pacher 2022-03-17 14:28:01 +01:00
parent 976c0a702e
commit c2d2064ec8
No known key found for this signature in database
GPG key ID: E8CD2DA160925A6D
9 changed files with 324 additions and 148 deletions

View file

@ -244,7 +244,7 @@ func (db *Database) dumpTo(ctx context.Context, w io.Writer) error {
// Save inserts the connection conn into the SQLite database. If conn
// already exists the table row is updated instead.
func (db *Database) Save(ctx context.Context, conn Conn) error {
connMap, err := orm.EncodeAsMap(ctx, conn, "", orm.DefaultEncodeConfig)
connMap, err := orm.ToParamMap(ctx, conn, "", orm.DefaultEncodeConfig)
if err != nil {
return fmt.Errorf("failed to encode connection for SQL: %w", err)
}