good morning!!!!

Skip to content
Snippets Groups Projects
Commit 107f8449 authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

Reviewing driver docs.

parent d3230d51
No related branches found
No related tags found
No related merge requests found
......@@ -128,13 +128,13 @@ When you request data from a Collection with ``db.Collection.Find()`` or ``db.Co
Appends one or more items to the collection.
collection.Append(Item { "name": "Peter" })
collection.Append(db.Item { "name": "Peter" })
#### db.Collection.Count(...interface{}) int
Returns the number of total items matching the provided conditions.
total := collection.Count(Cond { "name": "Peter" })
total := collection.Count(db.Cond { "name": "Peter" })
#### db.Collection.Find(...interface{}) db.Item
......
......@@ -8,32 +8,32 @@ The [bazaar](http://bazaar.canonical.com/en/) version control system is required
If you're using ``brew`` and OSX, you can install it like this
$ brew install bzr
$ brew install bzr
On ArchLinux you could use
$ sudo pacman -S bzr
$ sudo pacman -S bzr
And on Debian based distros
$ sudo aptitude install bzr
$ sudo aptitude install bzr
## Installation
$ go get github.com/xiam/gosexy/db/mongo
$ go get github.com/xiam/gosexy/db/mongo
## Usage
import (
"github.com/xiam/gosexy/db"
"github.com/xiam/gosexy/db/mongo"
)
import (
"github.com/xiam/gosexy/db"
"github.com/xiam/gosexy/db/mongo"
)
## Connecting to a MongoDB database
sess := mongo.Session(db.DataSource{Host: "127.0.0.1"})
sess := mongo.Session(db.DataSource{Host: "127.0.0.1"})
err := sess.Open()
defer sess.Close()
err := sess.Open()
defer sess.Close()
Read full documentation and examples on the [gosexy/db](/xiam/gosexy/tree/master/db) manual.
......@@ -8,32 +8,32 @@ The [mercurial](http://mercurial.selenic.com/) version control system is require
If you're using ``brew`` and OSX, you can install it like this
$ brew install hg
$ brew install hg
On ArchLinux you could use
$ sudo pacman -S mercurial
$ sudo pacman -S mercurial
And on Debian based distros
$ sudo aptitude install mercurial
$ sudo aptitude install mercurial
## Installation
$ go get github.com/xiam/gosexy/db/mysql
$ go get github.com/xiam/gosexy/db/mysql
## Usage
import (
"github.com/xiam/gosexy/db"
"github.com/xiam/gosexy/db/mysql"
)
import (
"github.com/xiam/gosexy/db"
"github.com/xiam/gosexy/db/mysql"
)
## Connecting to a MySQL database
sess := mysql.Session(db.DataSource{Host: "127.0.0.1"})
sess := mysql.Session(db.DataSource{Host: "127.0.0.1"})
err := sess.Open()
defer sess.Close()
err := sess.Open()
defer sess.Close()
Read full documentation and examples on the [gosexy/db](/xiam/gosexy/tree/master/db) manual.
......@@ -4,20 +4,20 @@ This driver is a wrapper of [pq](https://github.com/bmizerany/pq). In order to w
## Installation
$ go get github.com/xiam/gosexy/db/postgresql
$ go get github.com/xiam/gosexy/db/postgresql
## Usage
import (
"github.com/xiam/gosexy/db"
"github.com/xiam/gosexy/db/postgresql"
)
import (
"github.com/xiam/gosexy/db"
"github.com/xiam/gosexy/db/postgresql"
)
## Connecting to a PostgreSQL database
sess := postgresql.Session(db.DataSource{Host: "127.0.0.1"})
sess := postgresql.Session(db.DataSource{Host: "127.0.0.1"})
err := sess.Open()
defer sess.Close()
err := sess.Open()
defer sess.Close()
Read full documentation and examples on the [gosexy/db](/xiam/gosexy/tree/master/db) manual.
......@@ -8,35 +8,35 @@ The sqlite3 driver uses cgo, and it requires ``pkg-config`` and the sqlite3 head
If you're using ``brew`` and OSX, you can install them like this
$ brew install pkg-config
$ brew install sqlite3
$ brew install pkg-config
$ brew install sqlite3
On ArchLinux you could use
$ sudo pacman -S pkg-config
$ sudo pacman -S sqlite3
$ sudo pacman -S pkg-config
$ sudo pacman -S sqlite3
And on Debian based distros
$ sudo aptitude install pkg-config
$ sudo aptitude install libsqlite3-dev
$ sudo aptitude install pkg-config
$ sudo aptitude install libsqlite3-dev
## Installation
$ go get github.com/xiam/gosexy/db/sqlite
$ go get github.com/xiam/gosexy/db/sqlite
## Usage
import (
"github.com/xiam/gosexy/db"
"github.com/xiam/gosexy/db/sqlite"
)
import (
"github.com/xiam/gosexy/db"
"github.com/xiam/gosexy/db/sqlite"
)
## Connecting to a SQLite3 database
sess := sqlite.Session(db.DataSource{Database: "/path/to/sqlite3.db"})
sess := sqlite.Session(db.DataSource{Database: "/path/to/sqlite3.db"})
err := sess.Open()
defer sess.Close()
err := sess.Open()
defer sess.Close()
Read full documentation and examples on the [gosexy/db](/xiam/gosexy/tree/master/db) manual.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment