postgres

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

internal/storage/db/postgres/attributes.go

internal/storage/db/postgres/db.go

internal/storage/db/postgres/links.go

internal/storage/db/postgres/nodes.go

internal/storage/db/postgres/nodetypes.go

internal/storage/db/postgres/valuesets.go

internal/storage/db/postgres/versions.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateNodeTypeParams

type CreateNodeTypeParams struct {
	TypeKey  string
	Name     string
	Category string
}

type DB

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

func New

func New(connStr string) (*DB, error)

func (*DB) Close

func (d *DB) Close() error

func (*DB) CreateDocumentVersion

func (d *DB) CreateDocumentVersion(ctx context.Context, nodeID string, fileSize int64, checksum string) (*models.DocumentVersion, error)
func (d *DB) CreateLink(ctx context.Context, params CreateLinkParams) (*models.Link, error)

func (*DB) CreateNode

func (d *DB) CreateNode(ctx context.Context, params CreateNodeParams) (*models.Node, error)

func (*DB) CreateNodeType

func (d *DB) CreateNodeType(ctx context.Context, params CreateNodeTypeParams) (*models.NodeType, error)

func (*DB) CreateNodeWithAttributes

func (d *DB) CreateNodeWithAttributes(ctx context.Context, nodeParams CreateNodeParams, attrs []Attribute) (*models.Node, error)

func (*DB) CreateValueSet

func (d *DB) CreateValueSet(ctx context.Context, params CreateValueSetParams) (*models.ValueSet, error)

func (*DB) GetNode

func (d *DB) GetNode(ctx context.Context, id int) (*models.Node, error)

func (*DB) ListDocumentVersions

func (d *DB) ListDocumentVersions(ctx context.Context, nodeID string) ([]models.DocumentVersion, error)
func (d *DB) ListLinks(ctx context.Context, params ListLinksParams) ([]models.Link, error)

func (*DB) ListNodeTypes

func (d *DB) ListNodeTypes(ctx context.Context) ([]models.NodeType, error)

func (*DB) Ping

func (d *DB) Ping() error

func (*DB) SetHooks

func (d *DB) SetHooks(h *hooks.NodeHooks)

func (*DB) SetNodeAttribute

func (d *DB) SetNodeAttribute(ctx context.Context, params SetNodeAttributeParams) (*models.Attribute, error)

func (*DB) SoftDeleteNode

func (db *DB) SoftDeleteNode(ctx context.Context, params SoftDeleteNodeParams) error

func (*DB) UpdateNode

func (d *DB) UpdateNode(ctx context.Context, params UpdateNodeParams) (*models.Node, error)

func (*DB) UpdateValueSet

func (d *DB) UpdateValueSet(ctx context.Context, params UpdateValueSetParams) (*models.ValueSet, error)

Jump to

Keyboard shortcuts

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