Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 3, the unsupported old release. You're almost certainly looking for [[/eggref/4/sql-null|the CHICKEN 4 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-4.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. [[tags: egg]] == sql-null === Description An extension for providing a portable SQL NULL object. === Author Ivan Shmakov === Documentation The sql-null extension implements the following interface. <procedure>(sql-null)</procedure> Return an object, corresponding to a SQL NULL value. The object is guaranteed to be of a type disjoint from all of the R5RS' standard types. It's unspecified whether the values returned by this function will be {{eq?}} to each other: <enscript highlight=scheme> (eq? (sql-null) (sql-null)) => ; unspecified. </enscript> <procedure>(sql-null? OBJECT)</procedure> Return #t if OBJECT is a SQL NULL object. Return #f otherwise. <macro>(sql-not OBJECT)</macro> Return {{OBJECT}} if {{OBJECT}} is a SQL NULL object. Return the value of {{(not OBJECT)}} otherwise. <enscript highlight=scheme> (sql-not (sql-null)) => SQL-NULL (sql-not 'a) => #f (sql-not #f) => #t (let ((null (sql-null))) (eq? null (sql-not null))) => #t </enscript> <macro>(sql-and TEST-1 ...)</macro> The {{TEST}} expressions are evaluated from left to right, and the value of the first expression that evaluates to a false value is returned, and any remaining {{TEST}}s are not evaluated. If there were no expressions to evaluate to a false value, the value of any of the expressions to evaluate to a SQL NULL is returned. If there were no such expressions as well, {{#t}} is returned. <enscript highlight=scheme> (sql-and 1) => 1 (sql-and 1 (sql-null) 2) => SQL-NULL (sql-and #f (sql-null)) => #f </enscript> In the absence of the expressions that evaluate to SQL NULL values, the semantics is the same as for {{(and test-1 ...)}}. One could think of the SQL NULL as "sticky"; as soon as it is encountered, it will be the result of the entire expression (unless {{#f}} is also encountered). <macro>(sql-or test-1 ...)</macro> The TEST expressions are evaluated from left to right, and the value of the first expression that evaluates to a value, other than SQL NULL and a false value (a ``SQL true'' value), is returned, and any remaining TESTs are not evaluated. If there were no expressions to evaluate to a SQL true value, the value of any of the expressions to evaluate to a SQL NULL is returned. If there were no such expressions as well, {{#f}} is returned. In the absence of the expressions that evaluate to SQL NULL values, the semantics is the same as for {{(or test-1 ...)}}. <enscript highlight=scheme> (sql-or 1) => 1 (sql-or #t (sql-null) 2) => #t (sql-or #f (sql-null) 1) => SQL-NULL </enscript> === License Public Domain
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you add 0 to 2?