DBMasterTable of Contents

NAMEHOW TO USEMETHODSBackendsINTERNAL METHODSOPEN ISSUESNAMEDBMaster - db master module to access a db space

HOW TO USEuse DBMaster;

my $master = DBMaster->new(-database => 'my_database_name');

my $master = DBMaster->new(-database => 'my_database_file' -backend => 'SQLite')

METHODS database_name)backend_type reading the database database_name. backend_type can b
  • new (-backend => backend_type,

    Creates a new DB master instance using the database backend type given in

    database_name is mandatory and has to
    BackendsMySQLSQLiteEither -host => hostname or $ENV{DBHOST} will change the host
    

    The MySQL backend will try to connect to a mysql server running on localhost using

    The SQLite Backend does not take any additional parameters. It expects to find the database file database_name accessible from where it is running under it's proces parameters to change this behaviour.

    object_class_name is mandatory.

    backend ()cache ()database ()db_handle ()fetch_by_ref (db_id, class, object_id)init_db_references ()knows_class (object_class_name)module_name ()register_db_classes ()translate_ref_to_ids ()Fetches an object by the specified reference tuple. db_id is the internal id

    Initialises the mapping table for references to objects (within one databases

    Reads all the class names which are supported by this database and sets the module name.

    Return an id tuple matching this object reference. The tuple consists of

    Return value of the method is a list.

    Returns a reference to the DBObjectCache (class method)

    Returns reference to self (true) if the object class object_class_name is

    Returns the name of the database

    Returns the name of the module which is associated with the database

    Returns the reference to the DBI handle which is connected to the database host

    Returns the reference to the DBI handle which is connected to the database host This method is usually called internally.

    class the name of the object class and object_id the of this DBMaster

    INTERNAL METHODSInternal or overwritten default perl methods. Do not use from outside!

    AUTOLOAD (dbobject_type)DESTROY ()Disconnects from database before destroying the DBMaster object.

    The method automatically requires the proper package and creates an object instance

    This version of AUTOLOAD allows convenient calls of DBObject packages through the DB master. It ensures that all DBObjects are initialised the correct way and have by calling new. It returns the reference to the newly created object. Thus you can immediately call another method on it.

    OPEN ISSUES