Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
the-real-i9 opened this issue Jan 28, 2025 · 1 comment · Fixed by #1562
Closed
3 tasks done
Assignees
Labels
🤔 Question Further information is requested

Comments

@the-real-i9
Copy link
Contributor

the-real-i9 commented Jan 28, 2025

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.
@the-real-i9 the-real-i9 added the 🤔 Question Further information is requested label Jan 28, 2025
@the-real-i9 the-real-i9 changed the title 🤗 [Question] ✏️ [Feature]: I there a particular reason Neo4j isn't included among the storage drivers? 🤔 Is there a particular reason Neo4j isn't included among the storage drivers? Jan 28, 2025
@the-real-i9 the-real-i9 changed the title 🤔 Is there a particular reason Neo4j isn't included among the storage drivers? 🤔 Is there a particular reason why Neo4j isn't included among the storage drivers? Jan 28, 2025
@the-real-i9 the-real-i9 changed the title 🤔 Is there a particular reason why Neo4j isn't included among the storage drivers? 🤔 [Question]: Is there a particular reason why Neo4j isn't included among the storage drivers? Jan 28, 2025
@the-real-i9
Copy link
Contributor Author

I've created a Pull Request for the feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 Question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants