broadcast

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkChange

func BulkChange(ctx context.Context, dbId string, table string)

func Delete

func Delete(ctx context.Context, dbId string, table string, pk interface{})

func Insert

func Insert(ctx context.Context, dbId string, table string, pk interface{})

func Update

func Update(ctx context.Context, dbId string, table string, pk interface{}, fieldnames ...string)

Types

type BroadcasterI

type BroadcasterI interface {
	Insert(ctx context.Context, dbId string, table string, pk interface{})
	Update(ctx context.Context, dbId string, table string, pk interface{}, fieldnames ...string)
	Delete(ctx context.Context, dbId string, table string, pk interface{})
	BulkChange(ctx context.Context, dbId string, table string)
}
var Broadcaster BroadcasterI

Broadcaster is the injected broadcaster that the generated forms use to notify the application that the database has changed. The application will start with a default that does nothing.

type DefaultBroadcaster

type DefaultBroadcaster struct {
}

DefaultBroadcaster broadcasts database changes to the application

func (DefaultBroadcaster) BulkChange

func (b DefaultBroadcaster) BulkChange(ctx context.Context, dbId string, table string)

func (DefaultBroadcaster) Delete

func (b DefaultBroadcaster) Delete(ctx context.Context, dbId string, table string, pk interface{})

func (DefaultBroadcaster) Insert

func (b DefaultBroadcaster) Insert(ctx context.Context, dbId string, table string, pk interface{})

func (DefaultBroadcaster) Update

func (b DefaultBroadcaster) Update(ctx context.Context, dbId string, table string, pk interface{}, fieldnames ...string)

Jump to

Keyboard shortcuts

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