Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updating documentation for 0.3-beta

  • Loading branch information...
commit 9d905ae3a2fd2e09f216c7d501e4861c6f5ce43e 1 parent 3cae50b
@Philio authored
Showing with 23 additions and 23 deletions.
  1. +23 −23 README.markdown
View
46 README.markdown
@@ -268,29 +268,29 @@ Usage examples
1. A simple query
- // Connect to database
- db, err := mysql.DialUnix(mysql.DEFAULT_SOCKET, "user", "password", "database")
- if err != nil {
- os.Exit(1)
- }
- // Perform query
- err = db.Query("select * from my_table")
- if err != nil {
- os.Exit(1)
- }
- // Get result set
- result, err := db.UseResult()
- if err != nil {
- os.Exit(1)
- }
- // Get each row from the result and perform some processing
- for {
- row := result.FetchRow()
- if row == nil {
- break
- }
- // ADD SOME ROW PROCESSING HERE
- }
+ // Connect to database
+ db, err := mysql.DialUnix(mysql.DEFAULT_SOCKET, "user", "password", "database")
+ if err != nil {
+ os.Exit(1)
+ }
+ // Perform query
+ err = db.Query("select * from my_table")
+ if err != nil {
+ os.Exit(1)
+ }
+ // Get result set
+ result, err := db.UseResult()
+ if err != nil {
+ os.Exit(1)
+ }
+ // Get each row from the result and perform some processing
+ for {
+ row := result.FetchRow()
+ if row == nil {
+ break
+ }
+ // ADD SOME ROW PROCESSING HERE
+ }
Please sign in to comment.
Something went wrong with that request. Please try again.