Ignore:
Timestamp:
01/26/08 20:49:29 (12 years ago)
Author:
Kon Lovett
Message:

Chgd fetch row body to handle binary blob/string.

File:
1 edited

Legend:

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

    r7930 r7943  
    4949(newline)
    5050(print "The rows can be enumerated one-per-line, like this:")
    51 (mysql-foreach-row *conn* (lambda (row row-idx)
    52   (display (conc row-idx ": " (row "Database") "\n"))))
     51(mysql-row-for-each
     52  *conn*
     53  (lambda (row row-idx)
     54    (display (conc row-idx ": " (row "Database") "\n"))))
    5355
    5456(newline)
    5557(display "Or they can just be comma-separated, like so:")
    56 (mysql-foreach-row *conn* (lambda (row row-idx)
    57   (display (conc (row "Database")
    58                  (if (< row-idx (mysql-num-rows *conn*)) ", " "\n")))))
     58(mysql-row-for-each
     59  *conn*
     60  (lambda (row row-idx)
     61    (display (conc (row "Database")
     62                   (if (< row-idx (mysql-num-rows *conn*)) ", " "\n")))))
    5963
    6064(mysql-print-and-query *conn* "DROP DATABASE IF EXISTS mysql_egg_test")
     
    8084(newline)
    8185(mysql-print-and-query *conn* "SELECT testboolnn, testbool FROM test1")
    82 (mysql-foreach-row *conn* (lambda (row idx)
     86(mysql-row-for-each
     87  *conn*
     88  (lambda (row idx)
     89    (print "Row " idx " lengths: " (mysql-fetch-lengths *conn*))))
     90
     91(newline)
     92(mysql-print-and-query *conn* "SELECT testboolnn, testbool FROM test1")
     93(mysql-row-for-each *conn* (lambda (row idx)
    8394  (display (conc "row " idx ": testboolnn=" (row "testboolnn")
    8495                 ", testbool="
     
    94105       (map (lambda (f) (cons f (row f))) names)))) )
    95106
    96 (newline)
    97 (mysql-print-and-query *conn* "SELECT testboolnn, testbool FROM test1")
    98 (mysql-row-for-each
    99   *conn*
    100   (lambda (row idx)
    101     (print "Row " idx " lengths: " (mysql-fetch-lengths *conn*))))
    102 
    103107;; Finished
    104108(newline)
Note: See TracChangeset for help on using the changeset viewer.