annotate tests/urblog.ur @ 2174:ce312cad5ecd

Use correct OpenSSL thread safety macros on OS X (closes #209) Create an Autoconf test to determine if pthread_t is a pointer or scalar type, and use the appropriate CRYPTO_THREADID_set macro based on the result.
author Benjamin Barenblat <bbaren at mit.edu>
date Sun, 20 Sep 2015 17:46:07 -0400
parents 19e8e3d556d6
children
rev   line source
adam@1443 1 table entry : { Id : int, Title : string, Created : time, Author : string,
adam@1443 2 Body : string }
adam@1443 3 PRIMARY KEY Id
adam@1443 4
adam@1443 5 fun list () =
adam@1443 6 rows <- queryX (SELECT * FROM entry)
adam@1443 7 (fn row =>
adam@1443 8 <xml>
adam@1443 9 <div>
adam@1443 10 <h1>{[row.Entry.Title]}</h1><br />
adam@1443 11 <h2>By {[row.Entry.Author]} at {[row.Entry.Created]}</h2>
adam@1443 12 <p>{[row.Entry.Body]}</p>
adam@1443 13 </div>
adam@1443 14 </xml>
adam@1443 15 );
adam@1443 16 return
adam@1443 17 <xml>
adam@1443 18 <head>
adam@1443 19 <title>All Entries</title>
adam@1443 20 </head>
adam@1443 21 <body>
adam@1443 22 <h1>All Entries</h1>
adam@1443 23 {rows}
adam@1443 24 </body>
adam@1443 25 </xml>
adam@1443 26
adam@1443 27 fun main () = return <xml>
adam@1443 28 <head>
adam@1443 29 <title>UrBlog</title>
adam@1443 30 </head>
adam@1443 31
adam@1443 32 <body>
adam@1443 33 <h1>UrBlog</h1>
adam@1443 34 </body>
adam@1443 35 </xml>