Documentation
¶
Overview ¶
Package pg is the plugin for PostgreSQL driver.
Index ¶
- Variables
- func IsSystemDatabase(database string) bool
- func IsSystemFunction(function string, definition string) bool
- func IsSystemSchema(schema string) bool
- func IsSystemTable(table string) bool
- func IsSystemView(view string) bool
- type ColumnOidKey
- type Driver
- func (d *Driver) Close(context.Context) error
- func (d *Driver) GetCurrentDatabaseOwner(ctx context.Context) (string, error)
- func (d *Driver) GetDB() *sql.DB
- func (d *Driver) GetSearchPath(ctx context.Context) (string, error)
- func (d *Driver) Open(ctx context.Context, _ storepb.Engine, config db.ConnectionConfig) (db.Driver, error)
- func (d *Driver) Ping(ctx context.Context) error
- func (d *Driver) SyncDBSchema(ctx context.Context) (metadata *storepb.DatabaseSchemaMetadata, err error)
- func (d *Driver) SyncInstance(ctx context.Context) (*db.InstanceMetadata, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsSystemDatabase ¶
func IsSystemFunction ¶
func IsSystemSchema ¶
func IsSystemTable ¶
func IsSystemView ¶
Types ¶
type ColumnOidKey ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the Postgres driver.
func (*Driver) GetCurrentDatabaseOwner ¶
GetCurrentDatabaseOwner gets the role of the current database.
func (*Driver) GetSearchPath ¶
GetSearchPath gets the current search path of the database. It returns the search path as a raw comma-separated string of schema names.
func (*Driver) Open ¶
func (d *Driver) Open(ctx context.Context, _ storepb.Engine, config db.ConnectionConfig) (db.Driver, error)
Open opens a Postgres driver.
func (*Driver) SyncDBSchema ¶
func (d *Driver) SyncDBSchema(ctx context.Context) (metadata *storepb.DatabaseSchemaMetadata, err error)
SyncDBSchema syncs a single database schema. A database the target no longer has is reported as common.NotFound, which is what tells a caller mirroring the target's inventory apart from a permission or connectivity failure.
func (*Driver) SyncInstance ¶
SyncInstance syncs the instance.
Click to show internal directories.
Click to hide internal directories.