ARSObject
view release on metacpan or search on metacpan
lib/ARSObject.pod view on Meta::CPAN
-lim_or => undef || max number of 'OR keyField=keyValue' pairs
-pk => undef || primary key ARS field name, default is obtained from C<-meta-sql>
-timestamp => undef || 0 || 'Modified Date' timestamp ARS field name, default is obtained from C<-meta-sql>
-ckpush => undef || 1 || 0 - insert, update, delete ARS records according to '_arsobject_insert', '_arsobject_update', '_arsobject_delete' column values.
-ckdel => undef || 0 || 1 - check records deleted from ARS and replicate deletions to the Data Store,
this is expensive and slow, so default if off.
-ckupd => undef || 1 || 0 - check and replicate updates from ARS to the Data Store,
based on timestamps of records if availeble
-unused => undef || SQL where clause part to delete unused records from Data Store table. "ARS field name"s and "ARS form name"s may be used.
-sleep => undef || seconds to L<perlfunc::sleep|perlfunc> between calls to ARS.
=item dbidsquery (-param => value) -> ({fieldName => fieldValue,...},...)
(C<SQL Data Store Methods>)
Query data from SQL Data Store.
Uses C<dbi>(), C<-meta-sql>, C<-sqlschema>.
Any C<dbi>() method may be used for SQL Data Store,
but C<dbidsquery> understands "ARS form name"s and "ARS field name"s
in addition to "sql table name"s and "sql column name"s.
Records are returned as hash refs with ARS field names available,
otherwise SQL column names.
Parameters:
-echo => undef || 0 || 1
-form => ARS form name
-fields => undef || '*' || 'SQL SELECT clause' || [fieldName ||fieldId ||colName,...].
Empty value requests all fields, '*' - all fields or columns.
-query => undef || SQL WHERE clause
-filter => undef || filter sub{}(self, {fieldName => fieldValue,...}) -> allow
-order => [fieldName||fieldId => 1||2,... colName||colNumber => 'asc'||'desc',...] || 'SQL ORDER BY clause'
-undefs => undef || 1 || 0 - include undefined values to records returned
"ARS form name", "ARS field name", "ARS form name"."ARS field name" may be used
in '-fields' and '-query'.
=item dbierrstr () -> dbi->errstr
(C<Error Processing and Echo>)
Last L<DBI|DBI> error, <dbi>->errstr
=item dbiquery (dbi query args, ?-echo=>1) -> dbi cursor object
(C<Utility Objects>)
Query L<DBI|DBI> database using C<dbi>, 'prepare', 'execute'.
Use -echo=>1 to output command to STDOUT.
=item dscmp (data1, data2) -> cmp
(C<Utility Methods>)
Compare two data structures alike L<cmp|perlop>.
=item dsdump (data structure) -> dump string
(C<Utility Methods>)
Stringify any data structure using L<Data::Dumper|Data/Dumper>.
This string may be loaded back with C<dsparse>().
=item dsmerge (array ref,...) -> [merged array]
=item dsmerge (hash ref,...) -> {merged hash}
(C<Utility Methods>)
Sequentally assign elements of data structures given to result data structure.
=item dsparse (perl string) -> data structure
(C<Utility Methods>)
Convert C<dsdump>ed string to data structure.
=item dsquot (data structure) -> stringified
=item dsquot1 (data structure) -> stringified, defined elements only
(C<Utility Methods>)
Quote (stringify) any data structure to human readable form.
=item dsunique (item,...) -> (unique items)
(C<Utility Methods>)
Find unique items in the list given.
=item entry (-form=>name, -id=>entryId,...) -> {entry}
(C<ARS methods>)
Get record from ARS using ARS::ars_GetEntry().
Parameters:
( run in 0.337 second using v1.01-cache-2.11-cpan-efa8479b9fe )