✨ [Feature] Possible support of non sql databases?
Before feedback (在反馈之前)
- [X] There are no features that I want to submit in Issues (当前 Issues 中没有我将要提交的新功能)
Describe Feature (描述功能)
Will non sql databases be supported later?
Yes, maybe, you can leave more thoughts about it here.
maybe a custom database driver that can be set in the config/database.go file, we can have a facades.Orm().Doc()... to indicate it is a document database
facades.Orm().Doc() is a good idea, we also have such a plan. And we will separate DB drivers in the future, will have an interface at that time.
@hwbrzzl when I developed this package https://github.com/portofolio-mager/goravel-mongodb, I noticed the current goravel codebase is tightly coupled with the ORM (especially GORM).
And we will separate DB drivers in the future, will have an interface at that time.
I’m not familiar with all the ORM-related code, but could you walk me through creating a DB interface that can work with a NoSQL database?
@tonidy We had separated DB drivers, e.g. https://github.com/goravel/postgres. For the non-sql databases, we may be implement it like https://github.com/mongodb/laravel-mongodb. And maybe not all orm functions are adapted to the mongodb driver, it's fine to implement partial functions.
I'm closing this issue because Goravel has supported custom database drivers since v1.16.x.
A third-party driver implementing github.com/goravel/framework/contracts/database/driver.Driver can be used with the framework.