2 回答

TA貢獻1784條經驗 獲得超2個贊
好吧,根據您的問題,gorm正在作為數據庫和框架工作。
你可以使用go fiber作為框架,但是如果你想使用數據庫,你不能使用來自fiber的數據庫,而必須使用一個數據庫,你可以從中找到數據庫中的數據集合。
例如,您正在將MongoDB與GoFiber一起使用,因此它將使用以下方法:DB.Collection.FindOne()
在 Db.窗體中,用于查找數據庫集合

TA貢獻1852條經驗 獲得超1個贊
Well, as per your question gorm is working as a database also as a framework.
you can use go fiber as a framework but if you want to use the database you cannot use the database from fiber instead you have to use a database from which you can find the collection of the data in the database.
For example, you are using MongoDB with GoFiber so it will use the method of DB.Collection.FindOne()
In form Db.Where is used to find the database collection
- 2 回答
- 0 關注
- 99 瀏覽
添加回答
舉報