         "erg" >>username
         "secrets?" >>password
         "factor-test" >>database
-    swap with-db ; inline"
+    swap with-db ; inline"""
 } ;
 
 ABOUT: "db"

"Make a " { $snippet "with-" } " combinator to open and close a database so that resources are not leaked." $nl

"SQLite example combinator:"
{ $code "
USING: db.sqlite db io.files io.files.temp ;
: with-sqlite-db ( quot -- )
    "my-database.db" temp-file <sqlite-db> swap with-db ; inline" } 

"PostgreSQL example combinator:"
{ $code " USING: db.postgresql db ;
: with-postgresql-db ( quot -- )
    <postgresql-db>
        "localhost" >>host

{ $subsection sql-query }
"Here's an example usage where we'll make a book table, insert some objects, and query them." $nl
"First, let's set up a custom combinator for using our database. See " { $link "db-custom-database-combinators" } " for more details."
{ $code """
USING: db.sqlite db io.files io.files.temp ;
: with-book-db ( quot -- )
    "book.db" temp-file <sqlite-db> swap with-db ; inline" }
