Changeset 14793 in project


Ignore:
Timestamp:
05/26/09 17:46:32 (10 years ago)
Author:
sjamaan
Message:

Describe changes in 3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/postgresql

    r14780 r14793  
    138138<expr>
    139139(let ((conn (connect '((dbname . test)))))
    140    (map (lambda (r) (row-values r 0))
     140   (map row-values
    141141        (multi-query conn "SELECT 'hello', 'world'; SELECT 1")))
    142142</expr>
     
    283283for when you want more control over when results are released.
    284284
    285 <procedure>(value-at RES ROW COLUMN [raw: RAW])</procedure>
    286 
    287 Returns the value at the specified {{ROW}} and {{COLUMN}}.  It is
     285<procedure>(value-at RES [COLUMN] [ROW] [raw: RAW])</procedure>
     286
     287Returns the value at the specified {{COLUMN}} and {{ROW}}.  It is
    288288parsed by an appropriate parser unless {{RAW}} is specified and
    289289{{#t}}.  If {{RAW}} is true, the value is either a string, blob or an
    290290sql-null object.  Otherwise, it depends on the parsers.
    291291
     292If {{ROW}} or {{COLUMN}} are not specified, they default to zero.
     293This makes for more convenient syntax if you're just reading out
     294a result of a query which always has one row or even one value.
     295
    292296See [[#type-conversion|type conversion]] for more info on parsers.
    293297
    294 <procedure>(row-values RES ROW [raw: RAW])</procedure>
     298<procedure>(row-values RES [ROW] [raw: RAW])</procedure>
    295299
    296300Returns a list of all the columns' values at the given {{ROW}} number.
    297 
    298 <procedure>(column-values RES ROW [raw: RAW])</procedure>
     301If {{ROW}} is omitted, it defaults to zero.  If {{RAW}} is true, the
     302values are either strings, blobs or sql-null objects.  Otherwise, it
     303depends on the parsers.
     304
     305<procedure>(column-values RES [COLUMN] [raw: RAW])</procedure>
    299306
    300307Returns a list of all the rows' values at the given {{COLUMN}} number.
    301 
    302 <procedure>(row-alist RES ROW)</procedure>
     308If {{COLUMN}} is omitted, it defaults to zero.  If {{RAW}} is true, the
     309values are either strings, blobs or sql-null objects.  Otherwise, it
     310depends on the parsers.
     311
     312<procedure>(row-alist RES [ROW])</procedure>
    303313
    304314Returns an alist of the values at the given {{ROW}} number.  The keys
    305315of the alist are made up by the matching column names, as symbols.
     316
     317If {{ROW}} is omitted, it defaults to zero.  If {{RAW}} is true, the
     318values are either strings, blobs or sql-null objects.  Otherwise, it
     319depends on the parsers.
    306320
    307321<procedure>(affected-rows RES)</procedure>
     
    570584=== Changelog
    571585
     586* 3.1 - Small (but backwards incompatible) interface improvement: make row and column arguments optional.
    572587* 3.0 - Port to Chicken 4.  Major code overhaul, backwards incompatible.
    573588* 2.0.14 - Add PQescapeStringConn functionality to pg:escape-string. Fixed weird compilation issue with SRFI-69 by removing it from USES list.
Note: See TracChangeset for help on using the changeset viewer.