Command Line

Databrid offer a facility that brings some of the functionality found within Databrid to the command line. Currently there is one command.

Commands

To list commands available type in:

java com.databrid.CommandLine

This will output a list of all available commands (only one at present).

java com.databrid.CommandLine CMD PARAMETERS

The command CMD is listed as one of the following:
   exportInserts - Outputs the table as insert statements
                   PARAMETERS: connectId=x table=tablename

The output shows one command "exportInserts" and the parameters it requires.

NOTE:

Export Inserts

The exportInsert command requires the parameters "connectId" and "table". The "connectId" is the id shown in the Login dialog and "table" is the table to output.

Here is an example of running the exportInserts command in Oracle:

Command:

java com.databrid.CommandLine exportinserts connectId=1 table=user_details

Output:

INSERT INTO user_details
(username, user_id, created)
VALUES('scott', 3, TO_DATE('17/12/2009', 'dd/mm/yyyy'));
INSERT INTO user_details
(username, user_id, created)
VALUES('bill', 2, TO_DATE('28/2/2009', 'dd/mm/yyyy'));
INSERT INTO user_details
(username, user_id, created)
VALUES('jim', 1, TO_DATE('28/2/2009', 'dd/mm/yyyy'));
COMMIT;