Version 0 of Store

Updated 2011-01-25 02:26:25 by CMcC

Store - a simplistic data store over TDBC (25Jan2011 CMcC)

Latest version can always be found here [L1 ] and was developerd as a Wub utility.

A 'store' is considered to be a database with fairly simple access/update requirements:

Store presumes we're primarily interested in one table of a db, and that all tables can meaningfully be accessed by row number / oid.

Store LRU-caches tdbc-prepared statements for all DB interactions this saves time re-preparing statements which might not change

Store provides get/set/incr for individual fields by record oid

Store provides for record matching/fetching/updating/deleting using a match alist, passed in args, whose terms are ANDed together.

Match alists comprise pairs of words, similar to a dict, but with repetition permitted. The name part of each pair may be a simple field name, in which case it represents a match for equality with the named field.

If the name part of a match alist is suffixed with **, * or %, it will be treated as a REGEXP, GLOB or LIKE field comparison, respectively.

The name part may also be suffixed with >=, <=, >, <, != or = to indicate the respective SQL comparison operator.

Despite its focus on simple matches and single table access, Store exports db, stmt and stmtL, providing unfettered access to the underlying database. The stmt commands provide caching.