Changeset 15524 in project


Ignore:
Timestamp:
08/20/09 20:17:31 (10 years ago)
Author:
Thomas Chust
bzr:base-revision:
chust@web.de-20090820160449-h4henxyemdad6663
bzr:committer:
Thomas Chust <chust@web.de>
bzr:file-ids:

demo.scm demo.scm-20090820155252-p2ti8ziw8jpygxh9-1
doc.scm doc.scm-20090807105733-xckh9kh901i74p1k-2
pandora-postgresql.scm pandorapostgresql.sc-20090808201827-2ehfdzdm1lijsubu-1
pandora-sqlite3.scm pandorasqlite3.scm-20090808163844-137r2up5g1j7bxaq-1
pandora.html pandora.html-20090807105733-xckh9kh901i74p1k-4
pandora.scm pandora.scm-20090807105733-xckh9kh901i74p1k-6
bzr:mapping-version:
v4
bzr:merge:

chust@web.de-20090820182712-405vnjcdg73zdq7n
bzr:repository-uuid:
fca3e652-9b03-0410-8d7b-ac86a6ce46c4
bzr:revision-id:
chust@web.de-20090820183427-pcd9dz7v7253y28w
bzr:revno:
5
bzr:revprop:branch-nick:
release/4/pandora/trunk
bzr:root:
release/4/pandora/trunk
bzr:text-parents:

demo.scm chust@web.de-20090820160449-h4henxyemdad6663 chust@web.de-20090820182712-405vnjcdg73zdq7n
doc.scm chust@web.de-20090820160449-h4henxyemdad6663 chust@web.de-20090820182712-405vnjcdg73zdq7n
pandora-postgresql.scm chust@web.de-20090820160449-h4henxyemdad6663 chust@web.de-20090820182712-405vnjcdg73zdq7n
pandora-sqlite3.scm chust@web.de-20090816002930-twnw289tvuzwrlui chust@web.de-20090820182712-405vnjcdg73zdq7n
pandora.html chust@web.de-20090820160449-h4henxyemdad6663 chust@web.de-20090820182712-405vnjcdg73zdq7n
pandora.scm chust@web.de-20090816002930-twnw289tvuzwrlui chust@web.de-20090820182712-405vnjcdg73zdq7n
bzr:timestamp:
2009-08-20 20:34:27.345999956 +0200
bzr:user-agent:
bzr1.17+bzr-svn0.6.3
svn:original-date:
2009-08-20T18:34:27.346000Z
Message:

[pandora] Changed 'fold and 'execute methods to make the parameter lists optional.

Location:
release/4/pandora/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • release/4/pandora/trunk/demo.scm

    r15522 r15524  
    1010
    1111(for-each
    12   (cut store 'execute <> '())
     12  (cut store 'execute <>)
    1313  '(("CREATE TABLE IF NOT EXISTS Authors ("
    1414     "  id INTEGER, name TEXT,"
  • release/4/pandora/trunk/doc.scm

    r15522 r15524  
    7575))
    7676
    77         (method ("(DATASTORE 'execute SQL PARAMETERS) " (& "rArr") " VOID")
     77        (method ("(DATASTORE 'execute SQL [PARAMETERS]) " (& "rArr") " VOID")
    7878          (p "Executes the given " (tt "SQL") " statement and discards all data possibly returned by it.")
    7979          (p "The method is responsible to transform the SQL fragment list passed to it into a suitable form for processing by the database.")
     
    8181          (p "You should never have to call this method directly."))
    8282
    83         (method ("(DATASTORE 'fold PROC INIT SQL PARAMETERS) " (& "rArr") " VOID")
     83        (method ("(DATASTORE 'fold PROC INIT SQL [PARAMETERS]) " (& "rArr") " VOID")
    8484          (p "Fetches data returned by the given " (tt "SQL") " statement from from the database and applies " (tt "PROC") " to " (tt "INIT") " or its last return value and to all columns of each row.")
    8585          (p "The method is responsible to transform the SQL fragment list passed to it into a suitable form for processing by the database.")
  • release/4/pandora/trunk/pandora-postgresql.scm

    r15522 r15524  
    107107    params))
    108108
    109 (define-method (*postgresql-datastore* 'execute self resend sql params)
     109(define-method (*postgresql-datastore* 'execute self resend sql #!optional [params '()])
    110110  (clear-result! (%query self sql params)))
    111111
    112 (define-method (*postgresql-datastore* 'fold self resend proc init sql params)
     112(define-method (*postgresql-datastore* 'fold self resend proc init sql #!optional [params '()])
    113113  (row-fold
    114114    (lambda (row seed)
  • release/4/pandora/trunk/pandora-sqlite3.scm

    r15500 r15524  
    9696        stmt))))
    9797
    98 (define-method (*sqlite3-datastore* 'execute self resend sql params)
     98(define-method (*sqlite3-datastore* 'execute self resend sql #!optional [params '()])
    9999  (apply execute (%prepare self sql) params))
    100100
    101 (define-method (*sqlite3-datastore* 'fold self resend proc init sql params)
     101(define-method (*sqlite3-datastore* 'fold self resend proc init sql #!optional [params '()])
    102102  (apply fold-row proc init (%prepare self sql) params))
    103103
  • release/4/pandora/trunk/pandora.html

    r15522 r15524  
    214214    (store 'table 'tags)
    215215    (store 'table 'item-tags)))</pre></dd>
    216 <dt class="definition"><strong>method:</strong> (DATASTORE 'execute SQL PARAMETERS) &rArr; VOID</dt>
     216<dt class="definition"><strong>method:</strong> (DATASTORE 'execute SQL [PARAMETERS]) &rArr; VOID</dt>
    217217<dd>
    218218<p>Executes the given <tt>SQL</tt> statement and discards all data possibly returned by it.</p>
     
    220220<p>The default implementation does nothing.</p>
    221221<p>You should never have to call this method directly.</p></dd>
    222 <dt class="definition"><strong>method:</strong> (DATASTORE 'fold PROC INIT SQL PARAMETERS) &rArr; VOID</dt>
     222<dt class="definition"><strong>method:</strong> (DATASTORE 'fold PROC INIT SQL [PARAMETERS]) &rArr; VOID</dt>
    223223<dd>
    224224<p>Fetches data returned by the given <tt>SQL</tt> statement from from the database and applies <tt>PROC</tt> to <tt>INIT</tt> or its last return value and to all columns of each row.</p>
     
    395395
    396396(for-each
    397   (cut store 'execute &lt;&gt; '())
     397  (cut store 'execute &lt;&gt;)
    398398  '((<b><font color="#BC8F8F">"CREATE TABLE IF NOT EXISTS Authors ("</font></b>
    399399     <b><font color="#BC8F8F">"  id INTEGER, name TEXT,"</font></b>
  • release/4/pandora/trunk/pandora.scm

    r15500 r15524  
    9898    table))
    9999
    100 (*sql-datastore* 'add-method-slot! 'execute noop)
    101 
    102 (define-method (*sql-datastore* 'fold self resend proc init sql params)
     100(define-method (*sql-datastore* 'execute self resend sql #!optional [params '()])
     101  (void))
     102
     103(define-method (*sql-datastore* 'fold self resend proc init sql #!optional [params '()])
    103104  init)
    104105
Note: See TracChangeset for help on using the changeset viewer.