java uses morphia to access enumeration as value
Source code
https://github.com/zhongchengyi/zhongcy.demos/tree/master/mongo-morphia-demo
Preface
Morphia is a library that java uses orm to operate mongodb. But by default, when using morphia to access enum, it is accessed by name. We need to access enum by value.
As shown in the figure: the schoolClassLevel1 field is accessed by enum name ...
Posted by nanny79 on Tue, 31 Dec 2019 06:59:46 -0800
MongoDB-4.2.2 install and configure account password for access
0. purpose
Download MongoDB and install it. Set password access.The MongoDB official website will download the following three installation packagesMongodb-org-server-4.2.2-1.el6.x86 × 64.rpm × mongodb services, configuration files, startup scriptsMongodb-org-shell-4.2.2-1.el6.x86 × 64.rpm contains shell commands related to ...
Posted by GameMusic on Wed, 25 Dec 2019 06:42:05 -0800
CentOS 7 Linux Installation MongoDB - yum installation (how to do zgbn)
CentOS 7 Linux Installation MongoDB - yum installation
1. Build repo resources of CentOS7
Enter / etc/yum.repos.d/ directory, create mongodb-org.repo file, edit this file with vim, and add repo resources.Http://mirrors.aliyun.com/mongodb/yum/redhat/7server/mongodb-org/3.0/x86_/ is the resource address provided by Alibaba clo ...
Posted by Karlos2394 on Thu, 19 Dec 2019 11:01:25 -0800
Node learning notes optimization crud addition, deletion, modification and query
This article combines the previous< Node learning notes Mongodb and Mongoose >Yes curd example Optimize
MongoDB installation
Download address of installation file:[ https://www.mongodb.com/download-center/community]
To install MongoDB on Windows: https://www.runoob.com/mongodb/mongodb-window-install.html
Special attention should be paid d ...
Posted by bashaash on Wed, 18 Dec 2019 14:12:30 -0800
How to get mongodb data in koa and show it on the page
I used koa scaffold for the project, and koa router was used for routing mongodb To connect to MongoDB
The knowledge point used here is async await. If you don't know how to use it, please read it first: Async await
Example
First, set a public method mongo.js. Here is only one query method:
var MongoClient = require('mong ...
Posted by tisource on Wed, 18 Dec 2019 13:51:34 -0800
CAS and ABA problem generation and elegant solution
I collated Java advanced materials for free, including Java, Redis, MongoDB, MySQL, Zookeeper, Spring Cloud, Dubbo high concurrency distributed and other tutorials, a total of 30G, which needs to be collected by myself.Transfer gate: https://mp.weixin.qq.com/s/JzddfH-7yNudmkjT0IRL8Q
Exclusive lock: it is a pessimistic lock. synchronized is ...
Posted by chaotica on Tue, 17 Dec 2019 00:41:52 -0800
How mongodb filters arrays in documents
mongodb documents contain arrays. You need to filter the qualified data in the arrays and return the result set. You can query group s or filters in two ways.
Data source:
{
"_id" : ObjectId("5bbcc0c9a74db9804e78a157"),
"uid" : "1000001",
"name" : "zhangsan",
"addrs" : [
{
"is_query" : "1",
"cit ...
Posted by Andrei on Sun, 15 Dec 2019 08:38:06 -0800
One minute understanding of Java fair locks and unfair locks
I collated Java advanced materials for free, including Java, Redis, MongoDB, MySQL, Zookeeper, Spring Cloud, Dubbo high concurrency distributed and other tutorials, a total of 30G, which needs to be collected by myself.Portal: https://mp.weixin.qq.com/s/JzddfH-7yNudmkjT0IRL8Q
Chatting with friends, he mentioned that the constructor of Reent ...
Posted by textbox on Tue, 10 Dec 2019 23:42:53 -0800
Common data cleaning in Mongdb
Preface
Share some common data cleaning methods of Mongdb
Note: "Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in." causes and solutions:
Reason
During big data calculation and data statistics, each calculation task (job or task) will use independent and limited memory space. mongod ...
Posted by matbennett on Tue, 10 Dec 2019 09:59:48 -0800
Use Python to crawl the information about girls'underwear and explore their preferences
Continue to analyze the crawler data analysis articles today, let's take a look at the acquisition and analysis of NetEase's critical commodity reviews.
NetEase Comments Crawling
Analyzing Web Pages
Comment Analysis
Enter the official website of NetEase Strict Selection, search for "bra", and then order a commodity at will.
On t ...
Posted by johncox on Mon, 09 Dec 2019 04:08:19 -0800