Hi All,<div><br></div><div>I am using the racket 'db' module to interact with my postgresql database. I think there is some mismatch in the documentation towards the end of section 1.1. Here is my sample repl session.</div>
<div><br></div><div><div>> (define get-less-than-pst</div><div> (prepare pgc "select n from the_numbers where n < $1"))</div><div><br></div><div>> (query-list pgc get-less-than-pst 1)</div><div>'(0)</div>
<div><i>> (query-list pgc (bind-prepared-statement get-less-than-pst 2))</i></div><div><i>. . bind-prepared-statement: contract violation, expected: list?, given: 2</i></div><div><i> contract from: <collects>/db/base.rkt, blaming: anonymous-module</i></div>
<div><i> contract: </i></div><div><i> (-> prepared-statement? list? any)</i></div><div><i> at: <collects>/db/base.rkt:125.2</i></div><div><i>> </i></div></div><div><i><br></i></div><div>After checking the documentation for the 'bind-prepared-statement' it expects a variable and a list as it parameter types. Is this correct or am I missing something? </div>
<div><br></div><div>Bikal</div>