Snooze: Object Relational Mapping of PLT Structures

Dave Gurnell, Noel Welsh, and Matt Jadud

{dave, noel, matt} at untyped

Snooze is an Object Relational Mapping (ORM) library similar to ActiveRecord or Hibernate. It provides a mapping from structures in PLT Scheme to rows in a relational database.

Snooze currently includes back-end code to connect to SQLite 3.6+ and PostgreSQL 8.3+ databases.

    1 Quick start

      1.1 Install a DBMS

      1.2 Link the Snooze API

      1.3 Start using Snooze

    2 Snooze modules

      2.1 DBMS independent code

      2.2 DBMS specific code

        2.2.1 SQLite

        2.2.2 PostgreSQL

      2.3 Audit trail code

    3 Persistent structures

      3.1 Defining persistent structure types

      3.2 IDs and revisions

    4 Entities, relationships and attributes

      4.1 Entities

      4.2 Relationships

      4.3 Attributes

      4.4 Attribute types

      4.5 Shorthand types

      4.6 Persistent structure utilities

    5 Connecting to, querying and updating databases

      5.1 Object oriented interface

      5.2 Procedural interface

      5.3 Saving and deleting structures

    6 Queries

      6.1 Query methods/procedures

      6.2 Query syntax

        6.2.1 Data sources, result types and the #:from clause




        6.2.2 The #:what clause

        6.2.3 The #:where clause

 Expression types

 Boolean operators

 Comparison functions

 Mathematical functions

 Character pattern matching functions

 Character manipulation functions

 Conditional functions

 Functions related to NULL

 The IN function

 Aggregate functions

        6.2.4 The #:order clause

        6.2.5 #:group and #:having clauses

        6.2.6 #:limit and #:offset clauses

        6.2.7 The #:distinct clause

        6.2.8 Aliases

 Entity aliases

 Attribute and expression aliases

        6.2.9 Procedural query layer

 Select statements

 From clauses

 Expressions (where/on/having clauses)

 Order clauses


 Underlying data structures

    7 Quick find procedures

    8 Acknowledgements