postgres

package
v3.2.0-dev.57 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, config bootstrapConfig.Database, credentials bootstrapConfig.Credentials,
	baseScriptPath, extScriptPath string, lc logger.LoggingClient, serviceKey string) (*Client, errors.EdgeX)

NewClient returns a pointer to the Postgres client

func (Client) CloseSession

func (c Client) CloseSession()

CloseSession closes the connections to postgres

func (Client) Disconnect

func (c Client) Disconnect() error

Disconnect ends the connection.

func (Client) RemoveFromStore

func (c Client) RemoveFromStore(o interfaces.StoredObject) error

RemoveFromStore removes an object from the store table by StoredObject ID

func (Client) RetrieveFromStore

func (c Client) RetrieveFromStore(appServiceKey string) ([]interfaces.StoredObject, error)

RetrieveFromStore gets an object from the table with content column contains the appServiceKey

func (Client) Store

func (c Client) Store(o interfaces.StoredObject) (string, error)

Store persists a stored object to the store table and returns the assigned UUID

func (Client) Update

func (c Client) Update(o interfaces.StoredObject) error

Update replaces the data currently in the store table by the StoredObject ID

Jump to

Keyboard shortcuts

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