package db

Import Path
	github.com/neo4j/neo4j-go-driver/v4/neo4j/db (on go.dev)

Dependency Relation
	imports 5 packages, and imported by 6 packages

Involved Source Files Package db defines generic database functionality. errors.go record.go summary.go
Package-Level Type Names (total 19, all are exported)
/* sort exporteds by: | */
Definitions of these should correspond to public API const ReadMode const WriteMode
Cypher string FetchSize int Params map[string]interface{} func Connection.Run(cmd Command, txConfig TxConfig) (StreamHandle, error) func Connection.RunTx(tx TxHandle, cmd Command) (StreamHandle, error)
Connection defines an abstract database server connection. Returns the point in time when this connection was established. Returns bookmark from last committed transaction or last finished auto-commit transaction. Note that if there is an ongoing auto-commit transaction (stream active) the bookmark from that is not included, use Buffer or Consume to end the stream with a bookmark. Empty string if no bookmark. Buffers all records on the stream, records, summary and error will be received through call to Next The Connection implementation should preserve/buffer streams automatically if needed when new streams are created and the server doesn't support multiple streams. Use Buffer to force buffering before calling Reset to get all records and the bookmark. Closes the database connection as well as any underlying connection. The instance should not be used after being closed. Discards all records on the stream and returns the summary otherwise it will return the error. ( T) ForceReset() error Gets routing table for specified database name or the default database if database equals DefaultDatabase. If the underlying connection does not support multiple databases, DefaultDatabase should be used as database. Returns true if the connection is fully functional. Implementation of this should be passive, no pinging or similair since it might be called rather frequently. Keys for the specified stream. Moves to next item in the stream. If error is nil, either Record or Summary has a value, if Record is nil there are no more records. If error is non nil, neither Record or Summary has a value. Resets connection to same state as directly after a connect. Active streams will be discarded and the bookmark will be lost. ( T) Run(cmd Command, txConfig TxConfig) (StreamHandle, error) ( T) RunTx(tx TxHandle, cmd Command) (StreamHandle, error) Returns name of the remote server Returns server version on pattern Neo4j/1.2.3 Sets Bolt message logger on already initialized connections ( T) TxBegin(txConfig TxConfig) (TxHandle, error) ( T) TxCommit(tx TxHandle) error ( T) TxRollback(tx TxHandle) error func github.com/neo4j/neo4j-go-driver/v4/neo4j/internal/bolt.Connect(serverName string, conn net.Conn, auth map[string]interface{}, userAgent string, routingContext map[string]string, logger log.Logger, boltLog log.BoltLogger) (Connection, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j/internal/connector.Connector.Connect(address string, boltLogger log.BoltLogger) (Connection, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j/internal/pool.(*Pool).Borrow(ctx context.Context, serverNames []string, wait bool, boltLogger log.BoltLogger) (Connection, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j/internal/router.Pool.Borrow(ctx context.Context, servers []string, wait bool, boltLogger log.BoltLogger) (Connection, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j/internal/pool.(*Pool).Return(c Connection) func github.com/neo4j/neo4j-go-driver/v4/neo4j/internal/retry.(*State).OnFailure(conn Connection, err error, isCommitting bool) func github.com/neo4j/neo4j-go-driver/v4/neo4j/internal/router.Pool.Return(c Connection)
If database server connection supports selecting which database instance on the server to connect to. Prior to Neo4j 4 there was only one database per server. Should be called immediately after Reset. Not allowed to call multiple times with different databases without a reset inbetween.
InputPosition contains information about a specific position in a statement Column contains the column number referred to by this position; column numbers start at 1. Line contains the line number referred to by this position; line numbers start at 1. Offset contains the character offset referred to by this position; offset numbers start at 0.
Database server failed to fulfill request. Code string Msg string (*T) Category() string (*T) Classification() string (*T) Error() string (*T) IsAuthenticationFailed() bool (*T) IsRetriableCluster() bool (*T) IsRetriableTransient() bool (*T) Title() string *T : error
Notification represents notifications generated when executing a statement. A notification can be visualized in a client pinpointing problems or other information about the statement. Code contains a notification code for the discovered issue of this notification. Description contains a longer description of this notification. Position contains the position in the statement where this notification points to. Not all notifications have a unique position to point to and in that case the position would be set to nil. Severity contains the severity level of this notification. Title contains a short summary of this notification.
Plan describes the actual plan that the database planner produced and used (or will use) to execute your statement. This can be extremely helpful in understanding what a statement is doing, and how to optimize it. For more details, see the Neo4j Manual. The plan for the statement is a tree of plans - each sub-tree containing zero or more child plans. The statement starts with the root plan. Each sub-plan is of a specific operator, which describes what that part of the plan does - for instance, perform an index lookup or filter results. The Neo4j Manual contains a reference of the available operator types, and these may differ across Neo4j versions. Arguments for the operator. Many operators have arguments defining their specific behavior. This map contains those arguments. Zero or more child plans. A plan is a tree, where each child is another plan. The children are where this part of the plan gets its input records - unless this is an operator that introduces new records on its own. List of identifiers used by this plan. Identifiers used by this part of the plan. These can be both identifiers introduced by you, or automatically generated. Operator is the operation this plan is performing.
ProfiledPlan is the same as a regular Plan - except this plan has been executed, meaning it also contains detailed information about how much work each step of the plan incurred on the database. Arguments contains the arguments for the operator used. Many operators have arguments defining their specific behavior. This map contains those arguments. Children contains zero or more child plans. A plan is a tree, where each child is another plan. The children are where this part of the plan gets its input records - unless this is an operator that introduces new records on its own. DbHits contains the number of times this part of the plan touched the underlying data stores/ Identifiers contains a list of identifiers used by this plan. Identifiers used by this part of the plan. These can be both identifiers introduced by you, or automatically generated. Operator contains the operation this plan is performing. Records contains the number of records this part of the plan produced.
Major int Minor int func github.com/neo4j/neo4j-go-driver/v4/neo4j.ServerInfo.ProtocolVersion() ProtocolVersion
Keys contains names of the values in the record. Should not be modified. Same instance is used for all records within the same result. Values contains all the values in the record. Get returns the value corresponding to the given key along with a boolean that is true if a value was found and false if there were no key with the given name. If there are a lot of keys in combination with a lot of records to iterate, consider to retrieve values from Values slice directly or make a key -> index map before iterating. This implementation does not make or use a key -> index map since the overhead of making the map might not be beneficial for small and few records. GetByIndex returns the value in the record at the specified index. Deprecated: Prefer to access Values directly instead. func Connection.Next(streamHandle StreamHandle) (*Record, *Summary, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j.AsRecord(from interface{}, err error) (*neo4j.Record, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j.AsRecords(from interface{}, err error) ([]*neo4j.Record, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j.Collect(result neo4j.Result, err error) ([]*neo4j.Record, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j.Single(result neo4j.Result, err error) (*neo4j.Record, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j.Result.Collect() ([]*neo4j.Record, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j.Result.Record() *neo4j.Record func github.com/neo4j/neo4j-go-driver/v4/neo4j.Result.Single() (*neo4j.Record, error) func github.com/neo4j/neo4j-go-driver/v4/neo4j.Result.NextRecord(record **neo4j.Record) bool
Server string (*T) Error() string *T : error
Readers []string Routers []string TimeToLive int Writers []string func Connection.GetRoutingTable(context map[string]string, bookmarks []string, database string) (*RoutingTable, error)
Definitions of these should correspond to public API const StatementTypeRead const StatementTypeReadWrite const StatementTypeSchemaWrite const StatementTypeUnknown const StatementTypeWrite
func Connection.Run(cmd Command, txConfig TxConfig) (StreamHandle, error) func Connection.RunTx(tx TxHandle, cmd Command) (StreamHandle, error) func Connection.Buffer(streamHandle StreamHandle) error func Connection.Consume(streamHandle StreamHandle) (*Summary, error) func Connection.Keys(streamHandle StreamHandle) ([]string, error) func Connection.Next(streamHandle StreamHandle) (*Record, *Summary, error)
Agent string Bookmark string Counters map[string]int Database string Major int Minor int Notifications []Notification Plan *Plan ProfiledPlan *ProfiledPlan ServerName string StmntType StatementType TFirst int64 TLast int64 func Connection.Consume(streamHandle StreamHandle) (*Summary, error) func Connection.Next(streamHandle StreamHandle) (*Record, *Summary, error)
Bookmarks []string Meta map[string]interface{} Mode AccessMode Timeout time.Duration func Connection.Run(cmd Command, txConfig TxConfig) (StreamHandle, error) func Connection.TxBegin(txConfig TxConfig) (TxHandle, error)
func Connection.TxBegin(txConfig TxConfig) (TxHandle, error) func Connection.RunTx(tx TxHandle, cmd Command) (StreamHandle, error) func Connection.TxCommit(tx TxHandle) error func Connection.TxRollback(tx TxHandle) error
Type reflect.Type (*T) Error() string *T : error
Package-Level Constants (total 20, all are exported)
Counter key names
Counter key names
Marker for using the default database instance.
Counter key names
Counter key names
Counter key names
Counter key names
Counter key names
Counter key names
Counter key names
const ReadMode AccessMode = 1
Counter key names
Counter key names
Counter key names