Changeset 8191 in project for release/3/mysql/trunk/mysql-eggdoc.scm


Ignore:
Timestamp:
02/06/08 07:22:47 (12 years ago)
Author:
Kon Lovett
Message:

Save

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/mysql/trunk/mysql-eggdoc.scm

    r7944 r8191  
    3131(use mysql)
    3232
    33 (let [(db (mysql-connect host: "mysql.example.com" user: "example"
    34                          passwd: "secret"))]
     33(let ((db (mysql-connect host: "mysql.example.com" user: "example" passwd: "secret")))
    3534  (mysql-query db "SHOW DATABASES")
    36   (do [(row (mysql-fetch-row db) (mysql-fetch-row db))]
    37       [(not row)]
    38     (display (conc "Row " idx ": " (row "Database") "\n")))
    39   (mysql-close db))
     35  (do ((row (mysql-fetch-row db) (mysql-fetch-row db)))
     36      ((not row))
     37    (print "Row " idx ": " (row "Database")) )
     38  (mysql-close db) )
    4039END
    4140)
     
    4443(use mysql)
    4544
    46 (let [(db (mysql-connect host: "mysql.example.com" user: "example"
    47                          passwd: "secret"))]
    48   (mysql-query-foreach db "SHOW DATABASES"
    49                        (lambda (row idx)
    50                          (display (conc "Row " idx ": " (row "Database") "\n"))))
    51   (mysql-close db))
     45(let ((db (mysql-connect host: "mysql.example.com" user: "example" passwd: "secret")))
     46  (mysql-query-for-each
     47   db "SHOW DATABASES" (lambda (row idx) (print "Row " idx ": " (row "Database"))))
     48  (mysql-close db) )
    5249END
    5350)
     
    200197            "most recent call to " (tt "mysql-query") ". If the "
    201198            "last query failed, or if there are no more rows left "
    202             "in the result set, returns " (tt "#f") "; otherwise "
     199            "in the result set, returns " (code "#f") "; otherwise "
    203200            "returns a row object.")
    204201          (a (@ (" name='rowobj'")))
     
    207204            "takes a single argument. If the argument is a number, "
    208205            "the function returns the value of the field for which "
    209             "that number is the index, or " (tt "#f") " if the "
     206            "that number is the index, or " (code "#f") " if the "
    210207            "index is out of range. Otherwise, the argument must "
    211208            "be a symbol or string, in which case the function returns "
    212209            "the value of the field for which that string (or symbol "
    213210            "converted into a string) is the field/column name. If "
    214             "no such field exists, returns " (tt "#f") ".") )
     211            "no such field exists, returns " (code "#f") ".") )
    215212
    216213        (procedure "(mysql-field-count CONN)"
     
    233230          (p
    234231            "Returns the number of rows in the current result set. "
    235             "If no result set exists, returns " (tt "#f") ".") )
     232            "If no result set exists, returns " (code "#f") ".") )
    236233
    237234        (procedure "(mysql-num-fields CONN)"
    238235          (p
    239236            "Returns the number of fields in the current result set. "
    240             "If no result set exists, returns " (tt "#f") ".") )
     237            "If no result set exists, returns " (code "#f") ".") )
    241238
    242239        (procedure "(mysql-affected-rows CONN)"
     
    833830        "All MySQL result data (except NULL) are returned as Scheme strings.")
    834831      (p
    835         "The NULL value is represented by " (tt "#f") ".")
    836       (p "Booleans are expressed "
    837         "as the Scheme strings " (tt "\"1\"") " and " (tt "\"0\"") ".")
    838       (p "All remaining "
    839         "types, including numeric types, blobs, and strings are returned as Scheme "
    840         "strings.")
     832        "The NULL value is represented by " (code "#f") ".")
     833      (p
     834        "Booleans are expressed as the Scheme strings " (code "\"1\"") " and "
     835        (code "\"0\"") ".")
     836      (p
     837        "All remaining types, including numeric types, blobs, and strings are "
     838        "returned as Scheme strings.")
    841839    ) ; section "Data Type Conversion"
    842840
Note: See TracChangeset for help on using the changeset viewer.