falkordb

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package falkordb provides the model for FlakorDB, a Redis module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

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

Driver for FlakorDB

func (*Driver) DiscardQuery

func (d *Driver) DiscardQuery(res dbms.QueryResult, seed *seed.Seed) bool

DiscardQuery returns true with probability 1/3 or if the query produced a non-nil error, else it returns false. Thereby causing queries to have an expected amount of 4 statements if they don't produce an error.

func (*Driver) GetQueryResultType

func (d *Driver) GetQueryResultType(res dbms.QueryResult, errorMessageRegex *dbms.ErrorMessageRegex) dbms.QueryResultType

GetQueryResultType evaluates the produced result and returns the type the result indicates.

func (*Driver) GetSchema

func (d *Driver) GetSchema(dbms.DBOptions) (*schema.Schema, error)

GetSchema returns the database's current schema

func (*Driver) Init

func (d *Driver) Init(opts dbms.DBOptions) error

Init the DB driver

func (*Driver) IsEqualResult

func (d *Driver) IsEqualResult(a dbms.QueryResult, b dbms.QueryResult) bool

IsEqualResult returns whether the two passed results equal

func (*Driver) IsMatchingRows

func (d *Driver) IsMatchingRows(first, second any) bool

IsMatchingRows compares two redisgraph result rows. It returns true if they match, else false.

func (*Driver) Reset

func (d *Driver) Reset(opts dbms.DBOptions) error

Reset the database

func (*Driver) RunQuery

func (d *Driver) RunQuery(opts dbms.DBOptions, query string) dbms.QueryResult

RunQuery runs the query against the FlakorDB DB and returns its result.

func (*Driver) VerifyConnectivity

func (d *Driver) VerifyConnectivity(opts dbms.DBOptions) (bool, error)

VerifyConnectivity checks whether the DB is still reachable and hasn't crashed.

type Implementation

type Implementation struct{}

Implementation for FlakorDB

func (Implementation) GetDropIns

func (Implementation) GetDropIns() translator.DropIns

GetDropIns returns the clause drop-ins for the FlakorDB implementation

func (Implementation) GetOpenCypherConfig

func (Implementation) GetOpenCypherConfig() config.Config

GetOpenCypherConfig returns the generation config for the FlakorDB implementation

Jump to

Keyboard shortcuts

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