DBIx::Informix::Perform - Informix Perform(tm) emulator
On the shell command line:
export DB_CLASS=[Pg|mysql|whatever] DB_USER=usename DB_PASSWORD=pwd
[$install-bin-path/]generate dbname tablename > per-file-name.per
[$install-bin-path/]perform per-file-name.per (or pps-file-name.pps)
Or in perl, with the above environment settings:
Emulates the Informix Perform character-terminal-based database query and update utility.
The filename given to the perform command may be a Perform specification (.per) file. The call to the run function may be a filename of a .per file or of a file pre-digested by the DBIx::Informix::Perform::DigestPer class (extension .pps). [Using pre-digested files does not appreciably speed things up, so this feature is not highly recommended.]
The argument to the run function may also be a string holding the contents of a .per or .pps file, or a hash ref with the contents of a .pps file (keys db, screen, tables, attrs).
The database named in the screen spec may be a DBI connect argument, or just a database name. In that case, the database type is taken from environment variable DB_CLASS. The username and password are taken from DB_USER and DB_PASSWORD, respectively.
Supports the following features of Informix's Perform:
Field Attributes: COLOR, NOENTRY, NOUPDATE, DEFAULT, UPSHIFT, DOWNSHIFT, INCLUDE, COMMENTS 2-table Master/Detail (though no query in detail mode) VERY simple control blocks (nextfield= and let f1 = f2 op f3-or-constant)
The first letter of each item on the button menu can be pressed.
Q = query. Enter values to match in fields to match. Field values may start with >, >=, <, <=, contain val1:val2 or val1|val2 or end with * (for wildcard suffix). Value of the "=" sign matches a null value. The ESC key queries; DEL key aborts.
A = add. Enter values for the row to add. ESC/DEL when done.
U = update. Edit row values. ESC/DEL when done.
R = remove. NO CONFIRMATION! BE CAREFUL USING THIS!
E = exit.
M / D = Master / Detail screen when a MASTER OF relationship exists between two tables.
Curses Curses::Application Curses::Forms Curses::Widgets
DBI and DBD::whatever
Note: For the generate function / script to work, the DBD driver must implement the column_info method.
DB_CLASS this goes into the DBI connect string. NOTE: knows how to prefix database names for Pg and mysql but not much else.
DB_USER User name for DBI->connect.
BGCOLOR One of eight Curses-known colors for form background (default value is 'black').
FIELDBGCOLOR Default field background color (default is 'blue'). Fields' background colors may be individually overridden by the "color" attribute of the field.
Note, any field whose background matches the form background gets displayed with brackets around it: [field_here] .
Development of DBIx::Informix::Perform was generously funded by Telecom Engineering Associates of San Carlos, CA, a full-service 2-way radio and telephony services company primarily serving public-sector organizations in the SF Bay Area. On the web at http://www.tcomeng.com/ . (do I sound like Frank Tavares yet?)
Eric C. Weaver <firstname.lastname@example.org>
Copyright 2003 by Eric C. Weaver and Telecom Engineering Associates (a California corporation).
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
INFORMIX and probably PERFORM is/are trademark(s) of Informix Software Inc.