Documentation
¶
Index ¶
Constants ¶
const ( // FixedRestrictKey is a constant restricted key that can be used for tests and other use cases where // a constant restrict key is needed. FixedRestrictKey = "pgschemadiffrestrict" )
Variables ¶
This section is empty.
Functions ¶
func GetDump ¶
GetDump gets the pg_dump of the inputted database. It is only intended to be used for testing. You cannot securely pass passwords with this implementation, so it will only accept databases created for unit tests (spun up with the pgengine package) "pgdump" must be on the system's PATH
func GetDumpUsingBinary ¶
func ParseVersion ¶ added in v1.0.2
ParseVersion parses a version string from pg_dump output and returns a Version object. This function is exported to make it testable.
Types ¶
type Parameter ¶
type Parameter struct {
// contains filtered or unexported fields
}
Parameter represents a parameter to be pg_dump. Don't use a type alias for a string slice because all parameters for pgdump should be explicitly added here
func WithExcludeSchema ¶
func WithRestrictKey ¶ added in v1.0.2
WithRestrictKey is used by PSQL to prevent injection of "meta" commands. If not explicitly provided, a random one will be generated for each pg_dump run. This most likely needs to be fixed for any usages of pg_dump in tests.
func WithSchemaOnly ¶
func WithSchemaOnly() Parameter