postgres

package
v0.0.0-...-27a9bf3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB(config *engine.PluginConfig) (*gorm.DB, error)

func NewPostgresPlugin

func NewPostgresPlugin() *engine.Plugin

Types

type PostgresPlugin

type PostgresPlugin struct{}

func (*PostgresPlugin) AddRow

func (p *PostgresPlugin) AddRow(config *engine.PluginConfig, schema string, storageUnit string, values []engine.Record) (bool, error)

func (*PostgresPlugin) AddStorageUnit

func (p *PostgresPlugin) AddStorageUnit(config *engine.PluginConfig, schema string, storageUnit string, fields map[string]string) (bool, error)

func (*PostgresPlugin) Chat

func (p *PostgresPlugin) Chat(config *engine.PluginConfig, schema string, model string, previousConversation string, query string) ([]*engine.ChatMessage, error)

func (*PostgresPlugin) DeleteRow

func (p *PostgresPlugin) DeleteRow(config *engine.PluginConfig, schema string, storageUnit string, values map[string]string) (bool, error)

func (*PostgresPlugin) GetDatabases

func (p *PostgresPlugin) GetDatabases(config *engine.PluginConfig) ([]string, error)

func (*PostgresPlugin) GetGraph

func (p *PostgresPlugin) GetGraph(config *engine.PluginConfig, schema string) ([]engine.GraphUnit, error)

func (*PostgresPlugin) GetRows

func (p *PostgresPlugin) GetRows(config *engine.PluginConfig, schema string, storageUnit string, where string, pageSize int, pageOffset int) (*engine.GetRowsResult, error)

func (*PostgresPlugin) GetSchema

func (p *PostgresPlugin) GetSchema(config *engine.PluginConfig) ([]string, error)

func (*PostgresPlugin) GetStorageUnits

func (p *PostgresPlugin) GetStorageUnits(config *engine.PluginConfig, schema string) ([]engine.StorageUnit, error)

func (*PostgresPlugin) IsAvailable

func (p *PostgresPlugin) IsAvailable(config *engine.PluginConfig) bool

func (*PostgresPlugin) RawExecute

func (p *PostgresPlugin) RawExecute(config *engine.PluginConfig, query string) (*engine.GetRowsResult, error)

func (*PostgresPlugin) UpdateStorageUnit

func (p *PostgresPlugin) UpdateStorageUnit(config *engine.PluginConfig, schema string, storageUnit string, values map[string]string) (bool, error)

Jump to

Keyboard shortcuts

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