Copyright 2019 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
package postgres
import (
)
DeletePseudoversionsExcept deletes all pseudoversions for the module except the provided resolvedVersion.
func ( *DB) ( context.Context, , string) ( error) {
deferderrors.WrapStack(&, "DeletePseudoversionsExcept(ctx, db, %q, %q)", , )
return .db.Transact(, sql.LevelDefault, func( *database.DB) error {
const = ` DELETE FROM modules WHERE version_type = 'pseudo' AND module_path=$1 AND version != $2 RETURNING version`
, := collectStrings(, , , , )
if != nil {
return
}
_, = .Exec(, `DELETE FROM version_map WHERE module_path = $1 AND resolved_version = ANY($2)`,
, pq.Array())
return
})
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.