Skip to content

Instantly share code, notes, and snippets.

@robdaemon
Created August 8, 2013 05:32
Show Gist options
  • Save robdaemon/6181739 to your computer and use it in GitHub Desktop.
Save robdaemon/6181739 to your computer and use it in GitHub Desktop.
Attempted macro for implementing a "with-sqlite-db"
define macro with-sqlite-db
{ with-sqlite-db (?db-location:expression) ?:body end }
=> {
let (result, sqlite3-db) = sqlite3-open(?db-location);
?body;
sqlite3-close(sqlite3-db);
}
end macro with-sqlite-db;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment