schema

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 5 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

View Source
const (
	// DefaultSchema is the database schema when it isn't set
	DefaultSchema = "broadcaster"

	// NotifyChannel is the channel the broadcaster listens on, by default,
	// which the modules notify of their changes on
	NotifyChannel = "events"
)
View Source
const (
	// MaxPayloadSize is the largest event, as JSON, which can be published,
	// which is the largest notification Postgres sends, less a byte
	MaxPayloadSize = 7999
)

Variables

View Source
var Queries string

Functions

This section is empty.

Types

type Notification added in v1.4.9

type Notification struct {
	Schema string          `json:"schema,omitempty"`
	Table  string          `json:"table,omitempty"`
	Action string          `json:"action,omitempty"`
	Row    string          `json:"row,omitempty"`
	Data   json.RawMessage `json:"data,omitempty"`
}

Notification is what's notified on the broadcaster's channel: by the database's triggers, whose action is INSERT, UPDATE or DELETE, as their TG_OP, or by Publish, whose action is create, update or delete. It says what changed, which is a table of a schema, and which row, or rows, changed, when it says, and what the table says of the change, when it says anything.

func (Notification) Change added in v1.4.9

func (n Notification) Change() (changes.Change, error)

Change returns the notification as a change, whose action is create, update or delete, or an error when its action is another, such as TRUNCATE

Jump to

Keyboard shortcuts

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