mongodb not available in gorm? how to use mongodb in gorm, drivers not available. Please help!!!!!!!!!!!!!!!!!!!
Comment From: rafaelsousa
I am curious: MongoDB is not a relational database. Why do you need to use gorm for it?
Comment From: kannan-psibertech
Previously mongodb is available in gorm under this library. "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mongodb"
From: Rafael de Andrade Sousa @.> Sent: Friday, 6 January 2023 12:36 am To: go-gorm/gorm @.> Cc: Kannan @.>; Author @.> Subject: Re: [go-gorm/gorm] mongodb not available in gorm (Issue #5963)
I am curious: MongoDB is not a relational database. Why do you need to use gorm for it?
— Reply to this email directly, view it on GitHubhttps://github.com/go-gorm/gorm/issues/5963#issuecomment-1372450425, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI72DUCSHIZRY65B53IYRVDWQ3Z5LANCNFSM6AAAAAATRYK74E. You are receiving this because you authored the thread.Message ID: @.**@.**>>
Comment From: morremeyer
I just checked all versions of the dialects module on https://pkg.go.dev/github.com/jinzhu/gorm/dialects?tab=versions. None of it ever had mongodb support.
That is not suprising since gorm is an ORM for relational databases. MongoDB is not a relational database, as @rafaelsousa already pointed out.
Comment From: kannan-psibertech
@morremeyer I think may be you are not aware about previously had this library "github.com/jinzhu/gorm/dialects/mongodb". Because i have done many projects few years ago used this library. So this is surprising for me that currently not available.
Comment From: morremeyer
I think you're mistaken here. The repository https://github.com/jinzhu/gorm has no commit that contains the words mongodb, mongo or 27017 (the default mongodb port).
The following are all commits that in the integrations directory, and none of them contains any code for mongodb:
Commits in integrations
❯ git log --oneline -- dialects
79a77d7 (tag: v1.9.12) go.mod: remove unnecessary dependences through upgrade go-mssqldb (#2795)
11e2819 Extract parseInt
23f6840 Add limit and offset parse error
820b5f2 MSSQL Create() fix: Add LastInsertIDReturningSuffix to dialect (#2690)
0c98e7d Fixed import formatting to match goimports (#2568)
09a868b Handle syntax to specify an index prefix length
123d4f5 lock TagSettings structure when modified (#1796)
dbb25e9 Adding json type for mssql dialect, similar to postgres.Jsonb (#1934)
1907bff all: gofmt (#1956)
82eb9f8 included actual sql query to discover fi foreign key with the same name exists in a specific table of the database in use (#1896)
3b2c4b3 Fix insert with default value for mysql
706b8f5 Use brackets for quoting (#1736)
ae509ab Port AUTO_INCREMENT false support to mssql
89a726c Move ModifyColumn implemention to Dialect
38f96c6 Add handling for empty Jsonb to fix #1649 (#1650)
87fc1b2 Refactor PR #1751
0a51f6c add JSONB type (#1626)
969ab67 [mssql] Fix save time struct's timezone
717654b Merge pull request #1420 from ModelRocket/master
bae0799 Adding better binary type support for common SQL dialects
a870874 Accept 0 as a value for Limit, Offset
2a04197 Change bind var to 24652$ to avoid possible confliction
5730b92 Fix tests with mssql
66982a7 Remove SET_IDENTITY_INSERT for transactions in MS SQL
45f1a95 Replace all use of *sql.DB with sqlCommon
c3276eb fix issue with mssql NEXT option. Fixes #1205
a3b8b33 Allow customize data type via ParseFieldStructForDialect
b507cdf Expose current database name API
1485f4b Use validated interface{} for limit/offset values to ensure values greater than max 32-bit integer are addressable, and in a backwards-compatible way.
f926dd9 Revert "Use int64 for limit/offset values to ensure values > 32-bit int are addressable."
9b0fb2f Use int64 for limit/offset values to ensure values greater than max 32-bit integer are addressable.
6eb73ae Fix too long foreign key names in mysql.
a0aa21a Refactor
ec11065 Refactor based on golint
60a859d Add check HasForeignKey method to dialect, also move mssql dialect to a separate repo as it is not well tested, close #832
b6a2710 Don't execute SET IDENTITY_INSERT if dialect is not mssql
2522f03 Set identity insert on after create transaction, close #841
c811590 Add dialects for supported databases for easier to use
</summary>