Home > Backend Development > Golang > About a mongodb and golang team-up pit

About a mongodb and golang team-up pit

藏色散人
Release: 2021-04-20 19:12:23
forward
2337 people have browsed it

The following tutorial column will introduce mongodb and golang to you in the golang tutorial column. I hope it will be helpful to friends in need!

About a mongodb and golang team-up pit

Background

At first, I planned to use golang mongodb to do it. I also checked some information online and found that mongodb's model and golang's struct are a good match. And as a front-end person, I have used nodejs and mongodb before, so I thought about using golang mongodb so that I would be more familiar with it.

Question

Nothing went wrong in the early preparations, but later I discovered: How to do related queries?
Then search for various keywords on the Internet, read other people’s code communities and ask questions.
Finally, I patiently found the official documentation:

About a mongodb and golang team-up pit

https://docs.mongodb.com/manual/reference/database-references/

As you can see, golang’s driver does not support DBRefs, which is heartbreaking.

Conclusion

It seems that strongly typed languages ​​are still suitable for relational databases like mysql.
Hey, let’s not talk anymore, change to mysql and continue coding~.~

(Personal understanding, I have little talent and knowledge, and I have misunderstood guidance...

The above is the detailed content of About a mongodb and golang team-up pit. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
How to choose golang web mvc framework
From 1970-01-01 08:00:00
0
0
0
Is it necessary to use nginx when using golang?
From 1970-01-01 08:00:00
0
0
0
golang - vim plug-in to write go
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template