Updated 2007-08-01 16:16:34 by escargo

Tcl Database Interface Framework

Essentially TDIF is an attempt to marry all of the ways the Tcl exchanges data with the outside world into one sound interface. The idea is to create a layer that makes it utterly transparent to one's software whether it is storing data in a CSV file, an sql database, or a weather station connected via USB.

A complete handling of the topic will be presented at the 2007 Tcl Developer's Conference in New Orleans. You can follow along with the development on hypnotoad's blog: [1]

TDIF object

The TDIF object is like the root of a file system, to which all of the data sources attach. Each node can be interrogated about several aspects of where it fits in the global picture. I’m still working on the implementation, but here is a rough sketch of what I have in mind:
  tdif address [object] -> Return/Generate a TDIF address of an object
  tdif object [element] -> Convert the a TDIF address to an object name
  tdif is address [string] -> is this string the address to an object
  tdif is object [string] -> is this string the name of an object?
  tdif is container [object] -> Does the object contain nodes?
  tdif is node [object] -> Check that this object works with TDIF
  tdif is mortal [object] -> Is the object subject to garbage collection.
  tdif ls [object] ?[pattern]? -> Return contained nodes that match pattern

  tdif class [object] -> Return the class of an object as specified by its container.
    Used by TDIF when we automatically define objects as someone is walking
    through the file system.

  tdif insert [object] {key value ?key value?...} -> Insert a new node
  tdif alias [object] [element] -> Link the object to a part of the TDIF file system
  tdif exists [object] ?[pattern]? -> Test that a node exists
  tdif delete [object] ?[pattern]? -> Delete a node from TDIF space (and possibly
     from the container itself.
  tdif select [object] [{key key ...}] ?[pattern]? ... -> Select information from a
    container that matches the {key op value}. Key is the name of a field. Op is
    a comparison operation (= not like). Value is a value.
  tdif container [object] -> Return the container of an object

Participant Class Methods