graphdb

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package graphdb to access the Kuzu graph database

Index

Constants

View Source
const ConnectionDuration = 20 * time.Minute
View Source
const MaintenanceInterval = 1 * time.Minute
View Source
const MaxBufferSize = 200 * 1024 * 1024 // 200 MB
View Source
const MaxConnections = 10 // maximum number of connections to single database
View Source
const MinBufferSize = 10 * 1024 * 1024 // 10 MB

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphDB added in v1.4.0

type GraphDB struct {
	NamespaceID          uint64 // namespace ID (currently only project namespace ID)
	GraphIndexDir        string
	NamespaceBaseDataDir string
	DbPath               string // kuzu database file path
	MetadataPath         string // kuzu database file path
}

func NewGraphDb added in v1.4.0

func NewGraphDb(namespaceID uint64, graphIndexDir string) *GraphDB

func (*GraphDB) CommitGraphDatabase added in v1.4.0

func (client *GraphDB) CommitGraphDatabase(_ context.Context, temporaryGraphDatabasePath string, metadata *GraphDBMetadata) error

CommitGraphDatabase indexing using knowledge-graph to a temporary graph directory, this function should be used to commit the temporary graph directory into the namespace graph database directory

func (*GraphDB) GetNewGraphDBTemporaryPath added in v1.4.0

func (client *GraphDB) GetNewGraphDBTemporaryPath() (string, error)

func (*GraphDB) Metadata added in v1.4.0

func (client *GraphDB) Metadata() (*GraphDBMetadata, error)

func (*GraphDB) RepoDatabaseExists added in v1.4.0

func (client *GraphDB) RepoDatabaseExists() bool

type GraphDBMetadata added in v1.4.0

type GraphDBMetadata struct {
	CurrentSHA    string `json:"current_sha"`
	LastIndexAt   int64  `json:"last_index_at"`
	SchemaVersion uint32 `json:"schema_version"`
	NamespaceID   uint64 `json:"namespace_id"`
	RepoID        uint64 `json:"repository_id"`
}

Jump to

Keyboard shortcuts

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