Skip to content

switch db #651

@Doozers

Description

@Doozers

relate on #649

It isn't a better idea to abstract the db in a first place instead of replacing it ?

advantage:

  • It will decrease the complexity of use.
  • smaller access will act like documentation
  • It will keep the optimized and fast advantage of the cayleygraphDB
  • If after abstracting, it still to hard to use, it will be easy to implement the db with a gorm/sqlite for example
// database.go
type Database interface {
	GetTasks(...)
	PushTasks(...)
	...
}


// cayley.go
type cayleyDB {
}

func (c *cayleyDB) GetTasks(...) {
[...]
}

and if needed

// gorm.go
type gormDB {
}

func (c *gormDB) GetTasks(...) {
[...]
}

wdy think about it @moul ?

┆Issue is synchronized with this Trello card

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions