postgres

package
v0.0.0-...-a0132d7 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 3 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(host, port, dbName, user, password string) (*Client, error)

NewClient creates a new PostgreSQL client

func (*Client) AddData

func (c *Client) AddData(filePath, text, metadata string) error

AddData adds the data to the database

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection

func (*Client) IsEmpty

func (c *Client) IsEmpty() (bool, error)

IsEmpty checks if the database is empty

func (*Client) RemoveData

func (c *Client) RemoveData(filePath string) error

RemoveData removes the data from the database

type TableData

type TableData struct {
	gorm.Model
	FilePath   string
	Metadata   string
	CSVContent string
}

Table data structure

Jump to

Keyboard shortcuts

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