NAME

  DAL - aka pedal (Perl Enhanced Data Access Layer)


SYNOPSIS

  use DAL;

  my $ds = DAL::dataset->new(-name => 'set', -mode => CREATE);
  my $tab = $ds->addTable(-name => 'table', -rows => 1234);
  my $col = $tab->addColumn(-name => 'column', -type => REAL32);

  etc.


Differences from previous releases

As of version 1.0 of the pedal, the static method

  DAL->register($string) 

is no longer supported. The corresponding actions are now carried out by default once the `use DAL' statement is executed.

If the application defined the variable $VERSION, this will be used to create a unique string with which the application is registered with the DAL.

The DAL module does no longer export data type and access mode constants into the application's name space. These constants must be fully qualified

The pedal makes use of named parameters. These are specified like so:

  $ob->method(par1 => value, par2 => value ...);

The adoption of a new parameter handling library means that parameter names preceeded by a dash (-par1 => value) are no longer supported.

There has been a change in nomenclature in the DAL. Previously, tables, arrays, columns and attributes had a comment field. This is now called label.


DESCRIPTION

The pedal is a Perl OO interface to the XMM Data Access Layer (DAL) libraries. In the following I assume that you are familiar with the DAL data model and the terminology that goes with it.

If you have successfully built this package, you can find more about the XMM DAL (and SAS) by following the links to the local documentation, usually file://${SAS_DIR}/README.html .

Most methods require one or more options to be set. In some cases default values are provided. Note that in general the pedal does not try to ensure that the parameters needed by a method are being set to something sensible (or at all). I made the design choice to make the Perl layer as simple as possible. That means, the parameter values are used in the Perl code are handed down to the underlying libraries that then decide whether this input makes sense or not.


pedal objects

In the following I shall use the following variables to label DAL objects:


pedal data types

The variable $datatype is also used to indicate one of the following constants.


pedal access modes

The variable $mode is used to indicate one of the following constants. These too are exported by default. The variable $mode refers to the way the DAL opens a data set.


pedal memor model

The variable $mem is used to indicate one of the following constants. These too are exported by default. The variable $mem refers to the way the DAL makes use of the available memory.


STATIC METHODS

  DAL::version(); # returns the pedal version in use.

  DAL::clobber(); # returns the clobber status.


CONSTRUCTORS


Data set contructor


Table constructors


Column constructors


Array constructors


Attribute constructor


OTHER METHODS


Any pedal object


Any pedal object but attributes


Any pedal object but attributes and columns


Any pedal object but data sets and tables


Data set objects


Table objects


Column and array objects


Table and Column objects


Column objects (variable length)

These methods work on variable length column. A varaible length column is created by setting dimensions = []> in the addColumn call.


DATA METHODS

Note that these methods are not efficient (i.e., they are slow). Good enough to manipulate small data sets.


Attribute methods


DEVELOPERS NOTES

The pedal is based on a C interface to the XMM Data Access Layer C++ libraries. The C interface was then converted to a set of Perl-callable routines via SWIG (http://www.swig.org/). Then, an object oriented interface was built over the flat Perl interface.


TODO


AUTHORS

Giuseppe Vacanti, cosine science & comuting, XMM Science Operations Team

Mark Thomas, Cara, XMM Science Operations Team

Edward Chapin, XMM Science Operations Centre


HISTORY

The pedal was born out of an idea of Giuseppe Vacanti. It was made possible by Mark Thomas's hard work. Edward Chapin added a patch that fixes the use of BOOL, INT8 and STRING types.


SEE ALSO

DAL::utils.