neurodb

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NEURODB_RETURNDATA byte = 1
	NEURODB_SELECTDB   byte = 2
	NEURODB_EOF        byte = 3
	NEURODB_NODES      byte = 6
	NEURODB_LINKS      byte = 7
	NEURODB_EXIST      byte = 17
	NEURODB_NIL        byte = 18
	NEURODB_RECORD     byte = 19
	NEURODB_RECORDS    byte = 20

	NDB_6BITLEN  byte = 0
	NDB_14BITLEN byte = 1
	NDB_32BITLEN byte = 2
	NDB_ENCVAL   byte = 3

	VO_STRING      byte = 1
	VO_NUM         byte = 2
	VO_STRING_ARRY byte = 3
	VO_NUM_ARRY    byte = 4
	VO_NODE        byte = 5
	VO_LINK        byte = 6
	VO_PATH        byte = 7
	VO_VAR         byte = 8
	VO_VAR_PATTERN byte = 9
)
View Source
const (
	DefaultMsgBuffSize = 1024
)

Variables

View Source
var ErrUnknownType = errors.New("Error Type")
View Source
var ParseOk = 1

Functions

func DeserializeRecordSet

func DeserializeRecordSet(s []byte) (*dbtype.RecordSet, error)

TODO Hoss consider using bytes directly utf8 bytes

Types

type MsgHeadType

type MsgHeadType byte
const (
	MsgTypeParseOk     MsgHeadType = '@'
	MsgTypeSetMsg1     MsgHeadType = '$'
	MsgTypeSetMsg2     MsgHeadType = '#'
	MsgTypeParseObject MsgHeadType = '*'
)

type NeuroDBConn

type NeuroDBConn interface {
	SendRecv(msg []byte) (dbtype.ResultSet, error)
	Close() error
}

A connection of neurodb, it's thread safe

func NewNeuroDBConn

func NewNeuroDBConn(addr string, port int) (NeuroDBConn, error)

type NeuroDBDriver

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

func Open

func Open(addr string, port int) (*NeuroDBDriver, error)

func (*NeuroDBDriver) ExecuteQuery

func (n *NeuroDBDriver) ExecuteQuery(query string) (dbtype.ResultSet, error)

Jump to

Keyboard shortcuts

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