Version: 4.1.0.4

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.1.1 Entities

          6.2.1.2 Joins

          6.2.1.3 Subqueries

        6.2.2 The #:what clause

        6.2.3 The #:where clause

          6.2.3.1 Expression types

          6.2.3.2 Boolean operators

          6.2.3.3 Comparison functions

          6.2.3.4 Mathematical functions

          6.2.3.5 Character pattern matching functions

          6.2.3.6 Character manipulation functions

          6.2.3.7 Conditional functions

          6.2.3.8 Functions related to NULL

          6.2.3.9 The IN function

          6.2.3.10 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

          6.2.8.1 Entity aliases

          6.2.8.2 Attribute and expression aliases

        6.2.9 Procedural query layer

          6.2.9.1 Select statements

          6.2.9.2 From clauses

          6.2.9.3 Expressions (where/on/having clauses)

          6.2.9.4 Order clauses

          6.2.9.5 Aliases

          6.2.9.6 Underlying data structures

    7 Quick find procedures

    8 Acknowledgements