dialects

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2021 License: MIT Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialectName

type DialectName string

DialectName is a compiler enforced type used that maps to gorm's dialect names.

const (
	// Postgres represents the postgres dialect.
	Postgres DialectName = "pgx"
	// TransactionWrappedPostgres is useful for tests.
	// When the connection is opened, it starts a transaction and all
	// operations performed on the DB will be within that transaction.
	//
	// HACK: This must be the string 'cloudsqlpostgres' because of an absolutely
	// horrible design in gorm. We need gorm to enable postgres-specific
	// features for the txdb driver, but it can only do that if the dialect is
	// called "postgres" or "cloudsqlpostgres".
	//
	// Since "postgres" is already taken, "cloudsqlpostgres" is our only
	// remaining option
	//
	// See: https://github.com/jinzhu/gorm/blob/master/dialect_postgres.go#L15
	TransactionWrappedPostgres DialectName = "cloudsqlpostgres"
	// PostgresWithoutLock represents the postgres dialect but it does not
	// wait for a lock to connect. Intended to be used for read only access, or in tests.
	PostgresWithoutLock DialectName = "postgresWithoutLock"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL