Skip to content

🤔 [Question]: Is there a particular reason why Neo4j isn't included among the storage drivers? #1561

@the-real-i9

Description

@the-real-i9

Question Description

I'm just surprised that even with it's wide adoption in the graph database ecosystem, a storage driver isn't available for it in gofiber.

I started working on one—since I've search everywhere and no one seems to be talking about it. But then I thought I should ask first, perhaps there might be a reason why it's not supported.

Code Snippet (optional)

package main

import (
  "time"
  
  neo4j "github.com/neo4j/neo4j-go-driver/v5/neo4j"
  neo4jconfig "github.com/neo4j/neo4j-go-driver/v5/neo4j/config"

  neo4jstore "github.com/gofiber/storage/neo4j"
)

type Config struct {
  // Optional. Defaults to nil. Overrides the following connection parameters
  Driver neo4j.DriverWithContext

  TargetBoltURI string

  // Optional. Defaults to basic authentication with the provided username/password and "" realm value
  AuthToken neo4j.AuthToken

  // Optional. Defaults to []func(*neo4jconfig.Config){}
  Configurers []func(*neo4jconfig.Config)

  Username string

  Password string

  // If you have the administrative privilege, else it will be ignored for the default database, "neo4j"
  // Optional. Default is "fiber" (still if you have the administrative privilege)
  Database string

  // Optional. Default is "fiber_storage"
  Node string

  // Optional. Default is false
  Reset bool

  // Optional. Default is 10 * time.Second
  GCInterval time.Duration
}

func main() {
  // Initialize default config
  store := neo4jstrg.New()

  // Initialize custom config
  store := neo4jstore.New(neo4jstore.Config{
    BoltURI:       "neo4j://localhost:7687",
    Database:      "fiber",
    Node:          "fiber_storage",
    Reset:         false,
    GCInterval:    10 * time.Second,
  })
}

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my questions prior to opening this one.
  • I understand that improperly formatted questions may be closed without explanation.

Metadata

Metadata

Assignees

Labels

🤔 QuestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions