• Stars
    star
    134
  • Rank 270,967 (Top 6 %)
  • Language
    Go
  • License
    Other
  • Created about 15 years ago
  • Updated almost 14 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go driver for MongoDB

gomongo

Go driver for mongodb.

Installation

The easiest way to install is through goinstall, which will automaticall install dependencies:

$ [sudo -E] goinstall github.com/mikejs/gomongo/mongo

Example usage

package main

import "github.com/mikejs/gomongo/mongo"


func main() {
        conn, _ := mongo.Connect("127.0.0.1")
        collection := conn.GetDB("test").GetCollection("test_collection")

        doc, _ := mongo.Marshal(map[string]string{
                "_id":     "doc1",
                "title":   "A Mongo document",
                "content": "Testing, 1. 2. 3.",
        })
        collection.Insert(doc)

        query, _ := mongo.Marshal(map[string]string{"_id": "doc1"})
        got, _ := collection.FindOne(query)
        mongo.Equal(doc, got) // true!

        collection.Drop()
}

More Repositories

1

gridfs-fuse

A FUSE wrapper around MongoDB's GridFS
C++
211
star
2

python-duckduckgo

A library for querying the Duck Duck Go API
Python
79
star
3

ring-gzip-middleware

Clojure
26
star
4

lmddgtfy

Let me Duck Duck Go that for you
JavaScript
26
star
5

photovoltaic

a MongoDB/Solr search connector
Python
24
star
6

clojure-solr

solr bindings for clojure
Clojure
23
star
7

ring-etag-middleware

Clojure
20
star
8

reconcile-demo

a demo Google Refine reconciliation service API
Python
15
star
9

ring-mongrel2-adapter

Clojure
14
star
10

scrapelib

Python
13
star
11

name_tools

python tools for playing around with names
Python
10
star
12

clojure-zmq

A Clojure binding/wrapper for ZeroMQ
Clojure
9
star
13

mutant

mutation testing for python
Python
7
star
14

factor-problems

Answers to the 'Ninety-Nine Prolog Problems' in Factor
5
star
15

pl-bf

PostgreSQL PL/brainfuck
C
5
star
16

state_visits

Parse US State Department records of diplomatic visits
Python
3
star
17

factor-sunlightapi

A Factor vocab for querying the Sunlight Labs API
2
star
18

usegment

Python implementations of the Unicode text segmentation algorithms
Python
2
star
19

saucebrush

experiment in writing a sane data processing toolkit in python
Python
2
star
20

fiftystates_backend

Backend code for the Fifty State Project
Python
1
star
21

google-timezone

add timezone conversion to google calculator (Chrome)
JavaScript
1
star
22

Tiler

Objective-C
1
star
23

java-fiftystates

Java
1
star
24

fiftystates_docs

Python
1
star
25

polipoly2

Python
1
star
26

gh-contest

1
star
27

ragel-pgn

C
1
star
28

fiftystates_site

A Django app for viewing Fifty State Project data
Python
1
star
29

python-nimsp

Python client library for interacting with the National Institute on Money in State Politics API
Python
1
star
30

big_map

Python
1
star
31

python-fiftystates

Python client library for the Fifty State Project API
Python
1
star
32

baiji

JavaScript
1
star