From 107f8449fbe51f6b7423a8062fe397f0dca14207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Nieto?= <xiam@menteslibres.org> Date: Tue, 24 Jul 2012 06:17:55 -0500 Subject: [PATCH] Reviewing driver docs. --- db/README.md | 4 ++-- db/mongo/README.md | 22 +++++++++++----------- db/mysql/README.md | 22 +++++++++++----------- db/postgresql/README.md | 16 ++++++++-------- db/sqlite/README.md | 28 ++++++++++++++-------------- 5 files changed, 46 insertions(+), 46 deletions(-) diff --git a/db/README.md b/db/README.md index 5fc1e543..b09c136f 100644 --- a/db/README.md +++ b/db/README.md @@ -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 diff --git a/db/mongo/README.md b/db/mongo/README.md index af1b9203..d274fa44 100644 --- a/db/mongo/README.md +++ b/db/mongo/README.md @@ -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. diff --git a/db/mysql/README.md b/db/mysql/README.md index 8eab3826..8bc1072b 100644 --- a/db/mysql/README.md +++ b/db/mysql/README.md @@ -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. diff --git a/db/postgresql/README.md b/db/postgresql/README.md index af821e84..2168e740 100644 --- a/db/postgresql/README.md +++ b/db/postgresql/README.md @@ -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. diff --git a/db/sqlite/README.md b/db/sqlite/README.md index 57a8c19a..0e02d75f 100644 --- a/db/sqlite/README.md +++ b/db/sqlite/README.md @@ -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. -- GitLab