GT's Blog
Code snippets, technical articles, tips on computing and programming...
Pages
(Move to ...)
Type in Nepali Unicode Romanized - Convert Roman Nepali to Unicode Tool
▼
Showing posts with label
MongoDB
.
Show all posts
Showing posts with label
MongoDB
.
Show all posts
MongoException$DuplicateKey: E11000 duplicate key error index - @Version
›
Obviously, we get this exception when we try to update/insert a document(record) with duplicate key field in MongoDB collection(table). Ther...
Spring MongoDB _id field mapping conventions
›
Java Spring MongoDB : '_id' field mapping : MongoDB requires that you have an '_id' field for all documents. If you don...
MongoDB Multiple insert at once
›
We can insert multiple documents (bulk insert) to a collection using a single insert command : Syntax : db.[COLLECTION].insert( [ { D...
MongoDB rename a database
›
As of now, there is not a straight forward way to rename a MongoDB database. But you can use the following steps to achieve so : Here, we ...
MongoDB Drop Database
›
We can use the following query to drop ( DELETE EVERYTHING) from a MongoDB database ( please be careful on running the query, it deletes e...
MongoDB Like Query
›
We can do the following to achieve SQL's LIKE equivalent on a Query : MongoDB : db.users.find({"name": /jo/}) MYSQL Equi...
MongoDB - show all database in server
›
We can use following commands to view all databases in the server show dbs OR show databases
MongoDB - List all collection from selected DB
›
There are two ways to do so, so far : 1 ) using reference variable 'db' db.getCollectionNames() 2) using show command ...
MongoDB : use database / switch to different database
›
MongoDB uses same syntax as SQL/MySQL to switch to different database : MongoDB Syntax : use DATABASE_NAME SQL Syntax : use D...
›
Home
View web version