Quantcast
Channel: WiredPrairie » MongoDB
Browsing latest articles
Browse All 6 View Live

Image may be NSFW.
Clik here to view.

How to view the MongoDB Query when using the C# LINQ Provider

If you’re using the Official MongoDB C# Driver from 10gen, you may want to occasionally verify that the generated query matches your LINQ query (or at least that it’s building something efficient)....

View Article



How to rewrite a MongoDB C# LINQ with a Projection Requirement using a...

The LINQ Provider for MongoDB does not currently take into account data projections efficiently when returning data. This could mean that you’re unnecessarily returning more data from the database than...

View Article

Finding duplicates in MongoDB via the shell

I thought this was an interesting question to answer on StackOverflow (summarized here): I’m trying to create an index, but an error is returned that duplicates exist for the field I want to index....

View Article

Using $inc to increment a field in a sub-document in an array and a field in...

(Blog post inspired by question I answered on StackOverflow) Lets say you have a schema in MongoDB that looks something like this: { '_id' : 'star_wars', 'count' : 1234, 'spellings' : [ { spelling:...

View Article

Mongoose plugin runs for every new Schema

If you want to consistently apply changes to every Schema in Mongoose, it’s simple. Below is an example. var mongoose = require('mongoose'); var checkForHexRegExp = new RegExp("^[0-9a-fA-F]{24}$");...

View Article


Simple example of using MongoMapper with Ruby

The MongoMapper web site is really lacking on even simple examples, especially those that don’t use Rails. So, here’s a simple example that might help someone. From the Gemfile: source...

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images