Hi, i'm interested with GORM library and i intend to implement it in my project, but, for my Database, i use MongoDB from https://labix.org/mgo which not supported by Gorm. I read in this website: http://jinzhu.me/gorm/database.html#connecting-to-a-database and i see that i must create new dialect for unsupported database, but i have no idea what i must rewrite for the new dialect.go for mongoDB connection. Can you give some guidance to connect for Mgo?

Comment From: siegesmund

Gorm supports SQL relational databases. Gorm is an abstraction layer over SQL.

MongoDB is a noSQL database that has its own query language based on javascript.

Gorm is thus not the appropriate tool for your use case. Investigate Go MongoDB ORM packages instead.

Comment From: dataf3l

Perhaps another solutino could be simply to write another layer of abstraction which itself abstracts both, the SQL and NoSQL databases by abstracting the differences over the Gorm and the Mongo stuff, and as a result, @calvinsug can have his cake and eat it too...

Comment From: hadifarnoud

you can use mgm instead