Class Loader

Use

Loader is a class of the sdb.loader module.

You can use the methods of this class to execute Loader commands and SQL statements.

Features

The class Loader contains the following methods:

cmd

rawCmd

sql

release

Constructor Definition

Loader ()

When you call the constructor, the Loader is started on the local computer, but no connection to the database instance is established yet.

Example

...

       1.      You start the Loader on the local computer:

session = sdb.loader.Loader ()

       2.      You now have the following options, among others:

0     You open a database session (database instance DEMODB)on the local computer:

session.cmd('USE DB DEMODB')

0     You open a database session (database instance DEMODB)on the remote computer PARMA:

session.cmd('USE DB DEMODB ON PARMA')

0     You open a database session (database instance DEMODB) on the remote computer PARMA as database user MONA with password RED:

session.cmd('USE USER MONA RED DB DEMODB ON PARMA')

       3.      You close the connection to the Loader and close the database session.

session.release ()