DBIx::Web - Active Web Database Layer
use DBIx::Web; my $w =DBIx::Web->new( -serial=>2 ,-debug=>2 ,-index=>1 ,-path=>'path to file store' ,-url=>'base URL of file store' ,-urf=>'filesystem URL to file store' ); $w->set(-table=>{ ...... see examples ...... ,$w->tvmVersions() ,$w->tvmHistory() }); $w->set(-form=>{ ...... see examples ...... ,'default'=>{-subst=>'default form or table name'} }); $w->cgiRun();
This is a database layer for Perl scripts, implementing triggers, record versioning, access control at the record level, file attachments to records, materialised views. There is a web user interface also.
Based on DBI and DB_File data engines. Based on CGI for user interface.
Currently implemented and tested on Win32 Apache and IIS (considering w32IISdpsn warnings).
w32IISdpsn
CGI::Bus, the previous project, was: focused on CGI user interface to database tables, not database metaphor; too complex in record version control programming; too complex and surplus in architecture and setup.
WODA has a very interesting database metaphor, but not many features.
Have several disadvantages:
Many of relational databases have not explicit record level access control. It may be implemented via views and triggers, within another application code. Fields for readers and authors names are useful, further needs dependences between records.
Many of relational databases have not temporal data model. It may be implemented via triggers and views, within another application code, but see R3 data model architecture...
But it may be useful recognize, who, when, what record edited. Further needs date-times of actuality of record.
Can I query and view data not from concrete tables but from database? It may be implemented via materialized views metaphor, using triggers. Further needs uniform record identifiers, to point to any record from any record, or URL. Full-text queries are also useful.
Record types are implemented via database tables. Some tables due to generalization may grow. Very big tables may be difficult in repair or maintenance.
May be implemented via BLOBs. But how to attach several files to any record?
Alike Lotus Domino, have several additional disadvantages:
There are no triggers, transactions, joins...
All application codes are concentrated at the server. Why programmer needs to use different programming languages to implement triggers and stored procedures in the database and another procedures in the web server? Why user interface hooks may not be considered as a kind of triggers?
Should be interesting a separate 'triggers server'? Or this may be considered as a kind of application servers?
Why sole engine should be core? There may be many data sources and several engines.
Alike Wiki, have several disadvantages:
Forms, views and queries may be added without metaphor changes, but implementation changes may be great. And what about file attachments?
The goal may to be conceptually better then Lotus Notes or to look alike some Wiki, but with remaining ability to implement any relational database and any data source interface.
Any case, this database has several disadvantages too:
Triggers level implementation is not very efficient.
One of the problems is repeating cursor loops in recUpd (one for '0R' trigger and one inside dbiUpd) and recDel (for '0R' trigger and dbiDel or recUpd). The last loop is always effectively implemented inside DBI SQL databases, but for DB_Files it should be implemented implicitly inside dbiUpd or dbiDel. To implement '1R' triggers inside recUpd or recDel, and also for effectiveness of DB_Files, dbiUpd and dbiDel should not be oriented to the groups of rows, or there should be a fast additional single row oriented interface. Also recDel should use a fast single row oriented interface of recUpd. So, there should be two interfaces to recUpd, dbiUpd and dbiDel for effectiveness. But this is difficult in develop and test.
recUpd
dbiUpd
recDel
dbiDel
Database API implements restricted choice of SQL capabilities. SQL is comprehensive, but alien to any host language. It is too difficult to translate host programming to SQL, SQL to triggers implementation, triggers implementation to SQL towards database.
It is too difficult for embedded Database Engines to support transactions and many SQL features. It is very difficult to implement transactions covering file attachments.
Database Engines
It is very difficult to implement real full-text search and full-text indexing both for database records and file attachments. Existed external indexing machine should understand data records and access rights. Embedded indexing machine should understand formats of files attached. Database may have it's own full-text implementation also.
See version info. See marked with '!!!' comments in the source code.
Slots are available via set call or $self->{-name} syntax. See initialize source for preferred to be defined in new call slots. Table and Form description (-table, -form) slots, special data fields, and another keywords are denoted specially. The first value listed is the default.
Slots
set
initialize
new
-table
-form
Methods are used via $object->call() syntax.
Methods
Slot names begin with '-' sign.
new, initialize, class, set; -env; start, end, -end0, -endh, -end1; setup, -setup; -cgibus
class
-env
start
end
-end0
-endh
-end1
setup
-setup
-cgibus
-die, -warn, -debug;
-die
-warn
-debug
die, warn
die
warn
-locale, -lang, -charset, -lng;
-locale
-lang
-charset
-lng
lng, lnghash
lng
lnghash
max, min, dwnext, orarg, grep1; strpad, strquot; strdata, strdatah, datastr; dsdClone, dsdMk, dsdParse; strtime, timestr, timeadd; cptran; ishtml, htmlEscape, htmlUnescape, urlEscape, urlUnescape, urlCat, htlsTag; xmlEscape, xmlAttrEscape, xmlTagEscape, xmlUnescape, xmlsTag
max
min
dwnext
orarg
grep1
strpad
strquot
strdata
strdatah
datastr
dsdClone
dsdMk
dsdParse
strtime
timestr
timeadd
cptran
ishtml
htmlEscape
htmlUnescape
urlEscape
urlUnescape
urlCat
htlsTag
xmlEscape
xmlAttrEscape
xmlTagEscape
xmlUnescape
xmlsTag
-path, -url, -urf, -fswtr, -fsrdr;
-path
-url
-urf
-fswtr
-fsrdr
pthForm; pthMk, pthGlob, pthGlobn, pthRm, pthCln, pthCp
pthForm
pthMk
pthGlob
pthGlobn
pthRm
pthCln
pthCp
-var, -serial;
-var
-serial
varFile, varLoad, varLock, varStore
varFile
varLoad
varLock
varStore
-log, -logm;
-log
-logm
logOpen, logLock, logRec
logOpen
logLock
logRec
-dbi, -dbiarg, -dbiph, -dbiACLike; -cgi; -output;
-dbi
-dbiarg
-dbiph
-dbiACLike
-cgi
-output
dbi, cgi; hfNew, dbmNew, dbmTable, ccbNew; osCmd; output, outhtm, outhtml, outxml
dbi
cgi
hfNew
dbmNew
dbmTable
ccbNew
osCmd
output
outhtm
outhtml
outxml
-user, -unames, -ugroups; -AuthUserFile, -AuthGroupFile; -userln, -usernt; -udflt, -unflt, -ugflt;
-user
-unames
-ugroups
-AuthUserFile
-AuthGroupFile
-userln
-usernt
-udflt
-unflt
-ugflt
user, userln, unames, ugroups, ugnames, udisp, uglist; ugrexp, ugmember, uguest, uadmrdr, uadmwtr, uadmin; w32IISdpsn, w32adhi, w32agf
user
userln
unames
ugroups
ugnames
udisp
uglist
ugrexp
ugmember
uguest
uadmrdr
uadmwtr
uadmin
w32adhi
w32agf
-serial, -autocommit, -limit, -affect, -affected, -fetched, -limited, -host, -recInsID, -idsplit
-autocommit
-limit
-affect
-affected
-fetched
-limited
-host
-recInsID
-idsplit
-title, -table and -form (Table/Form Description); -mdlTable, -mdeTable; Triggers
-title
Table/Form Description
-mdlTable
-mdeTable
Triggers
-table slot contains database tables descriptions. -form slot contains User Interface forms descriptions. Some slots (like -field, -wkey, Triggers, User Interface) are common to -table and -form. '-qXXX' and -limit slots are sufficient to describe queries or views or lists of records. Some slots may appear at database level also.
User Interface
-field
-wkey
-table, -form; -lbl, -cmt, -expr; -field (Field Description); -key, -keycmp, -wkey, -urm, -null; -ixcnd, -ixrec; -optrec; -dbd; Triggers; User Interface (-cgcXXX; -subst, -recXXX; -query, -frmLso, -frmLsc; -qfilter, -qhref, -qhrcol, -qfetch, -limit; -cgvXXX)
-lbl
-cmt
-expr
Field Description
-key
-keycmp
-urm
-null
-ixcnd
-ixrec
-optrec
-dbd
-cgcXXX
-subst
-recXXX
-query
-frmLso
-frmLsc
-qfilter
-qhref
-qhrcol
-qfetch
-cgvXXX
-field Table/Form Description slot contains array ref of field descriptions (hash refs) and formatting strings.
-fld, -expr, -lbl, -lblhtml, -form, -cmt, -flg; -hide, -hidel, -edit, -null; -inp, -inphtml, -ddlb, -ddlbmult, -ddlbtgt; -colspan, -fhclass, -fhstyle, -fhprop, -fdstyle, -fdclass, -fdprop; -lsthtml, -lhclass, -lhstyle, -lhprop, -ldclass, -ldstyle, -ldprop
-fld
-lblhtml
-flg
-hide
-hidel
-edit
-inp
-inphtml
-ddlb
-ddlbmult
-ddlbtgt
-colspan
-fhclass
-fhstyle
-fhprop
-fdstyle
-fdclass
-fdprop
-lsthtml
-lhclass
-lhstyle
-lhprop
-ldclass
-ldstyle
-ldprop
-rac, -dbiACLike; -racAdmRdr, -racAdmWtr, -racReader, -racWriter; -racActor, -racPrincipal, racUser; -editable
-rac
-racAdmRdr
-racAdmWtr
-racReader
-racWriter
-racActor
-racPrincipal
racUser
-editable
-rvcInsBy, -rvcInsWhen, -rvcUpdBy, -rvcUpdWhen, -rvcActPtr, -rvcChgState, -rvcCkoState, -rvcDelState.
-rvcInsBy
-rvcInsWhen
-rvcUpdBy
-rvcUpdWhen
-rvcActPtr
-rvcChgState
-rvcCkoState
-rvcDelState
See also ttoRVC
ttoRVC
-rfa, -rfdName; -file, -fupd;
-rfa
-rfdName
-file
-fupd
rfdPath, rfdEdmd, rfdGlobn, rfdRm; rfaUpload, rfaRm
rfdPath
rfdEdmd
rfdGlobn
rfdRm
rfaUpload
rfaRm
See also tfdRFD
tfdRFD
-index, -ixcnd, -ixrec;
-index
recIndex, recReindex
recIndex
recReindex
See also ttoRVC, tvmVersions, tvmHistory
tvmVersions
tvmHistory
-ridRef
See also tvmReferences, tfvReferences
tvmReferences
tfvReferences
Triggers may be defined (in execution order) at database level, table level, form level. Common trigger sub{} arguments are ($self, {command}, {command field => value}, {database field => value}). Database values should be considered as old values in '0R' triggers, as new values in '1R' triggers and also in '1C' triggers of single-row operations.
-end0, -endh, -end1, -recTrim0A, -recChg0A, -recChg1A; -recForm0C, -recForm1C; -recNew0C, -recNew1C; -recIns0R, -recInsID, -recIns1R; -recUpd0C, -recUpd0R, -recUpd1C; -recDel0C, -recDel0R, -recDel1C; -recIndex0R; -recSel0C; -recRead0C, -recRead1C
-recTrim0A
-recChg0A
-recChg1A
-recForm0C
-recForm1C
-recNew0C
-recNew1C
-recIns0R
-recIns1R
-recUpd0C
-recUpd0R
-recUpd1C
-recDel0C
-recDel0R
-recDel1C
-recIndex0R
-recSel0C
-recRead0C
-recRead1C
start, end; recCommit, recRollback;
recCommit
recRollback
recNew, recForm, recIns, recUpd, recDel; recSel, recList, recRead, recQBF; recLast; recFields, recValues, recData, recKey, recWKey.
recNew
recForm
recIns
recSel
recList
recRead
recQBF
recLast
recFields
recValues
recData
recKey
recWKey
See also Database Engines.
Record's hash ref returned from Database Operation calls contains data fields and values. But some fields are specially computed to describe record:
Database Operation
-new, -file, -fupd, -editable
-new
Start review with cgiRun.
cgiRun
Table/Form Description; -pcmd, -pdta, -pout; -form; -cgcXXX; -subst, -recXXX (-recNew, -recForm, -recIns, -recUpd, -recDel, -recRead, -recList,...); -recX#A (-recTrim0A, -recChg0A, -recChg1A); -httpheader, -htmlstart; -logo, -icons, -menuchs, -menuchs1, -frmLso, -frmLsc; -login; -cgvXXX;
-pcmd
-pdta
-pout
-recNew
-recForm
-recIns
-recUpd
-recDel
-recRead
-recList
-recX#A
-httpheader
-htmlstart
-logo
-icons
-menuchs
-menuchs1
-login
cgiRun, cgiParse, cgiQuery; urlAuth, urlOpt; psParse, psEval; htmlStart, htmlEnd, htmlHidden, htmlMenu, cgiForm (and also htmlField, cgiDDLB, tfvVersions, tfdRFD, tfvReferences), cgiList, cgiFooter.
cgiParse
cgiQuery
urlAuth
urlOpt
psParse
psEval
htmlStart
htmlEnd
htmlHidden
htmlMenu
cgiForm
htmlField
cgiDDLB
tfvVersions
cgiList
cgiFooter
See also Perl Script Pages, Templates.
Perl Script Pages
Templates
cgiRun (-cgcXXX, -subst, -recXXX, -cgvXXX);
cgiForm (-field, -query -data, -table -field);
-data
cgiList (-query -data -display, -field, -table -field)
-display
See also User Interface.
-tn, tn; ttoRVC; ttsAll, tfsAll; tvmVersions, tfvVersions; tvmReferences, tfvReferences; tvmHistory; tfdRFD; tfoShow, tfoHide; tvdIndex, tvdFTQuery
-tn
tn
ttsAll
tfsAll
tfoShow
tfoHide
tvdIndex
tvdFTQuery
See Slots and Methods
Slots and Methods
=> not exists || 1
(Database Options) Number of rows to be affected by DML 'recUpd' or 'recDel' operation. Distinguish from -limit.
Database Options
(Database Options) Number of rows really affected by DML 'recIns', 'recUpd', 'recDel' operation. See also -affect
=> not exists || file path
(User Identification) Apache Users file, to be used in uglist method, optional
User Identification
(User Identification) Apache Groups file, to be used in ugroups and uglist methods, optional. See also w32agf.
=> 1 || false
(Database Options) Autocommit database mode
=> {}
Internal cache for computed values
=> not exists || sub{}($self, 'name', {metadata}, $s->{-pcmd}, $s->{-pdta}) || 'filename.psp' || 'perl filename'
=> URL to redirect to
(Table/Form Description - User Interface) Redirects cgiRun to execute full external implementation of request or screen alike recNew, recForm, recIns, recUpd, recDel, recRead, recList. See Perl Script Pages for '*.psp' files description. See -recXXX, -subst, -table for redirections of request to another form or table. See -cgvXXX for external implementation of presentation only.
=> not exists || CGI object
(SubObjects) CGI object, if used, created and available via cgi call
SubObjects
item -cgibus
=> not exists || CGI::Bus::tm file attachments path
(Creation and Setup) Switch to CGI::Bus::tm example applications behaviour, may be useful about redesign and migration.
Creation and Setup
(Table/Form Description - User Interface) Redirects cgiRun to execute presentation external implementation of request or screen alike recNew, recForm, recIns, recUpd, recDel, recRead, recList. See Perl Script Pages for '*.psp' files description. See -recXXX for redirections of request to another form or table. See -cgcXXX for full external implementation.
=> locale specific || '1252' || 'sharset code' || not exists
(Locale) Application's charset, see also -locale
Locale
=> not exists || comment text || sub{}(self) -> comment text
(Table Description, Form Description, Field Description) Text of object description to display to users, default (international) or user language specific. See also -lbl
Table Description
Form Description
=> not exists || colspan html td element attribute
(Field Description) Number of form layout columns to be occupied by field. See also -colwidth
-colwidth
=> not exists || width html td element attribute
(Field Description) Width of form layout column to be occupied by field. See also -colspan
=> 0 || 1
(Error Processing) Debug mode switch, debug features level
Error Processing
=> not exists || 'dbi' || 'dbm' || ...
(Table Description, Database Description) Database engine used for table or as default for database. See also Database Engines.
Database Description
=> not exists || DBI object
(SubObjects) DBI object, if used, created and available via dbi call, using -dbiarg to create
=> not exists || '' || rlike regexp ~* similar regexp_like like eq|=; lc; filter|sub
(SubObjects, Record level Access Control) DBI LIKE operation options for access control fields comparation. There may be MySQL 'rlike' or 'regexp' operator, PostgreSQL '~*' operator, Oracle 'regexp_like' function name, SQL'99 'similar to' operator, widely known but problematical 'like' and '=' operators. Additional 'lc' or 'lower' word involves lowercase conversion. Additional 'filter' or 'sub' word involves -filtering to ensure 'like' case. Default operation depends on database driver name.
Record level Access Control
-filter
=> not exists || 'arguments' || [arguments]
(SubObjects) DBI connection arguments string or array, used in dbi call
=> not exists || boolean
(SubObjects) Placeholders ('?') usage switch for arguments of DBI commands. Default behaviour is embedding values quoted as hinted via -flg or analysed.
=> not exists || form name || sub{}(self, {field}) -> ddlb || [value,...[value=>labels],...] || {value=>label,..., value=>[labels],...} || cursor
(Field Description) Drop-down list box with editable input and produced on button press selection list. See also -ddlbmult, -ddlbtgt
(Field Description) Drop down list box allowing multi value selection. Reserved. See -ddlb.
=> not exists || field name || [field name,.. ? '<+field name',.. ? [field name => label, ? multi],..]
(Field Description) Drop down list box targets. '+' marks multivalue fields. 'multi' mark considered as boolean digit or values delimiter. Single field name will be represented with submit button, array will be represented with javascript buttons; default is current field. See -ddlb.
=> \&croak, see source code
(Error Processing) Failure sub{}: die / croak / confess; using &{$s->{-die} }('error') inside. set(-die=>'core'||'perl'||'Module name') call sets also -warn.
=> not exists || sub{}({self},{field},edit,query,value) || boolean
(Field Description) Editable field condition. Otherways field will be readonly.
(Data Record Special fields, Record level Access Control) Editable record sign. Stamped by Database Operation calls. Useful for User Interface level.
Data Record Special fields
=> not exists || sub{}($self)
=> {} || {name=>sub{}($self)}
(Creation and Setup, Triggers) end operation triggers. -end0 - before cleanup. -endh - delayed commands, cleaned after execution. -end1 - after cleanup.
=> not exists || {env var=>value,...}
(Creation and Setup) Assignment or deletion of environment variables within set.
=> not exists || database name or formula
(Table/Form Description, Field Description) Table or Field name as used inside SQL database engine, or SQL expression. Table name for application is explained as -table key. Field name for application is explained as -fld.
(Field Description) Form data ('td') HTML tag class
(Field Description) Form data ('td') HTML tag style
(Field Description) Form data ('td') HTML tag additional properties
(Database Options) Number of rows retrieved from the database query result set. May be -limited by -limit. Distinguish from -affected
(Field Description) Form label ('th') HTML tag class
(Field Description) Form label ('th') HTML tag style
(Field Description) Form label ('th') HTML tag additional properties
=> [{field},..., ''||"\n"||"\t"||"\f"||'</table>'||'text'||sub{},..., {field}] => {name => {attributes}} # deprecated
(Table/Form Description - Field Description) Array ref contains field descriptions as a hash refs. Text or result of sub{} evaluation will be outputted. Another type entries are tabular form layout hints: '' continues labels and fields in the current row, "\n" continues on next row(s), "\t" skips cell(s), "\f" finishes tabular layout, '</table>' finishes tabular layout and labels of the fields. See also -colspan and -rowspan.
-rowspan
=> not exists || record file attachments subdirectory
(Data Record Special fields, Record File Attachments) Record file attachments sign and place. Stamped by Database Operation calls. Use rfdPath to obtain absolute location.
Record File Attachments
=> field name
(Field Description) Name of the field as used by application. Database field name or expression may be explained by -expr.
=> not exists || 'ahkweuqln"'
(Field Description) Flags of the field:
'a'll operation below, except 'h'yperlink, 'k'ey, 'w'key, quoting; default
'h'yperlink hint
'k'ey - primary key, -key preffered
'w'here key - optimistic locking key, -wkey preffered
'e'ditable, -edit preffered, see also -hide
'u'pdateable, may be inserted or saved into database
'q'uery form, may be used to form query condition
'l'istable, may be used in lists of records
'n'umeric quoting
'"' string quoting
=> not exists || {form name => {form description} } => not exists || form name to display records || true
(Form Description, User Interface) User Interface forms descriptions.
(Field Description, User Interface) Form to display records by field value.
=> not exists || [{-val=>option, ? -lbl=>title , ? -cmd=> {'cgiList' options} || sub{}(self, name, {metadata}, {query}, option)} || [option, ? title, ? {'cgiList' options} || sub{}],...]
(Table/Form Description - User Interface) cgiQuery / cgiList display options alike column sets (-data, -display), sorting and grouping orders (-order, -group).
-order
-group
=> not exists || boolean || [{-val=>option, ? -lbl=>title , ? -cmd=> {'-pcmd' options} || sub{}(self, name, {metadata}, {query}, option)} || [option, ? title, ? {'-pcmd' options} || sub{}],...] || sub{}(self, name, meta, command, option) -> [list]
=> not exists || sub{}(self, name, meta, {'-pcmd' options}, option)
=> not exists || sub{}(self, name, meta, command, option)
=> not exists || sub{}(self, name, meta, command, option, comment) -> html
=> not exists || sub{}(self, name, meta, command, option) -> html
(Table/Form Description - User Interface) htmlMenu form query options, default provided by cgiQuery as -urole recSel clause.
-urole
-frmLso0A trigger may be used to change -pcmd emulating user defined query parameters. -frmLso0C trigger may be used to modify immediate cgiSel arguments.
-frmLso0A
-frmLso0C
cgiSel
-frmLso1C and -frmLso2C triggers may be used to modify htmlMenu comment and cgiList first column header. urlOpt method may be useful.
-frmLso1C
-frmLso2C
=> not exists || [users names]
(File Store) File Store Readers - users names
File Store
=> [$ENV{USERNAME} || $^O eq 'MSWin32' ? eval{Win32::LoginName} : `logname`]
(File Store) File Store Writers - users names
=> not exists || [field names]
(Table/Form Description) Fields for full-text search. Default is all fields of record.
=> not exists || record file attachments updatable sign
(Data Record Special fields, Record File Attachments) Record file attachments updatable sign. Stamped by Database Operation calls along with -file.
(Field Description) Hide field condition.
(Field Description) Hide field condition with left shift of following layout.
=> see source code
(Database Options) Host name to use in record unique IDs generated, see also -recInsID
=> not exists || {}
(User Interface) CGI::start_html call parameters hash ref
(User Interface) CGI::header call parameters hash ref
=> '/icons'
(User Interface) URL to Apache default icons
=> true || false || sub{}($self, {command}, key value)
(Database Options) Split complex record ID to table name and row ID, if record ID is so complex. Used within rmlIdSplit.
rmlIdSplit
(Materialised Views - Table Description or Database Description) Materialized views support switch, see -ixcnd, -ixrec
Materialised Views
=> not exists || {L<CGI|CGI> widget parameters} || sub{}(C<htmlField> args) -> html
(Field Description) Widget description, mostly in terms of CGI, to which description will be passed. Type selection and additional meanings specified below. See also -ddlb, -ddlbtgt for editable list boxes. See also -inphtml, -lbl, -lblhtml
not exists # text field
-htmlopt=> boolean # html may be, determined via ishtml
-hrefs => boolean # hyperlinks, including 'urlh://' for host relative, 'urlr://' for script relative, 'urlf://' for record file attachments directory relative URLs
-cols => number # text area
-rows => number # text area
-arows => min # text area of variable height
-asize => min # text field of variable length
-labels => sub{}(self) ||{value=>label,...} # list box, see -ddlb for editable features
-labels_LL... # ... user language specific
-values => sub{}(self) ||[value,...] # list box, optional if '-labels'
-rfd => boolean # record file attachments widget
otherwise # text field
=> not exists || html text || sub{}({self},{field},edit,query,value) -> html
(Field Description) HTML presentation of field entry, use it together with -inp. Sub{} will be evaluated to produce HTML string. '$_' in HTML will be replaced with -inp. See also -lblhtml
=> not exists || boolean || sub{}(self, {command}, {record}) -> boolean
(Table/Form Description) Index table (Materialised Views) indication. Scalar 'true' value is used for indexes should be updated from -recIndex0R indexing trigger. Sub{} used as condition for inclusion of particular record from particular table into index. -ixrec used to obtain values for inclusion/exclusion
=> not exists || sub{}(self, {command}, {record}, '+'||'-') -> {record}||[{record},...]
(Table/Form Description) Index table (Materialised Views) records former. May directly create ('+') or delete ('-') index records, or return values of records to be included or excluded. See also -ixcnd
=> [field name,...]
(Table Description) Key fields names of the table.
=> not exists || sub{}(self, [key a], [key b])
(Table Description) Key compare dbm sub{}. Generally not used. See 'compare' parameter of DB_File.
=> locale specific || 'en' || 'language abbreviation' || not exists
(Locale) Application's language, see also -locale
=> not exists || label text || sub{}(self) -> label text
(Table Description, Form Description, Field Description) Label or external name of the object to be displayed to user, default (international) or user language specific. See also -cmt, -lblhtml, -inp, -inphtml
(Field Description) HTML presentation of field label, use it together with -lbl. Sub{} will be evaluated to produce HTML string. '$_' in HTML will be replaced with -lbl.
(Field Description) List data ('<td>') HTML tag class
(Field Description) List data ('<td>') HTML tag style
(Field Description) List data ('<td>') HTML tag additional properties
(Field Description) List heading ('<th>') HTML tag class
(Field Description) List heading ('<th>') HTML tag style
(Field Description) List heading ('<th>') HTML tag additional properties
=> not exists (default 512 used) || number
(Database Options, Table/Form Description) Limit of rows to be retrieved from the database query result set. Distinguish from -affect. See also -fetched, -limited.
(Database Options) Number of rows limited by -limit during retrieve of query result set. Equals to -fetched if set. Distinguish from -affected
=> '' || not exists || 'language'
(Locale) User's language, about CGI::http('Accept_language'), see also -locale
=> POSIX::setlocale(&POSIX::LC_CTYPE())
(Locale) Application's locale, set(-locale=>...) call changes also -charset, -lang, -lng.
=> 1 || undef || DBIx::Web::FileHandle object
(Logging) Log file switch / handle, opened with logOpen
Logging
=> 100
(Logging) Log strings list max size to be displayed
=> '/cgi-bin/ntlm/'
(User Identification) Login URL part, where web server authentication is estimated.
=> not exists || HTML
(User Interface) Logotype to display in the button bar
=> not exists || sub{}($self, cursor, [record]) -> HTML # local $_ =value
(Field Description) Conversion of field value to HTML in the list of records via cgiList. Value may be found in local $_.
=> not exists || sub{}($self, table name) -> C<-table> changed
(Database Description) Table factory, called if datafile description is not found within -table. May add datafile metadata to -table and create datafile if needed. See also -mdlTable.
=> not exists || sub{}($self) -> table list
(Database Description) List of datafiles within database. Some datafiles may not be described initially within -table, but may be listed using -mdlTable for recReindex. See also -mdeTable.
=> not exists || [[form name => form label],...]
(User Interface) User Interface forms list. Default will be generated from -form or -table.
(Data Record Special fields) New record sign, stamped in recNew, considered in recForm.
=> null value
(Field Description, Form Description, Table Description)
Field value to be converted to undef, used by cgiDBData.
cgiDBData
(Table Description)
Optional records switch. To allow recRead or recUpd records not really present in the database. -optrec may be used as recUpd keyword also.
=> not exists || sub{}($self, arguments to be printed out)
(SubObjects) Output sub{} to be used instead of 'print' by output calls
=> "$ENV{DOCUMENT_ROOT}/dbix-web" (see source code for more details)
(File Store) Path to File Store. Subdirectories inside File Store (see pthForm): 'var' - variables file 'var.pl' (see varLoad, varStore), 'uagroup' and 'ualist' files ($^O eq 'MSWin32', w32agf); 'log' - log files (see logRec); 'tmp' - temporary files; 'dbm' - DB_File data files; 'rfa' - attached to records files. See also -url, -urf.
(User Interface) User data input parsed, local inside see cgiRun, parsed by cgiParse
(User Interface) User command input / output, local inside cgiRun, parsed by cgiParse
(User Interface) User data output, local inside cgiRun, filled by cgiRun or cgiAction
cgiAction
=> not exists || sub{}(self, cursor, [borders]) -> success
(Table/Form Description - User Interface) Sub{} to fetch and display next data row by cgiList. Default is formed using -qfilter, -qhref, -qhrcol, -limit
=> not exists || sub{}(self, 'form name', {metadata}, {command}, {record}) -> success
(Table/Form Description - User Interface) Sub{} to filter to user data records by cgiList. Record may be changed during filtering.
=> not exists || 0...
(Table/Form Description - User Interface) Last column number to display -qhref hyperlink in cgiList. Default is 0 - the first column.
=> not exists || {hyperlink spec} || sub{}(self, {record})
(Table/Form Description - User Interface) Specification of hyperlinks (URLs) to be displayed in each data row listed to user by cgiList. Keywords are: '-cmd' => not exists || 'command' || sub{}(self, {record}) - command to be specified in the URL, default is recRead; '-key' => not exists || ['field name',..., ['field name'=>number],...] || sub{}(self, {record}) - -key specification of record to be opened, default is obtained from table/form description; '-urm' => -urm specification, alike '-key' above; '-form' => not exists || 'form name' || sub{}(self, {record}) - constant name of the form to be opened via URL, default is current table/form name; '-formfld' => not exists || 'field name' - field name to store form name to open via URL.
=> not exists || {'recSel' and 'cgiQuery' arguments}
(Table/Form Description - User Interface) Default specification of data records to be retrieved by cgiQuery/recSel and listed for user by cgiList. Additional to recSel clauses or options may be used:
-data and -display arrays of field names or -field - for cgiQuery and cgiList instead of -field -flg values from -table or -form.
-frmLso value, array or sub - in cgiQuery as default -frmLso selection(s) before -query->{-urole}.
-qkey and -qwhere values or subs - as recQBF defaults, because all -query clauses may be overwritten via recQBF except -key and -where catenations.
-qkey
-qwhere
-where
Consider also separate from -query Table/Form Description slots -qhref, -qhrcol, -qfetch, -qfilter for cgiList specification; -frmLso and -frmLsc for cgiQuery specifications.
=> 1 || boolean
(Database Description) Record level Access Control switch
=> 'Administrators,root'
(Database Description) Users, can read any record. Format of this value is alike containing list of user names string field. See also uadmrdr, -racAdmWtr.
(Database Description) Users, can edit any record. Format of this value is alike containing list of user names string field. See also uadmwtr, -racAdmRdr.
=> not exists || ['field name',...]
(Database Description, Table/Form Description - Record level Access Control, Templates) Field(s) to store names of user(s) to be considered as actors of record. Used for -urole clause of recSel. Default is about -rvcUpdBy.
(Database Description, Table/Form Description - Record level Access Control, Templates) Field(s) to store names of user(s) to be considered as principals of record. Used for -urole clause of recSel. Default is about -rvcInsBy.
(Database Description, Table Description) Readers of record - fieldnames with usernames.
(Database Description, Table/Form Description - Record level Access Control, Templates) Field(s) to store names of user(s) to be considered as users of record. Used for -urole clause of recSel. Default is about -racPrincipal.
(Database Description, Table Description) Writers of record - fieldnames with usernames.
(Database Description, Table/Form Description) Record File Attachments switch
=> not exists || sub{}($self, key field name => field value,...)
(in database or table descriptions) Formula to convert record's key into directory name. Default behaviour exists, see rfdName source code
rfdName
=> not exists || [field name,...]
(Database Description, Table/Form Description - Record ID References) Fields may contain references to another records. Scalar reference may be in form 'record id' or 'table//id'. Embedded into text references are considered as '_key=table//id' or '_key=id%3Dtable//id' URL parts. See also tvmReferences, tfvReferences.
Record ID References
=> not exists || sub{}($self, {UI command}, data {field => value})
=> not exists || sub{}($self, {UI command}, source {field => value}, result {field => value})
(User Interface: Database Description, Table Description, Form Description - all executed)
Record changing triggers before ('0A') and after ('1A') record data actions. Called by User Interface. -recChg0A called after -recTrim0A, recNew, recRead, and before recForm, recIns, recUpd, recDel. -recChg1A called after recNew, recForm, recIns, recUpd, recRead. May be used to provide interactivelly computed values.
=> not exists || 'form name' || sub{}($self, 'name', {metadata}, $s->{-pcmd}, $s->{-pdta}) -> $s->{-pout}
(Table/Form Description - User Interface) recDel operation UI implementation
=> not exists || sub{}($self, {command}, new {field => value}, database {field => value})
(Database Description, Table Description, Form Description; all executed) recDel triggers before command ('0C'), before each row ('0R'), after command ('1C'). Old values in command ('C') triggers are not available. New values will be surprise! When record versioning, update triggers will be executed too, within.
(Table/Form Description - User Interface) recForm operation UI implementation. Used also for recNew, recRead, recDel, recQBF operation. See also -subst substitution for all operations and -recXXX for particular substitutions.
=> not exists || sub{}($self, {command}, data {field => value})
=> not exists || sub{}($self, {command}, source {field => value}, result {field => value})
(Database Description, Table Description, Form Description; all executed) recForm triggers before ('0C') and after command ('1C'). -recForm0C is executed starting any record data manipulation, after -recNew0C, -recIns0C, -recUpd0C, -recDel0C; may be used for some kind of computed values. -recForm1C is executed ending any single-record data operation alike recNew, recForm, recIns, recUpd, recRead; may be used to provide values for display only fields.
-recIns0C
=> not exists || sub{}($self, {command}, new {field => value}, old {field => value})
(Table Description, in table description only) Indexing trigger, may be used instead of -ixcnd and -ixrec. New values hash will be undefined in recDel. Old values hash will be undefined in recIns.
(Table/Form Description - User Interface) recIns operation UI implementation
(Database Description, Table Description, Form Description; all executed) recIns triggers before before command ('0C'), before row ('0R'), after row ('1R'), after command ('1C'). Result values are not available in '0R' triggers. See also -recInsID.
=> not exists || sub{}($self, {command}, {field => value})
(Database Description, Table Description; nearest executed) recIns row ID generation trigger. Default operation exists in Database Description. -recInsID is executed after -recIns0R.
(Table/Form Description - User Interface) recList operation UI implementation
(Table/Form Description - User Interface) recNew operation UI implementation
=> not exists || sub{}($self, {command}, record {field => value}, sample {field => value})
(Database Description, Table Description, Form Description; all executed) recNew triggers before ('0') and after command ('1C'). Newly created record's hash ref is available in '0C' trigger, which may add some sample field values.
(Table/Form Description - User Interface) recQBF operation UI implementation used in cgiRun. See also -subst substitution for all operations and -recXXX for particular substitutions.
=> not exists || table or form name
(Table/Form Description - User Interface) Substitutes another object name to process recList request from recQBF screen in cgiRun. Distinguish from -recList. See also -recXXX, recForm, -subst substitutions.
=> not exists || 'form name' || sub{}($self, 'name', {metadata}, $s->{-pcmd}, $s->{-pdta}) -> $s->{-pout} || {'recRead' args}
(Table/Form Description - User Interface) recRead operation UI implementation. Distinguish hash ref form, will be executed in cgiRun after any single-record User Interface operation, from -recForm1C trigger inside Database Operation.
(Database Description, Table Description, Form Description; all executed) recRead triggers before ('0') and after ('1') row read. Result values are not available in before triggers. Source values should be ignored.
=> not exists || sub{}($self, {command}, undef, undef)
(Database Description, Table Description, Form Description; all executed) recSel before command trigger.
The first trigger executed before ('0A') record data action by User Interface to trim starting and ending spaces from field values before -recChg0A.
(Table/Form Description - User Interface) recUpd operation UI implementation
(Database Description, Table Description, Form Description; all executed) recUpd triggers before command ('0C'), before each row ('0R'), after command ('1C'). Old values are not available in 'C'ommand triggers.
=> not exists || 'form name' || sub{}($self, 'name', {metadata}, $s->{-pcmd}, $s->{-pdta}) -> $s->{-pout} || {'recXXX' args}
(Table/Form Description - User Interface) -recNew, -recForm, -recIns, -recUpd, -recDel, -recRead, -recList, -recQBF, -recQBFl operation UI implementation. See also -subst substitution for all operations and -recForm for several.
-recQBF
-recQBFl
=> not exists || 'field name'
(Database Description, Table/Form Description - Record level Version Control) Field to store ID of the actual version of this record. If this field is empty, the record is the last version, actual. If this field is not empty, the record is an old version or is checked-out.
Record level Version Control
=> not exists || [field name => state]
(Database Description, Table/Form Description - Record level Version Control) Check-out state of record: Field name and state value. If record is check out, old version will not be created at record update. And file attachments may be edited. Check-out record may be checked-in -rvcActPtr record. Distinguish from -rvcChgState, which could not be checked-in.
(Database Description, Table/Form Description - Record level Version Control) Deleted state of record: Field name and state value.
=> not exists || [field name => state,...]
(Database Description, Table/Form Description - Record level Version Control) Field name to store record's state and list of the change state values. When record is in change state, old version will not be created at record update. And file attachments may be edited. Distinguish from -rvcCkoState, which may be checked-in.
(Database Description, Table/Form Description - Record level Version Control) Field to store name of user record inserted.
(Database Description, Table/Form Description - Record level Version Control) Field for time record inserted when
(Database Description, Table/Form Description - Record level Version Control) Field to store name of user record updated.
(Database Description, Table/Form Description - Record level Version Control) Field for time record updated when
=> 1 || 0 || 2 || 3
(Database Options) Serialisation level of database operation: 0 - none, 1 - updates, 2 - reads and updates, 3 - everything (exclusive).
(Creation and Setup) Allows automatic setup when main::DATA last modify time later varStored
main::DATA
(Table/Form Description - User Interface) Substitutes another object name to process request in cgiRun. See also -recXXX and -recForm substitutions for particular operations.
=> {table name=>{table description}} => form's basic table name
(Database Description) Data records files (database tables) descriptions.
(Table/Form Description) Name of the basic table of the form.
=> ''
(Database Description) Application's title
=> {template naming set}
(Templates) Template or default naming set, also available via tn. This is an only place for hard coded default special names. See source code for default naming.
=> not exists || sub{}()
(User Identification) User domains filter sub{} to be evaluated against each domain name in $_. Considered in w32agf. See also -unflt, -ugflt.
(User Identification) User groups filter sub{} to be evaluated against each group name in $_. Considered in ugroups and uglist default code. See also -unflt.
=> not exists || sub{} || [group names]
(User Identification) User groups sub{} or [] value. See ugroups.
=> not exists || sub{} || [user name variants]
(User Identification) User name variants sub{} or [] value. See unames.
(User Identification) User names filter sub{} to be evaluated against each name in $_. Considered in uglist default code. See also -ugflt.
=> "file://{-path}/dbix-web"
(File Store) Filesystem URL to File Store, see also -path, -url
=> '/dbix-web'
(File Store) URL to File Store, see also -path, -urf
(Table Description) Table's fields to be used for "unread mark" part of URLs produced by User Interface cgiList; -wkey used if not defined.
=> sub{$ENV{REMOTE_USER}||$ENV{USERNAME}||$GUEST}
(User Identification) User name sub{} or value
=> true || false
(User Identification) Short local usernames switch
=> false || true
(User Identification) Windows NT style usernames ('domain\\username') switch
=> not exists || {variable name => variable value}
(Persistent Variables) Variables hash ref, handled via varLoad and varStore calls.
Persistent Variables
=> \&carp, see source code
(Error Processing) Warning sub{}: warn / carp / cluck; using &{$s->{-warn}}('warning') inside. See also -die
(Table/Form Description) Table's fields used for optimistic record locking during edit operation (User Interface recUpd or recDel). -key used if not defined.
SubObjects. Creates and returns new condition code block object (DBIx::Web::ccbHandle).
DBIx::Web::ccbHandle
SubObjects. Returns CGI object, creates it if not exists in -cgi.
User Interface. Performs drop-down list box via output. Uses -ddlb, -ddlbtgt, -ddlbmult. Used by cgiForm.
User Interface. Outputs cgiRun screen footer with operation and debug messages via output. Uses -fetched, -limited, -affected, -logm, -debug.
User Interface. Outputs record's form via output, used by cgiRun for record and QBF operations (see -recXXX). See Table/Form Description for form specifications and -field for formatting considerations. See htmlField for independent widgets. Use tfdRFD or -inp for file attachments. Use cgiList and -field for embedded views.
User Interface. Lists data rows via output, used by cgiRun for cgiQuery results. '!h' option turns off table header. See Table/Form Description, -query, recSel for query and list specifications, additional query/list clauses are -field to use instead of -data, and -display to use instead of -flg values of -field.
User Interface. Parses CGI input parameters: command, parameters, keywords into -pcmd; data into -pdta. Used internally by cgiRun.
User Interface. Forms and starts query using recSel. Returns cursor. Used by cgiRun, with cgiList follows. See Table/Form Description, -query, cgiList and recSel for query and list specifications.
User Interface. CGI server response implementation. Sets error handlers. Starts and ends session with start and end. Accepts and parses input parameters with cgiParse into -pcmd and -pdta. Logins if needed (cgi redirection to -login). Determines required action, form and table using -cgcXXX, -subst, -recXXX, -table. If external implementation found, invokes it and returns. Invokes action required (stores result in -pout): Database Operation or cgiQuery or embedded implementation. Reassigns -form if found inside -pout. Determines external presentation implementation via -cgvXXX and invokes it. Or outputs http and html headers (htmlStart), hidden fields (htmlHidden), menu bar (htmlMenu), record's form (cgiForm) or list of records (cgiList), screen footer (cgiFooter), form and html footers.
Also implements '-reindex' (run recReindex(1)) and '-setup' (run setup) service command line options, see also Command Line.
Command Line
Creation and Setup. Returns class name of the object.
Misc Data methods. Translates strings between cyrillic codepages.
Misc Data methods
Misc Data methods. Restores data structure from stringified format of strdata result.
SubObjects. Returns DBI connection object, creates it if not exists using -dbiarg and -autocommit
SubObjects. Creates and returns new isam data file object (DBIx::Web::dbmHandle).
DBIx::Web::dbmHandle
SubObjects. Returns isam data file object with table name given, creates and opens it if needed using dbmNew(-name=>pthForm('dbm', table name)).
Error Processing. Raises failure exception like CORE::die or croak. Executes &{$_[0]->{-die}}(@_[1..$#_]). See also -die, -warn, warn
Misc Data methods. Copies data structure recursively.
Misc Data methods. Stringifies any data structure with Data::Dumper Use dsdParse to restore data structure from stringified form. Alike strdata.
Misc Data methods. Restores data structure from stringified format of dsdMk result. Uses Data::Dumper. Alike datastr.
Misc Data methods. Returns the next value of ([0-9]|[a-z]) string left padded to min length. For record IDs generation.
Creation and Setup. Ends (commits) and cleans operation session or transaction started.
Misc Data methods. Returns the first non-empty value or true evaluation result. Alike grep, but differs.
SubObjects. Creates and returns new file handle object (DBIx::Web::FileHandle). File will be opened if file name given.
DBIx::Web::FileHandle
Misc Data methods. Converts parameters given to the list to print HTML tag with 'name', 'attributes' and optional 'content' tags inside. Leading '-' signs in attribute names are ignored. Values are escaped. Newlines string may be the last parameter to format output. The list structure will not be documented. See also xmlsTag, outhtm
User Interface. Generates http and html final string to output by cgiRun
Misc Data methods. Escapes and unescapes to and from HTML text. See also urlEscape.
User Interface. Generates HTML field, used by cgiForm. Empty name means readonly. See -inp for metadata.
User Interface. Generates hidden fields HTML to output by cgiRun Uses -pcmd.
User Interface. Generates menu bar HTML to output by cgiRun Uses -pcmd, -pdta, -pout.
User Interface. Generates http and html headers using -httpheader, -htmlstart, start_multipart_form to output by cgiRun
Creation and Setup. Initiates new DBIx::Web object. Used internally, by new(). See initialize and set sources for defaults.
Misc Data methods. Looks string given like HTML code?
Locale. Returns user language specific variant of string given, short (index=0) or long (index=1). See language translations in '$LNG' hash ref in the source code.
Logging. Opens Log file. This does start call.
Logging. Locks Log file. This is not needed.
Logging. Add record to Log file.
Misc Data methods. Maximum of two numbers given.
Misc Data methods. Minimum of two numbers given.
Creation and Setup. Creates new DBIx::Web object. Calls initialize(-option=>value,...).
Misc Data methods. The value of the first succeeded argument. Alike grep1, but differs.
SubObjects. Invokes operating system command given. Options: '-i'gnore return code, '-h'ide output.
SubObjects. Outputs data given via -output sub{} call or print. htlsTag or xmlsTag called to stringify tag data structure.
User Interface. Evaluates perl script file using psParse. 'e'mbeddable option prevents output of HTTP and HTML headers. Relative filename will be based on '-path/psp/' with -url as default base URL. See Perl Script Pages.
User Interface. Converts HTML with embedded perl into perl source with output calls. 'e'mbeddable html option prevents generation output of html headers. Perl code markers are: '<% perl formula %>', '<script> perl script </script>', '<script language=PerlScript|Perl runat=Server>'. '@_' considered to contain application object, options, filename, base URL, additional args. See Perl Script Pages.
File Store. Removes path if empty. Recourses bottom-up. Empty path may contain '.htaccess' files.
File Store. Copies source path to target using operating system copy command via osCmd. Options: '-d'irectory target hint, '-f'ile target hint, '-r'ecurse subdirectories, '-i'gnore errors.
File Store. Lists directory's contents by mask. Full path names will be returned
File Store. Lists directory's contents by mask. Relative names will be returned
File Store. Forms filesystem path for 'tmp'||'log'||'var'||'dbm'||'rfa' type. Creates type directory if needed.
File Store. Creates directory if needed. Returns 1 if directory exists, 2 if directory was created.
File Store. Removes path if needed. Options: '-r'ecurse subdirectories, '-i'gnore errors.
Database Operation. Commits changes to database. Called from end. See also recRollback
Database Operation. Obtains data field names and values from record manipulation hash ref. See also recFields, recValues, recKey
Database Operation. Deletes record(s) into database, under '-key' or '-where' conditions. When Record level Version Control, operation will be passed to recUpd. But recDel triggers (-recDel0C, -recDel0R, -recDel1C) will be executed anyway. Returns command hash ref or the result of recUpd.
Database Operation. Lists field names from record manipulation hash ref. See also recValues
Database Operation. Recalculates record, new or existing in database. Original field values obtained via recRead(-table=>name, -key=>{original recKey}) and added to new data given if not exists; -recForm0C and -recForm1C triggers executed.
Materialised Views. Update index entry with key given. Index entry will be deleted if undefined reference to hash of data values. Useful for -recIndex0R trigger.
Database Operation. Inserts record(s) into database. Data to be inserted may be given from prototype record via recRead(-table=>name, -key=>{original recKey}), or recSel cursor. Then, given field values will be applied; -rvcInsBy -rvcUpdBy, -rvcInsWhen, -rvcUpdWhen filled; -recForm0C, -recIns0R, -recInsID executed; record inserted into database; <-recIns1R>, -recForm1C executed. Returns record inserted, or command hash ref when insertion from cursor. See also recNew and recForm, but they are not required to prepare data to be inserted.
Database Operation. Obtains Key fields names and values from record's data hash ref using -key. See also recData, recWKey
Database Operation. Reads newest record from database according to field names described and record data given. Attempts including lookup arguments from last. Supplies target with values fetched, returns record fetched. Useful for fetching default field values. May be not implemented for non-sql Database Engines.
Database Operation. Lists records from database. Passes all work to recSel now, may be redesigned.
Database Operation. Creates a new data record to be inserted into database. Prototype's field values obtained via recRead(-table=>name, -key=>{prototype recKey}), but not used instead of -recNew0C. Given field values used to initiate new record's hash ref; -rvcInsBy -rvcUpdBy, -rvcInsWhen, -rvcUpdWhen filled; -recNew0C and -recForm0C executed; -recNew1C and -recForm1C executed. The following calls may be recForm and recIns.
Database Operation - User Interface. This is not method, only User Interface query condition command and screen behaviour, implemented within cgiRun and cgiForm
Database Operation. Reads single record from database using recSel, returns this record as a hash ref (with -file, -editable slots if applicable). Executes -recRead0C, -recRead1C, -recForm1C.
Materialised Views. Reindexes database. List of selected indexes to rebuild may be provided. Indexes will be truncated before reindexing if 'clear'.
Database Operation. Rollbacks changes to database. Should be called from $SIG{__DIE__}, see set source for example. See also recCommit.
Database Operation. Retrieves records from database. Cursor's slot -rec with hash ref {field alias || name => value,...} is bound as field variables. Cursor's slot -rfr contains array ref with references to values in -rec in order of -data list. At least fetch, fetchrow_arrayref, fetchrow_hashref, finish, close methods are supported by cursor. See also -recSel0C, recList, recRead.
-rec
-rfr
fetch
fetchrow_arrayref
fetchrow_hashref
finish
close
Database Operation. Updates record(s) into database, under '-key' or '-where' conditions. With '-optrec', record will be inserted if not present. Returns record updated if one only, or command hash ref if zero or more then one record updated. See also -recUpd0C, -recForm0C, -recUpd0R, -recUpd1C, -recForm1C.
Database Operation. Lists field values from record manipulation hash ref in corresponding to recFields order
Database Operation. Alike recKey, but using -wkey and providing optimistic locking.
Record File Attachments. Removes file attachments listed (alike rfdGlobn output). Record should be -editable with -file, which are Data Record Special fields provided by Database Operation.
Record File Attachments. Adds record's file attachment from CGI::upload. Record should be -editable with -file, which are Data Record Special fields provided by Database Operation.
Record File Attachments. Record's state (-rvcChgState) permits editing of file attachments
Record File Attachments. Returns list of record's file attachments names, relative to rfdPath.
Record File Attachments. Returns path to record's file attachments. This may be absolute filesystem path (-path), URL (-url), or filesystem URL (-urf). Database Operation provides -file, one of Data Record Special fields, if file attachments present.
Record File Attachments. Removes record's file attachments directory and cleans the path bottom-up. Record should be -editable with -file, which are Data Record Special fields provided by Database Operation.
Creation and Setup. Retrieves and sets values of the SLOTS. $s->{-option} direct access may be used also, but set smartly processes some options.
SLOTS
Creation and Setup. Reads and executes setup script from main::DATA file handle. See examples source for details.
Creation and Setup. Starts operation session or transaction. Cleans previous session or transaction state. Uses set to assign options. end ends (commits) and cleans session or transaction started.
Misc Data methods. Stringifies any data structure. Special strdatah form is for optimization needs. Use datastr to restore data structure from string.
Misc Data methods. Stringifies hash, see strdata also.
Misc Data methods. Default pad char is '0', default min length is $NLEN, string will not be trimmed.
Misc Data methods. Escapes and quotes value given if needed.
Misc Data methods. Stringifies time value by mask. Default mask is 'yyyy-mm-dd hh:mm:ss' (ISO). POSIX::strftime uses different mask agreement. See also timestr.
Misc Data methods.
Add values given to time given. Calculation via POSIX::mktime.
Misc Data methods. Converts stringified with strtime time string to seconds form with POSIX::mktime
User Interface. Template Field Description for Record File Directory field. May be used as -field description for Record File Attachments. See source code.
Templates. Template Field Condition for -hide/-hidel details absent, to be used with tfoShow. See source code.
Templates. Template Field Button for '-lblhtml' to Show all details absent. See source code. See also tfoHide
Templates. Template Fields Set for All generally used fields, may be added to the end of -field form layout. See source code.
Templates. Template for Field with embedded View of References to records; embedded 'references' view default definition. See source code. See also tvmReferences
Templates. Template for Field with embedded View of Versions of records; embedded 'versions' view default definition. See source code. See also tvmVersions
Templates. Template or default naming (-tn) interface.
Templates. Template Table Options (slots and values) for Record Version Control. See source code.
Default Data Definitions. Template Tables Set of All generally used materialized views, may be added to the end of -table list. See source code.
Default Data Definitions
Templates. Template View Definition for Full-Text Query page. See inplementation for limitations and details.
Templates. Template View Definition for Index page, 'index' view default definition, enumerating all -menuchs entries.
Templates. Template for Materialized View of database History (or news); 'history' materialized view default definition. See source code.
Templates. Template for Materialized View of References to records, 'references' materialized view default definition. See source code.
Templates. Template for Materialized View of Versions of records, 'versions' materialized view default definition. See source code.
User Identification. Alias of uadmwtr
User Identification. Returns true if current user is a member of -racAdmRdr, just ugmember(-racAdmRdr).
User Identification. Returns true if current user is a member of -racAdmWtr, just ugmember(-racAdmWtr).
User Identification. Returns display name for user or group name given. Returns name given if cannot translate.
User Identification. Returns user ('-u') and group ('-g') names using filter given in array ([]) or hash ({}) ref; '<>' option forces comment notation for hash ref. Default is both ('-ug') in array ref ([]). Uses -AuthUserFile and -AuthGroupFile, or w32agf.
User Identification. Returns true if current user is a member of one of the groups given. Argument may be a group name, a string with the list of group names, a reference to array of variants above.
User Identification. Returns reference to array with names of given or current user (unames) and groups given or current user belongs to (ugroups).
User Identification. Returns sub{} to match string with user names list against ugnames
User Identification. Returns reference to array with names of groups given or current user belongs to. Uses -ugroups sub{} or value. Default is using -AuthGroupFile or w32agf generated files.
User Identification. Returns true if current user is not logged in.
User Identification. Returns reference to array with variants of current user name. Uses -unames sub{} or value. Default is [user] with userln and 'domain\\user' form added if applicable and not met.
User Interface. URL to self script authenticated.
Misc Data methods. Escapes and unescapes to and from URL format. See also htmlEscape.
User Interface. Self URL using -pcmd values with options given added / replaced.
User Identification. Returns name of the current user. Uses -user sub{} or value. Translates 'domain\\user' form to 'user@domain'.
User Identification. Returns local name of the current user, or user. User name domain component (after '@') is discarded if it equals to host name domain component (Windows or DNS).
Persistent Variables. Returns file name to store values of variables.
Persistent Variables. Loads variables into -var. Default lock level is LOCK_SH. File will be locked until end call.
Persistent Variables. Locks variables file. Default is LOCK_EX. File will be locked until end call.
Persistent Variables. Stores -var into variables file. LOCK_EX is used. File will be locked until end call.
User Identification. Returns 'ADSystemInfo' OLE object.
User Identification. Creates or periodically updates user group files using Microsoft Windows system catalogue. pthForm('var','ualist') file is for uglist. pthForm('var','uagroup') file may be used as Apache's 'AuthGroupFile'. -AuthGroupFile should not be set to pthForm('var','uagroup'), it should be set only to externally controlled file!
User Identification. Deimpersonation of authenticated user session on Microsoft IIS. See source for details and warnings!
Error Processing. Raises warning like CORE::warn or carp. Executes &{$_[0]->{-warn}}(@_[1..$#_]). See also -die, -warn, die.
Misc Data methods. Escapes and unescapes to and from XML text. See also htmlEscape.
Misc Data methods. Converts parameters given to the list to print XML tag with 'name', 'attributes' and optional 'content' tags inside. Leading '-' signs in attribute names are ignored. Values are escaped. Newlines string may be the last parameter to format output. The list structure will not be documented. See also htlsTag, outxml
Logical database functionality is implemented in recXXX methods. Corresponding 'Physical' database interfaces are implemented in dbiXXX methods. See source for details.
recXXX
dbiXXX
-dbd eq 'dbi'. See DBI, -dbi, -dbiarg, dbi.
-dbd eq 'dbm'. See DB_File, dbmTable.
-dbd eq 'xmr'. May be in future?
May be in future?
This is HTML (may be XML?) files with embedded Perl code. This may be CGI scripts with HTML following '__END__'. There is simplest and shortest implementation.
psParse method translates perl script string into perl source; '@_' will contain application object, options, filename, base URL, additional args. psEval method executes perl script file by parsing, compiling into sub{}, evaluating.
CGI scripts may provide service operations on database from shell command line, i.e. "web.cgi -reindex" or "web.cgi -setup". Several command line options are implemented within cgiRun method, another options may be implemented within script itself.
It seems, it works again...
Respecifications about -query.
Localization and sample translation development (-lbl_LL, -cmt_LL, -labels_LL).
-lbl_LL
-cmt_LL
-labels_LL
New -frmLsc, Developed -frmLso.
Development of dbiSel, cgiForm, lng.
dbiSel
New -racUser.
-racUser
Renamed -frmOpt to -frmLso.
-frmOpt
Changed uglist - filter argument added to get users of group or groups of user.
New -userln, -usernt.
New recLast.
Removed -recRead0R, -recRead1R.
-recRead0R
-recRead1R
Renamed -recForm1R -> -recForm0C, -recNew0R -> -recNew0C.
-recForm1R
-recNew0R
New -recTrim0A, -recChg0A, -recChg1A.
Examples settings extended and documented.
New -dbiACLike slot to switch ACL 'RLIKE' dialects of MySQL, PosgreSQL, SQL99...
It seems, it works...
Fields hyperlinking development, display of windows users names implemented, new uadmwtr, lng improvement, new -frmLso, new -qwhere, htmlRFD correction via new -fupd, datastr/strdata correction.
htmlRFD
Under construction yet...
SQL subsystem seems working.
-rvcFinState redesigned to -rvcChgState.
-rvcFinState
-flg field quoting hints added.
-fhclass, -fhstyle, -fhprop, -fdclass, -fdstyle, -fdprop, -lhclass, -lhstyle, -lhprop, -ldclass, -ldstyle, -ldprop new field descriptions.
-dbiph, -keyqn new options/slots.
-keyqn
-cgibus new slot, Starting 'webus.cgi' remake of CGI::Bus example, Attempting SQL subsystem.
Some improvements in behaviour.
ugroups(?user) variant in addition to ugnames(?user) '<?XML' tag 'encoding' attribute corrected. HTML style usage corrected.
Doubts found reviewed since 2004-06-26 position. This should not be used yet...
2004-06-26
New -urm feature.
'Default Data Definitions' methods redesigned to Tempates. Templates specifications and examples changed.
Tempates
-unflt and -ugflt slots added to filter user and group names.
-end0, -end1, -endh triggers created, -endh used by w32agf. w32agf rewritten with ugroups and uglist using Windows ADSI, Win32API::Net excluded at all.
Win32::OLE->Option("Warn"=>0) used anywere.
cgiAction: Edit mode switched off when record save.
-racAdmWtr can read only permitted records, but update all can read. -racAdmRdr slot added.
w32adhi created.
w32domain corrected.
w32domain
XML presentation. Menu listboxes behaviour improved. 'dbmSeek' string condition parser improved. 'DHTML Editing Component' used. Temporary files dir environment variables usage reviewed. Default query conditions display. Some another reviews and corrections. This should not be used yet...
tvdFTQuery created. Log more readable. Some corrections. This should not be used yet...
CSS support. tvdIndex created. Some error corrections. This should not be used yet...
This should not be used yet, only looked at, may not work at all.
See beginning of source code
http://makarov.arkhangelsk.ru/index-anton.htm
The biggest are User Interface (43.7 Kb), Database Options (39.5 Kb), tools (30 Kb, Misc Data methods and SubObjects). Details, in kilobytes:
Creation and Setup 12
Misc Data methods 9.6
SubObjects 3 + 20.7 of internal objects
File Store 5.6
Persistent Variables 1
Logging 1.2
User Identification 10.4
Database Options 39.5
User Interface 43.7
Templates 3.4
- see Web.pm
This is free software; you can use redistribute it and/or modify it under the same terms as Perl itself.
Without specially written agreement prohibited using completely, partially or in ideas for impairing nature, wood and timber, mining, cosmic industries in Archangel region; Russian kgbists, bureaucracy and vertical functionary structures.
Andrew V Makarow <makarow@mail.com> with aids of Anton Uemlyanin
4 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
'=item' outside of any '=over'
To install DBIx::Web, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Web
CPAN shell
perl -MCPAN -e shell install DBIx::Web
For more information on module installation, please visit the detailed CPAN module installation guide.