remove dgraph completely
Some checks failed
Go / build-and-release (push) Has been cancelled

This commit is contained in:
2025-12-03 16:44:49 +00:00
parent 880772cab1
commit 6bd56a30c9
21 changed files with 79 additions and 2025 deletions

View File

@@ -24,9 +24,6 @@ type DatabaseConfig struct {
QueryCacheMaxAge time.Duration // ORLY_QUERY_CACHE_MAX_AGE
InlineEventThreshold int // ORLY_INLINE_EVENT_THRESHOLD
// DGraph-specific settings
DgraphURL string // ORLY_DGRAPH_URL
// Neo4j-specific settings
Neo4jURI string // ORLY_NEO4J_URI
Neo4jUser string // ORLY_NEO4J_USER
@@ -62,12 +59,6 @@ func NewDatabaseWithConfig(
case "badger", "":
// Use the existing badger implementation
return NewWithConfig(ctx, cancel, cfg)
case "dgraph":
// Use the dgraph implementation
if newDgraphDatabase == nil {
return nil, fmt.Errorf("dgraph database backend not available (import _ \"next.orly.dev/pkg/dgraph\")")
}
return newDgraphDatabase(ctx, cancel, cfg)
case "neo4j":
// Use the neo4j implementation
if newNeo4jDatabase == nil {
@@ -81,20 +72,10 @@ func NewDatabaseWithConfig(
}
return newWasmDBDatabase(ctx, cancel, cfg)
default:
return nil, fmt.Errorf("unsupported database type: %s (supported: badger, dgraph, neo4j, wasmdb)", dbType)
return nil, fmt.Errorf("unsupported database type: %s (supported: badger, neo4j, wasmdb)", dbType)
}
}
// newDgraphDatabase creates a dgraph database instance
// This is defined here to avoid import cycles
var newDgraphDatabase func(context.Context, context.CancelFunc, *DatabaseConfig) (Database, error)
// RegisterDgraphFactory registers the dgraph database factory
// This is called from the dgraph package's init() function
func RegisterDgraphFactory(factory func(context.Context, context.CancelFunc, *DatabaseConfig) (Database, error)) {
newDgraphDatabase = factory
}
// newNeo4jDatabase creates a neo4j database instance
// This is defined here to avoid import cycles
var newNeo4jDatabase func(context.Context, context.CancelFunc, *DatabaseConfig) (Database, error)

View File

@@ -1 +1 @@
v0.32.2
v0.32.3