cypherx

package module
v0.0.0-...-40e261a Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: MIT Imports: 9 Imported by: 0

README

cypherx

Cypherx is a very thin ORM for neo4j cypher query. It is inspired by and named after jmoiron/sqlx. It is now under heavy development. Nothing is guranteed.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WithTxMetadata = neo4j.WithTxMetadata
	WithTxTimeout  = neo4j.WithTxTimeout
)

Functions

This section is empty.

Types

type DB

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

func NewDB

func NewDB(driver neo4j.Driver) *DB

func (*DB) Connect

func (db *DB) Connect(host, user, pass string) error

func (*DB) ExecQuery

func (db *DB) ExecQuery(cypher string,
	params map[string]interface{},
	configurers ...configurer,
) error

func (*DB) GetMultiValueRecords

func (db *DB) GetMultiValueRecords(
	dest interface{},
	cypher string,
	params map[string]interface{},
	configurers ...configurer,
) error

GetMultiValueRecords fetch records from neo4j db and assign values of each record to a struct dest must be *[]struct{} type

func (*DB) GetNode

func (db *DB) GetNode(
	dest interface{},
	cypher string,
	params map[string]interface{},
	configurers ...configurer,
) error

func (*DB) RawResult

func (db *DB) RawResult(cypher string,
	params map[string]interface{},
	configurers ...configurer,
) (interface{}, error)

Jump to

Keyboard shortcuts

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