neo4j

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Host     string `yaml:"host"`
	Port     uint   `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

func FromEnv

func FromEnv() Conf

type Neo4jClient

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

func Neo4jClientSingleton

func Neo4jClientSingleton(conf Conf) (*Neo4jClient, error)

func NewNeo4jClient

func NewNeo4jClient(conf Conf) (*Neo4jClient, error)

func (*Neo4jClient) CreateUniqueConstraint

func (c *Neo4jClient) CreateUniqueConstraint(label, property string) error

CreateUniqueConstraint 创建唯一性约束

func (*Neo4jClient) NewSession

func (c *Neo4jClient) NewSession(ctx context.Context) neo4j.SessionWithContext

func (*Neo4jClient) Transaction

func (c *Neo4jClient) Transaction(ctx context.Context, fc func(neo4j.ExplicitTransaction) error, opts ...*sql.TxOptions) (err error)

Transaction 事务

Jump to

Keyboard shortcuts

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