DBIx-Web

 view release on metacpan or  search on metacpan

lib/DBIx/Web.pod  view on Meta::CPAN

default is current field.
See C<-ddlb>.


=item -die

	=> \&croak, see source code

(C<Error Processing>)
Failure sub{}: die  / croak / confess; using &{$s->{-die} }('error') inside.
C<set>(-die=>'core'||'perl'||'Module name') call sets also C<-warn>.


=item -edit

	=> not exists || sub{}($self,{field},'eqp' mode,value) || boolean

(C<Field Description>)
Editable field condition. Otherways field will be readonly.


=item -editable

	=> not exists || boolean

(C<Data Record Special fields>, C<Record level Access Control>)
Editable record sign. 
Stamped by C<Database Operation> calls.
Useful for C<User Interface> level.


=item -end0

	=> not exists || sub{}($self)

=item -endh

	=> {} || {name=>sub{}($self)}

=item -end1

	=> not exists || sub{}($self)

(C<Creation and Setup>, C<Triggers>)
C<end> operation triggers.
C<-end0> - before cleanup.
C<-endh> - delayed commands, cleaned after execution.
C<-end1> - after cleanup.


=item -env

	=> not exists || {env var=>value,...}

(C<Creation and Setup>)
Assignment or deletion of environment variables within C<set>.


=item -expr

	=> not exists || database name or formula

(C<Table/Form Description>, C<Field Description>)
Table or Field name as used inside SQL database engine,
or SQL expression.
Table name for application is explained as C<-table> key.
Field name for application is explained as C<-fld>.


=item -fdclass

	=> not exists || string || sub{$_}($self,{field},'eqp' mode,{record}) -> string

(C<Field Description>)
Form data ('td') HTML tag class(es)


=item -fdstyle

	=> not exists || string || sub{$_}($self,{field},'eqp' mode,{record}) -> string

(C<Field Description>)
Form data ('td') HTML tag style


=item -fdprop

	=> not exists || HTML tag properties string

(C<Field Description>)
Form data ('td') HTML tag additional properties


=item -fetched

(C<Database Options>)
Number of rows retrieved from the database query result set.
May be C<-limited> by C<-limit>.
Distinguish from C<-affected>


=item -fhclass

	=> not exists || string || sub{$_}($self,{field},'eqp' mode,{record}) -> string

(C<Field Description>)
Form label ('th') HTML tag class(es)


=item -fhstyle

	=> not exists || string || sub{$_}($self,{field},'eqp' mode,{record}) -> string

(C<Field Description>)
Form label ('th') HTML tag style


=item -fhprop

	=> not exists || HTML tag properties string

lib/DBIx/Web.pod  view on Meta::CPAN

=item min (number, number) -> minimum

C<Misc Data methods>.
Minimum of two numbers given.


=item new ('class', -option=>value,...) -> new DBIx::Web object

=item new ('class', DBIx::Web object to reuse,...) -> DBIx::Web object reused

C<Creation and Setup>.
Creates new DBIx::Web object. Calls C<initialize>(-option=>value,...).
Existed DBIx::Web object may be reused.


=item orarg (L<-X|perlfunc>, argument,...) -> first succeeded argument

=item orarg (sub{$_}(), argument,...) -> first succeeded argument

C<Misc Data methods>.
The value of the first succeeded argument.
Alike C<grep1>, but differs.


=item osCmd (?opt, command, arguments) -> success

C<SubObjects>. Invokes operating system command given.
Options:
'-i'gnore return code,
'-h'ide output.


=item output (strings list) -> success

=item outhtm (HTML tag data structure) -> success

=item outhtml (HTML tag data structure) -> success

=item outxml (XML tag data structure) -> success

C<SubObjects>. Outputs data given via C<-output> sub{} call or
L<print|perlfunc>. 
C<htlsTag> or C<xmlsTag> called to stringify tag data structure.


=item psEval (? '-e', filename, ? base URL)

C<User Interface>.
Evaluates perl script file using C<psParse>.
'e'mbeddable option prevents output of HTTP and HTML headers.
Relative filename will be based on 'C<-path>/psp/' with
C<-url> as default base URL.
See C<Perl Script Pages>.


=item psParse (? '-e', perl script source string, ? base URL) -> perl source string

C<User Interface>.
Converts HTML with embedded perl into perl source with C<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 C<Perl Script Pages>.


=item pthCln (path) -> success

C<File Store>.
Removes path if empty.
Recourses bottom-up. 
Empty path may contain '.htaccess' files.


=item pthCp (-opt, source, target) -> success

C<File Store>.
Copies source path to target using operating system copy command via C<osCmd>.
Options:
'-d'irectory target hint,
'*'glob source hint,
'-r'ecurse subdirectories,
'-i'gnore errors.


=item pthGlob (path mask) -> entries paths list

C<File Store>.
Lists directory's contents by mask. Full path names will be returned


=item pthGlobn (path mask) -> entries names list

C<File Store>.
Lists directory's contents by mask. Relative names will be returned


=item pthForm (type, name,...) -> filesystem path string

C<File Store>.
Forms filesystem path for 'tmp'||'log'||'var'||'dbm'||'rfa' type.
Creates type directory if needed.


=item pthMk (path) -> success

C<File Store>.
Creates directory if needed.
Returns 1 if directory exists, 2 if directory was created.


=item pthRm (?opt, path) -> success

C<File Store>.
Removes path if needed.
Options:
'-r'ecurse subdirectories,
'-i'gnore errors.



=item recActor (table name | {table meta} | {command}, {record}, ?{database record}, 0) -> editable?

lib/DBIx/Web.pod  view on Meta::CPAN

, ? (-data => {fieldname => value,..}) || (fieldname => value,..)
, ? -key => {prototype key} || prototype key
, ? -proto => {prototype field => value,...}
) -> successfully new {field => value,...}

C<Database Operation>.
Creates a new data record to be inserted into database.
Given field values are used to initiate new record's hash ref;
C<-recForm0C> and C<-recNew0C> triggers are executed;
C<-rvcInsBy> C<-rvcUpdBy>, C<-rvcInsWhen>, C<-rvcUpdWhen> fields are filled.
Prototype's field values may be obtained 
from '-proto' or via C<recRead>(-table=>name, -key=>{prototype key}),
but are not used instead of C<-recNew0R>.
C<-recForm0R>, C<-recFlim0R>, C<-recEdt0R>, C<-recNew1C>, C<-recForm1C> triggers are executed at last.
The following calls may be C<recForm> and C<recIns>.


=item recQBF

C<Database Operation> - C<User Interface>.
This is not method, only C<User Interface> query condition 
command and screen behaviour,
implemented within C<cgiRun> and C<cgiForm>


=item recRead (? -table => 'table name', 
? -form => name
? -key => {field name=>value,...},
? -where => 'condition',
? -optrec => false || true,
? -test => false || true,
? -version => false || true
) -> successfully read {fieldname => value,...}

C<Database Operation>.
Reads single record from database using C<recSel>, 
returns this record as a hash ref (with C<-file>, C<-editable> slots if applicable).
Executes C<-recForm0C>, C<-recRead0C>, C<-recForm0R>, C<-recFlim0R>, C<-recRead1C>, C<-recForm1C> triggers.


=item recReindex (clear?, ?index names) -> success

C<Materialised Views>.
Reindexes database.
List of selected indexes to rebuild may be provided.
Indexes will be truncated before reindexing if 'clear'.


=item recRollback () -> self

C<Database Operation>.
Rollbacks changes to database. Should be called from $SIG{__DIE__}, 
see C<set> source for example.
See also C<recCommit>.


=item recSel (
-table => table name || 'FROM clause' || [table name, [table, alias], [table, alias, join],...],
? -join[01] => 'left or right addition to FROM clause'
? -select => 'ALL' || 'DISTINCT' || 'DISTINCTROW' || 'STRAIGHT_JOIN'...,
? -data => [field, [field => alias], {-fld => alias, -expr => formula,..},...],
? -key => {field name => value,...},
? -where => 'WHERE clause' || ['WHERE clause',...],
? -urole => 'author'||'authors'||'actors'||'principals'||'user'||'users',
? -uname => 'role username'
? -ftext => 'full-text search string',
? -version => false ||true,
? -group => 'GROUP BY clause' || ['GROUP BY clause'...]
? -order => string || [field, [field => order],...],
? -keyord => -(a|f|d|b)(all|eq|ge|gt|le|lt),
? -filter=> sub{}(cursor, undef, {field=>value,...})
) -> cursor

C<Database Operation>.
Retrieves records from database.
Some substitutions may be available in SQL WHERE in addition to options above: 
'#urole(role)', '#urole(role, name)', '#ftext(string)'.
Cursor's slot C<-rec> with hash ref {field alias || name => value,...} is bound as field variables.
Cursor's slot C<-rfr> contains array ref with references to values in C<-rec> in order of C<-data> list.
At least C<fetch>, C<fetchrow_arrayref>, C<fetchrow_hashref>, C<finish>, C<close> 
methods are supported by cursor.
See also C<-recSel0C>, C<recList>, C<recRead>.



=item recUnion (option=>value,... cursor||[array]||{hash},...) -> cursor

C<Database Operation>.
UNION operation at cursor level, may be used within C<-ddlb>, etc.
Source cursors may be produced via C<recSel>, C<cgiQuery>, C<cgiQueryFv>, etc.
Options available are:

 -all	=> false (default)	|| true - not unique records
 -asc	=> true	(default)	|| false - descending order
 -lc	=> true	(default)	|| false - case insensitive ordering compare
 -rl	=> false (default)	|| true - right to left fields compare
 -rec	=> {...}	- last fetched values
 -rfr	=> [...]	- last fetched values
 NAME	=> [...]	- column names, default from first cursor listed



=item recUtr (table name ||{command} ||false, field name, new value, old value)

=item recUtr (..., [field names], [new values], [old values])

=item recUtr (..., {source field => target field,...}, {new data}, {old data})

=item recUtr (..., {source field => [new value, old value])

=item recUtr (..., {new field => value}, {where field => value})

C<Database Operation>.
Translates values in actial records. Alike C<recUpd>, but without any triggers.
To use within triggers.
Command options used are 
-table => table name,
-version => switch including versions of records,
-excl => switch excluding record given.




( run in 1.418 second using v1.01-cache-2.11-cpan-99c4e6809bf )