view release on metacpan or search on metacpan
misc/js/debug.js view on Meta::CPAN
var initialtab=[1,"sc1"]
function cascadedstyle(el,cssproperty,csspropertyNS){if(el.currentStyle)
return el.currentStyle[cssproperty]
else if(window.getComputedStyle){var elstyle=window.getComputedStyle(el,"")
return elstyle.getPropertyValue(csspropertyNS)}}
var previoustab=""
function expandcontent(cid,aobject){if(document.getElementById){highlighttab(aobject)
misc/js/debug.js view on Meta::CPAN
function detectSourceindex(aobject){for(i=0;i<tabobjlinks.length;i++){if(aobject==tabobjlinks[i]){tabsourceindex=i
break}}}
function do_onload(){var cookiename=(typeof persisttype!="undefined"&&persisttype=="sitewide")?"tabcontent":window.location.pathname
var cookiecheck=window.get_cookie&&get_cookie(cookiename).indexOf("|")!=-1
collecttablinks()
initTabcolor=cascadedstyle(tabobjlinks[1],"backgroundColor","background-color")
initTabpostcolor=cascadedstyle(tabobjlinks[0],"backgroundColor","background-color")
if(typeof enablepersistence!="undefined"&&enablepersistence&&cookiecheck){var cookieparse=get_cookie(cookiename).split("|")
var whichtab=cookieparse[0]
var tabcontentid=cookieparse[1]
expandcontent(tabcontentid,tabobjlinks[whichtab])}
else
view all matches for this distribution
view release on metacpan or search on metacpan
qtgui/examples/mainwindows/mdi/MainWindow.pm view on Meta::CPAN
this->{saveAsAct}->setEnabled($hasMdiChild);
this->{pasteAct}->setEnabled($hasMdiChild);
this->{closeAct}->setEnabled($hasMdiChild);
this->{closeAllAct}->setEnabled($hasMdiChild);
this->{tileAct}->setEnabled($hasMdiChild);
this->{cascadeAct}->setEnabled($hasMdiChild);
this->{nextAct}->setEnabled($hasMdiChild);
this->{previousAct}->setEnabled($hasMdiChild);
this->{separatorAct}->setVisible($hasMdiChild);
my $hasSelection = (this->activeMdiChild() &&
qtgui/examples/mainwindows/mdi/MainWindow.pm view on Meta::CPAN
this->{windowMenu}->clear();
this->{windowMenu}->addAction(this->{closeAct});
this->{windowMenu}->addAction(this->{closeAllAct});
this->{windowMenu}->addSeparator();
this->{windowMenu}->addAction(this->{tileAct});
this->{windowMenu}->addAction(this->{cascadeAct});
this->{windowMenu}->addSeparator();
this->{windowMenu}->addAction(this->{nextAct});
this->{windowMenu}->addAction(this->{previousAct});
this->{windowMenu}->addAction(this->{separatorAct});
qtgui/examples/mainwindows/mdi/MainWindow.pm view on Meta::CPAN
my $tileAct = Qt::Action("&Tile", this);
this->{tileAct} = $tileAct;
$tileAct->setStatusTip("Tile the windows");
this->connect($tileAct, SIGNAL 'triggered()', this->{mdiArea}, SLOT 'tileSubWindows()');
my $cascadeAct = Qt::Action("&Cascade", this);
this->{cascadeAct} = $cascadeAct;
$cascadeAct->setStatusTip("Cascade the windows");
this->connect($cascadeAct, SIGNAL 'triggered()', this->{mdiArea}, SLOT 'cascadeSubWindows()');
my $nextAct = Qt::Action("Ne&xt", this);
this->{nextAct} = $nextAct;
$nextAct->setStatusTip("Move the focus to the next window");
this->connect($nextAct, SIGNAL 'triggered()',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Quiq/Database/Connection.pm view on Meta::CPAN
if ($self->isOracle) {
my $stmt = $sql->dropTrigger($name);
return $self->sqlAtomic($stmt);
}
elsif ($self->isPostgreSQL) {
my $stmt = $sql->dropFunction($name.'_proc()',-cascade=>1);
return $self->sqlAtomic($stmt);
}
$self->throw('Not implemented');
}
view all matches for this distribution
view release on metacpan or search on metacpan
and an SQL statement, if relevant, by including debug=1 in the URL.
=head1 TODO
Generate forms for interactive data definition.
Enforce referential integrity (cascade/block deletes).
* Enforce uniqueness for label columns.
* Add fancy display options that support automagic hyperlinking of
URLs and email addresses.
* denotes feature present in the original PHP/FI version.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/RDF/Flow.pm view on Meta::CPAN
use RDF::Flow::Pipeline;
use RDF::Flow::Cached;
use base 'Exporter';
our @EXPORT = qw(rdflow);
our @EXPORT_OK = qw(rdflow cached union cascade pipeline previous rdflow_uri);
our %EXPORT_TAGS = (
all => [qw(rdflow cached union cascade pipeline previous)] );
our $PREVIOUS = RDF::Flow::Source->new( sub { shift->{'rdflow.data'} } );
sub rdflow { RDF::Flow::Source->new(@_) }
sub union { RDF::Flow::Union->new( @_ ) }
sub cascade { RDF::Flow::Cascade->new( @_ ) }
sub pipeline { RDF::Flow::Pipeline->new( @_ ) }
sub cached { RDF::Flow::Cached->new( @_ ); }
sub previous { $RDF::Flow::PREVIOUS; }
lib/RDF/Flow.pm view on Meta::CPAN
=item C<cached>
Shortcut to create a new cached source with L<RDF::Flow::Cached>.
=item C<cascade>
Shortcut to create a new source cascade with L<RDF::Flow::Cascade>.
=item C<pipeline>
Shortcut to create a new source pipeline with L<RDF::Flow::Pipeline>.
view all matches for this distribution
view release on metacpan or search on metacpan
bin/serv1.pl view on Meta::CPAN
{
my $r_person = $q->param('r_person') or die "No node specified";
# my $model = $s->get_model(NS_LD.'#M1');
my $model = $s;
my $person = $model->get($r_person);
if( $person->delete_node_cascade() )
{
return "Deleted person";
}
else
{
view all matches for this distribution
view release on metacpan or search on metacpan
t/rdql-tests/rdf/dc.rdf view on Meta::CPAN
<dcterms:abstract xml:lang="en">carlos's test page.</dcterms:abstract>
</rdf:Description>
</rdf:li>
<rdf:li>
<rdf:Description rdf:about="http://testers.mkdoc.com/cascadenet-quiz/">
<dc:title xml:lang="en">Cascadenet Quiz</dc:title>
<dcterms:abstract xml:lang="en">A test page </dcterms:abstract>
</rdf:Description>
</rdf:li>
view all matches for this distribution
view release on metacpan or search on metacpan
examples/anticol_c.pl view on Meta::CPAN
# Enable field so more power consuming cards can power themselves up
nfc_configure($pdi, NDO_ACTIVATE_FIELD, 1);
my $cmd = pack("C", MU_REQA);
if (my $resp = transceive_bits($pdi, $cmd, 7)) {
$cmd = pack("C2", MU_SELECT1, 0x20); # ANTICOLLISION of cascade level 1
if ($resp = transceive_bytes($pdi, $cmd, 2)) {
my (@rb) = unpack("C".length($resp), $resp);
my $cuid = pack("C3", $rb[1], $rb[2], $rb[3]);
if ($rb[0] == 0x88) { # define a constant for 0x88
$cmd = pack("C9", MU_SELECT1, 0x70, @rb); # SELECT of cascade level 1
iso14443a_crc_append($cmd, 7);
if ($resp = transceive_bytes($pdi, $cmd, 9)) {
# we need to do cascade level 2
# first let's get the missing part of the uid
$cmd = pack("C2", MU_SELECT2, 0x20); # ANTICOLLISION of cascade level 2
if ($resp = transceive_bytes($pdi, $cmd, 2)) {
@rb = unpack("C".length($resp), $resp);
$cuid .= pack("C3", $rb[1], $rb[2], $rb[3]);
$cmd = pack("C9", MU_SELECT2, 0x70, @rb); # SELECT of cascade level 2
iso14443a_crc_append($cmd, 7);
if (transceive_bytes($pdi, $cmd, 9)) {
print "2 level cascade anticollision/selection passed for uid : ";
print_hex($cuid, 6);
} else {
warn "Select cascade level 2 failed";
}
} else {
warn "Anticollision cascade level 2 failed";
}
} else {
warn "Select cascade level 1 failed";
}
}
} else {
warn "Anticollision cascade level 1 failed";
}
} else {
warn "Device doesn't respond to REQA";
}
exit 0;
view all matches for this distribution
view release on metacpan or search on metacpan
etc/make_method view on Meta::CPAN
chomp $line;
# Skip blanks and comments
next if ($line =~ /^\s*(?:#.*)?$/);
# I'm using a horrendous if-else cascade to avoid moving the required
# version of Perl to 5.012 just for the "when" construct.
## no critic (ProhibitCascadingIfElse)
if ($line =~ /^name:\s+([\w.]+)$/i)
{
$attrs{name} = $1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/RPiTest.pm view on Meta::CPAN
return ($min, $max);
}
sub rpi_i2c_check {
# Gate tests that require a live I2C bus (e.g. the ADS1115 ADC). Without
# this, a test that unconditionally touches I2C dies mid-run when the bus
# is disabled, leaving stale metadata in shared memory that cascades into
# subsequent tests.
if (! $ENV{RPI_I2C}) {
plan skip_all => "RPI_I2C environment variable not set (these tests " .
"verify PWM via the I2C ADS1115; set RPI_I2C=1 when " .
"the I2C bus and ADS1115 are wired and powered)\n";
view all matches for this distribution
view release on metacpan or search on metacpan
- Detect visibility of inline form from form input rather than .ticket-info-cfs div which is not unique with multiple groupings
- Process dynamically HTML Condition CF
1.12 2023-10-12
- Fix Mason filters, should be not filtered, not html not js
- Add some doc about sort order on cascaded CF
- Limit to inline editing retriggering change on Dropdown Condition CF after inline form has been made visible
- Fix bad variable name
- Fix triggering show needed for cascaded CFs (wrongly deleted by commit #fcf12c1)
1.11 2023-10-11
- Retrigger change on Dropdown Condition CF after bootstrap dropdown has made it visible
- Retrigger change on Dropdown Condition CF after inline form has been made visible
- Check whether condition is met for inline editing
- Update author's name
1.06 2022-12-12
- Update selector to hide/show queues/article according to RT5 upgrades
- Update computing selector to Combobox/Date/DateTime according to RT5 upgrades
- Fix test that cascaded List child CF is hidden when parent conditioned is changed to failed
- Fix event listeners for cascaded List child CF which shoul be on HTML container not on radio buttons
- Avoid JS error raised by bootstrap when triggering show on radio button
- Show bootstrap collapse box when CF is shown
- Increase LWP timeout and add some sleeps to please phantomjs
- Skip some tests since phantomjs randomly messes up with bootstrap
- Add call to RT->Config->PostLoadCheck when changing CustomFieldGroupings to comply with update to 5.0.3
0.15 2019-01-24
- Fix textarea CF conditionned byFix textarea CF conditionned by
- Add tests for textarea CF conditionned by
0.14 2019-01-22
- Add tests for display of cascaded conditioned CFs
- Add tests for edit of cascaded conditioned CFs
- Really fix edit of cascaded conditioned CFs
0.13 2019-01-20
- Fix Binary/Image CF conditionned by
- Add tests for Binary/Image CF conditionned by
- Fix edit of cascaded conditioned CFs by adding hide/show events
- Fix display of cascaded conditioned CFs
0.12 2018-07-02
- Fix editing with two conditions having the same value
- Prevent Error Message
view all matches for this distribution
view release on metacpan or search on metacpan
1.18 2025-06-06
- Fix issue where clicking Add Page on a newly created form could overwrite the default pages
1.17 2025-04-09
- Fix issue with HR component
- Dynamically create cascaded custom field value options on custom field change
- Add core field Starts
- Localize additional strings and core fields - Sollericos
- Add translation for Spanish and Catalan - Sollericos
1.16 2024-12-03
view all matches for this distribution
view release on metacpan or search on metacpan
static/css/terminal-light/charts.css view on Meta::CPAN
}
.chart-wrapper .collection-as-table tr th.oddline {
background: #ddd;
}
.cascade-by-optgroup {
margin-right: 5px;
}
.chart-table-wrapper {
margin-top: .4em;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/RackTables/Schema/Result/Attribute.pm view on Meta::CPAN
__PACKAGE__->has_many(
"attribute_maps",
"RackTables::Schema::Result::AttributeMap",
{ "foreign.attr_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-26 11:34:02
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vwBohNJOvsB/0da3KpXrRQ
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rapi/Blog/DB/Result/Category.pm view on Meta::CPAN
__PACKAGE__->set_primary_key("name");
__PACKAGE__->has_many(
"post_categories",
"Rapi::Blog::DB::Result::PostCategory",
{ "foreign.category_name" => "self.name" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07045 @ 2017-08-20 20:36:08
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9R1QEXzoBCbh4hJhMmAztw
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rapi/Demo/Chinook/DB/Result/Album.pm view on Meta::CPAN
);
__PACKAGE__->has_many(
"tracks",
"Rapi::Demo::Chinook::DB::Result::Track",
{ "foreign.albumid" => "self.albumid" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-09-12 15:36:29
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OJ1U992pTI/1TC7qsm8syA
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rapi/Demo/CrudModes/DB/Result/Bravo.pm view on Meta::CPAN
__PACKAGE__->add_unique_constraint("title_unique", ["title"]);
__PACKAGE__->has_many(
"bravo_notes",
"Rapi::Demo::CrudModes::DB::Result::BravoNote",
{ "foreign.bravo_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-06-20 22:14:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Xvfb5Ivd8WzCa4ffCzNjiQ
view all matches for this distribution
view release on metacpan or search on metacpan
lib/RapidApp/CoreSchema/Result/NavtreeNode.pm view on Meta::CPAN
__PACKAGE__->has_many(
"navtree_nodes",
"RapidApp::CoreSchema::Result::NavtreeNode",
{ "foreign.pid" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->has_many(
"navtree_node_to_roles",
"RapidApp::CoreSchema::Result::NavtreeNodeToRole",
{ "foreign.node_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->has_many(
"saved_states",
"RapidApp::CoreSchema::Result::SavedState",
{ "foreign.node_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
use RapidApp::Util qw(:all);
sub update {
view all matches for this distribution
view release on metacpan or search on metacpan
demo/demo_hash_lexicon.pl view on Meta::CPAN
casava
casave
casavi
casbah
cascabel
cascade
Cascadia
Cascadian
cascadite
cascado
cascalho
view all matches for this distribution
view release on metacpan or search on metacpan
t/coverage-tldr.t view on Meta::CPAN
field 'ODC Open Database License (ODbL)' =>
'odc-open-database-license-(odbl)';
field 'ODC Public Domain Dedication & License 1.0 (PDDL-1.0)' =>
'odc-public-domain-dedication-&-license-1.0-(pddl-1.0)';
# field 'Open CASCADE Technology Public License v6.5' => 'open-cascade-technology-public-license-v6.5';
# field 'OPEN GAME LICENSE (OGL)' => 'open-game-license-(ogl)';
# field 'Open Government Licence v3 (UK)' => 'open-government-licence-v3-(uk)';
field 'Open Group Test Suite License (OGTSL)' =>
'open-group-test-suite-license-(ogtsl)';
field 'OpenLDAP Public License v2.8 (OLDAP-2.8)' =>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Reindeer.pm view on Meta::CPAN
=head2 CascadeClearing
This attribute trait allows one to designate that certain attributes are to be
cleared when certain other ones are; that is, when an attribute is cleared
that clearing will be cascaded down to other attributes. This is most useful
when you have attributes that are lazily built.
See L<MooseX::CascadeClearing> for more information and a significantly more
cogent description.
view all matches for this distribution
view release on metacpan or search on metacpan
ARSTools.pod view on Meta::CPAN
this will delete an ARS Object from the ARServer. It probably goes without saying but you know ...
indescriminate use of this function can turn a perfectly good day of gainful employment into a hellacious nightmare
that ends with standing in line at the unemployment office ... so ... be careful m'kay?
BE AWARE: deleting schemas causes ARS to cascade delete all the workflow associated to that form that isn't shared.
=head2 syntax
$Remedy->DeleteObjectFromServer( [options] ) || die $Remedy->{'errstr'}
view all matches for this distribution
view release on metacpan or search on metacpan
share/script.sql view on Meta::CPAN
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Citrate cycle (TCA cycle)", "00020");
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Clavulanic acid biosynthesis", "00331");
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Cocaine addiction", "05030");
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Collecting duct acid secretion", "04966");
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Colorectal cancer", "05210");
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Complement and coagulation cascades", "04610");
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Cutin, suberine and wax biosynthesis", "00073");
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Cyanoamino acid metabolism", "00460");
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Cysteine and methionine metabolism", "00270");
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Cytokine-cytokine receptor interaction", "04060");
INSERT INTO TEXTS(tag, value, details) VALUES ("search-database-analyses-protein-code-by-kegg-pathway-options", "Cytosolic DNA-sensing pathway", "04623");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Resource/Silo/Metadata.pm view on Meta::CPAN
if (@forward_deps) {
$self->{pending_deps}->add_edges([$name], \@forward_deps);
} else {
# resource is independent, notify dependents if any
$self->{pending_deps}->drop_sink_cascade($name);
};
$self->{resource}{$name} = \%spec;
push @{ $self->{preload} }, $name if $spec{preload};
return $self;
view all matches for this distribution
view release on metacpan or search on metacpan
share/flot/jquery.js view on Meta::CPAN
continue;
}
values[ index ] = jQuery._data( elem, "olddisplay" );
if ( show ) {
// Reset the inline display of this element to learn if it is
// being hidden by cascaded rules or not
if ( !values[ index ] && elem.style.display === "none" ) {
elem.style.display = "";
}
// Set elements which have been overridden with display: none
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rex/JobControl/public/3rdparty/jquery-ui-1.11.1/external/jquery/jquery.js view on Meta::CPAN
values[ index ] = jQuery._data( elem, "olddisplay" );
display = elem.style.display;
if ( show ) {
// Reset the inline display of this element to learn if it is
// being hidden by cascaded rules or not
if ( !values[ index ] && display === "none" ) {
elem.style.display = "";
}
// Set elements which have been overridden with display: none
view all matches for this distribution
view release on metacpan or search on metacpan
share/tmpl/default.tx view on Meta::CPAN
: cascade base
: around title -> {
<: $article.title :> | <: $blog.title :>
: }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rose/DB/Object.pm view on Meta::CPAN
{
my($self, %args) = @_;
my $meta = $self->meta;
my $cascade =
exists $args{'cascade'} ? $args{'cascade'} :
$meta->default_cascade_save;
# Keep trigger-encumbered and cascade code in separate code path
if($self->{ON_SAVE_ATTR_NAME()} || $cascade)
{
my $db = $args{'db'} || $self->db || return 0;
my $ret = $db->begin_work;
$args{'db'} ||= $db;
lib/Rose/DB/Object.pm view on Meta::CPAN
{
my %did_set;
my %code_args =
map { ($_ => $args{$_}) } grep { exists $args{$_} }
qw(changes_only prepare_cached cascade);
#
# Do pre-save stuff
#
lib/Rose/DB/Object.pm view on Meta::CPAN
$code->($self, \%code_args) or die $self->error;
}
}
if($cascade)
{
foreach my $fk ($meta->foreign_keys)
{
# If this object was just set above, just save changes (there
# should be none) as a way to continue the cascade
local $args{'changes_only'} = 1 if($todo->{'fk'}{$fk->name}{'set'});
my $foreign_object = $fk->object_has_foreign_object($self) || next;
if(Rose::DB::Object::Util::has_modified_columns($foreign_object) ||
lib/Rose/DB/Object.pm view on Meta::CPAN
{
$code->($self, \%code_args) or die $self->error;
}
}
if($cascade)
{
foreach my $rel ($meta->relationships)
{
# If this object was just set above, just save changes (there
# should be none) as a way to continue the cascade
local $args{'changes_only'} = 1 if($todo->{'rel'}{$rel->name}{'set'});
my $related_objects = $rel->object_has_related_objects($self) || next;
foreach my $related_object (@$related_objects)
lib/Rose/DB/Object.pm view on Meta::CPAN
join(', ', @pk_methods) . ')');
$self->meta->handle_error($self);
return 0;
}
# Totally separate code path for cascaded delete
if(my $cascade = $args{'cascade'})
{
unless(exists $CASCADE_VALUES{$cascade})
{
Carp::croak "Illegal value for 'cascade' parameter: '$cascade'. ",
"Valid values are 'delete', 'null', and '1'";
}
$cascade = $CASCADE_VALUES{$cascade};
my $mgr_error_mode = Rose::DB::Object::Manager->error_mode;
my($db, $started_new_tx, $error);
lib/Rose/DB/Object.pm view on Meta::CPAN
my $ret = $db->begin_work;
unless(defined $ret)
{
die 'Could not begin transaction before deleting with cascade - ',
$db->error;
}
$started_new_tx = ($ret == IN_TRANSACTION) ? 0 : 1;
lib/Rose/DB/Object.pm view on Meta::CPAN
next REL unless(defined $value);
push(@query, $foreign_column => $value);
}
if($cascade eq 'delete')
{
Rose::DB::Object::Manager->delete_objects(
db => $db,
object_class => $relationship->class,
where => \@query);
}
elsif($cascade eq 'null')
{
my %set = map { $_ => undef } values(%$column_map);
Rose::DB::Object::Manager->update_objects(
db => $db,
object_class => $relationship->class,
set => \%set,
where => \@query);
}
else { Carp::confess "Illegal cascade value '$cascade' snuck through" }
}
elsif($rel_type eq 'many to many')
{
my $map_class = $relationship->map_class;
my $map_from = $relationship->map_from;
lib/Rose/DB/Object.pm view on Meta::CPAN
next REL unless(defined $value);
push(@query, $local_column => $value);
}
if($cascade eq 'delete')
{
Rose::DB::Object::Manager->delete_objects(
db => $db,
object_class => $map_class,
where => \@query);
}
elsif($cascade eq 'null')
{
my %set = map { $_ => undef } keys(%$key_columns);
Rose::DB::Object::Manager->update_objects(
db => $db,
object_class => $map_class,
set => \%set,
where => \@query);
}
else { Carp::confess "Illegal cascade value '$cascade' snuck through" }
}
elsif($rel_type eq 'one to one')
{
push(@one_to_one_rels, $relationship);
}
lib/Rose/DB/Object.pm view on Meta::CPAN
next FK unless(defined $value);
push(@query, $foreign_column => $value);
}
if($cascade eq 'delete')
{
Rose::DB::Object::Manager->delete_objects(
db => $db,
object_class => $fk->class,
where => \@query);
}
elsif($cascade eq 'null')
{
my %set = map { $_ => undef } values(%$key_columns);
Rose::DB::Object::Manager->update_objects(
db => $db,
object_class => $fk->class,
set => \%set,
where => \@query);
}
else { Carp::confess "Illegal cascade value '$cascade' snuck through" }
}
# Process all the rows for each "one to one" relationship
REL: foreach my $relationship (@one_to_one_rels)
{
lib/Rose/DB/Object.pm view on Meta::CPAN
next REL unless(defined $value);
push(@query, $foreign_column => $value);
}
if($cascade eq 'delete')
{
Rose::DB::Object::Manager->delete_objects(
db => $db,
object_class => $relationship->class,
where => \@query);
}
elsif($cascade eq 'null')
{
my %set = map { $_ => undef } values(%$column_map);
Rose::DB::Object::Manager->update_objects(
db => $db,
object_class => $relationship->class,
set => \%set,
where => \@query);
}
else { Carp::confess "Illegal cascade value '$cascade' snuck through" }
}
if($started_new_tx)
{
$db->commit or die $db->error;
lib/Rose/DB/Object.pm view on Meta::CPAN
}
if($error)
{
Rose::DB::Object::Manager->error_mode($mgr_error_mode);
$self->error(ref $error ? $error : "delete() with cascade - $error");
$db->rollback if($db && $started_new_tx);
$self->meta->handle_error($self);
return 0;
}
lib/Rose/DB/Object.pm view on Meta::CPAN
PARAMS are optional name/value pairs. Valid PARAMS are:
=over 4
=item B<cascade TYPE>
Also process related rows. TYPE must be "delete", "null", or "1". The value "1" is an alias for "delete". Passing an illegal TYPE value will cause a fatal error.
For each "one to many" relationship, all of the rows in the foreign ("many") table that reference the current object ("one") will be deleted in "delete" mode, or will have the column(s) that reference the current object set to NULL in "null" mode.
For each "many to many" relationship, all of the rows in the "mapping table" that reference the current object will deleted in "delete" mode, or will have the columns that reference the two tables that the mapping table maps between set to NULL in "n...
For each "one to one" relationship or foreign key with a "one to one" L<relationship type|Rose::DB::Object::Metadata::ForeignKey/relationship_type>, all of the rows in the foreign table that reference the current object will deleted in "delete" mode,...
In all modes, if the L<db|/db> is not currently in a transaction, a new transaction is started. If any part of the cascaded delete fails, the transaction is rolled back.
=item B<prepare_cached BOOL>
If true, then L<DBI>'s L<prepare_cached|DBI/prepare_cached> method will be used (instead of the L<prepare|DBI/prepare> method) when preparing the SQL statement that will delete the object. If omitted, the default value is determined by the L<metadat...
=back
The cascaded delete feature described above plays it safe by only deleting rows that are not referenced by any other rows (according to the metadata provided by each L<Rose::DB::Object>-derived class). I B<strongly recommend> that you implement "cas...
=item B<error>
Returns the text message associated with the last error that occurred.
lib/Rose/DB/Object.pm view on Meta::CPAN
Valid parameters to L<save()|/save> are:
=over 4
=item B<cascade BOOL>
If true, then sub-objects related to this object through a foreign key or relationship that have been previously loaded using methods called on this object and that contain unsaved changes will be L<saved|/save> after the parent object is saved. Thi...
All database operations are done within a single transaction. If the L<db|/db> is not currently in a transaction, a new transaction is started. If any part of the cascaded save fails, the transaction is rolled back.
If omitted, the default value of this parameter is determined by the L<metadata object|/meta>'s L<default_cascade_save|Rose::DB::Object::Metadata/default_cascade_save> class method, which returns false by default.
Example:
$p = Product->new(id => 123)->load;
print join(', ', $p->colors); # related Color objects loaded
$p->colors->[0]->code('zzz'); # one Color object is modified
# The Product object and the modified Color object are saved
$p->save(cascade => 1);
=item B<changes_only BOOL>
If true, then only the columns whose values have been modified will be included in the insert or update query. Otherwise, all eligible columns will be included. Note that any column that has a L<default|Rose::DB::Object::Metadata::Column/default> v...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rose/DBx/Object/Renderer.pm view on Meta::CPAN
my $config = {
db => {name => undef, type => 'mysql', host => '127.0.0.1', port => undef, username => 'root', password => 'root', tables_are_singular => undef, table_prefix => undef, new_or_cached => 1, check_class => undef},
template => {path => 'templates', url => 'templates', options => undef},
upload => {path => 'uploads', url => 'uploads', keep_old_files => undef},
form => {download_message => 'View', remove_message => 'Remove', remove_files => undef, cancel => 'Cancel', delimiter => ',', action => undef},
table => {search_result_title => 'Search Results for "[% q %]"', empty_message => 'No Record Found.', no_pagination => undef, per_page => 15, pages => 9, or_filter => undef, like_filter => undef, delimiter => ', ', keyword_delimiter => ',', , like...
menu => {cascade => ['create', 'edit', 'copy', 'delete', 'ajax', 'prepared', 'searchable', 'template_url', 'template_path', 'template_options', 'query', 'renderer_config']},
misc => {time_zone => 'Australia/Sydney', stringify_delimiter => ' ', doctype => '<!DOCTYPE HTML>', html_head => '<style type="text/css">body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;paddi...
columns => {
'integer' => {validate => 'INT', sortopts => 'NUM'},
'numeric' => {validate => 'NUM', sortopts => 'NUM'},
'float' => {validate => 'FLOAT', sortopts => 'NUM'},
lib/Rose/DBx/Object/Renderer.pm view on Meta::CPAN
$args{$action}->{output} = 1;
$args{$action}->{no_head} = $args{no_head} if exists $args{no_head} && ! exists $args{$action}->{no_head};
$args{$action}->{prepared} = $args{prepared} if exists $args{prepared} && ! exists $args{$action}->{prepared};
_cascade($table_config->{cascade}, \%args, $args{$action});
foreach my $option (@{$table_config->{form_options}}) {
_inherit_form_option($option, $action, \%args);
}
lib/Rose/DBx/Object/Renderer.pm view on Meta::CPAN
else {
$options->{template} = 1;
}
}
_cascade($menu_config->{cascade}, \%args, $options);
foreach my $shortcut (@{$menu_config->{shortcuts}}) {
$options->{$shortcut} = 1 if $args{$shortcut} && ! exists $options->{$shortcut};
}
lib/Rose/DBx/Object/Renderer.pm view on Meta::CPAN
}
}
# util
sub _cascade {
my ($cascade, $args, $options) = @_;
foreach my $option (@{$cascade}) {
$options->{$option} = $args->{$option} if defined $args->{$option} && ! defined $options->{$option};
}
return;
}
lib/Rose/DBx/Object/Renderer.pm view on Meta::CPAN
if ($relationships->{$column}->{type} eq 'one to many') {
Rose::DB::Object::Manager->update_objects(object_class => $foreign_class, set => {$foreign_key => $default}, where => [$foreign_key => $self->$primary_key]);
}
else {
# many to many
$self->$column([]); # cascade deletes foreign objects
}
}
}
else {
my $update_method;
lib/Rose/DBx/Object/Renderer.pm view on Meta::CPAN
or_filter => 1, # column filtering is joined by 'OR', defaulted to undef
delimiter => '/', # the delimiter for joining foreign objects in relationship columns, defaulted to ', '
keyword_delimiter => '\s+', # the delimiter for search keywords, defaulted to ','
like_operator => 'like', # only applicable to Postgres, defaulted to undef, i.e. render_as_table() uses 'ilike' for Postgres by default
form_options => ['order', 'template'], # options to be shared by other forms, defaulted to ['before', 'order', 'fields', 'template']
cascade => ['template_data', 'extra'], # options to be cascaded into all forms, defaulted to ['template_url', 'template_path', 'template_options', 'query', 'renderer_config', 'prepared']
},
});
These options can be also passed to C<render_as_table> directly to affect only the particular instance.
lib/Rose/DBx/Object/Renderer.pm view on Meta::CPAN
The C<menu> option defines the global default behaviours of C<render_as_menu>:
$renderer->config({
...
menu => {
cascade => ['template_data', 'extra'], # options to be cascaded into all tables, defaulted to ['create', 'edit', 'copy', 'delete', 'ajax', 'prepared', 'searchable', 'template_url', 'template_path', 'template_options', 'query', 'renderer_config'...
},
});
These options can be also passed to C<render_as_menu> directly to affect only the particular instance.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Rose/HTML/Form.pm view on Meta::CPAN
sub validate
{
my($self, %args) = @_;
$args{'cascade'} = 1 unless(exists $args{'cascade'});
my $fail = 0;
my $cascade = $args{'cascade'};
if($cascade)
{
foreach my $form ($self->forms)
{
next if($form->is_empty && $form->empty_is_ok);
lib/Rose/HTML/Form.pm view on Meta::CPAN
PARAMS are name/value pairs. Valid parameters are:
=over 4
=item C<cascade BOOL>
If true, then the L<validate()|/validate> method of each sub-form is called, passing PARAMS, with a C<form_only> parameter set to true. The default value of the C<cascade> parameter is true. Note that all fields in all nested forms are validated re...
=item C<form_only BOOL>
If true, then the L<validate|Rose::HTML::Form::Field/validate> method is not called on the fields of this form and its sub-forms. Defaults to false, but is set to true when calling L<validate()|/validate> on sub-forms in response to the C<cascade>...
=back
Examples:
lib/Rose/HTML/Form.pm view on Meta::CPAN
# Call validate() on fields "foo" and "sub.bar" and
# call validate(form_only => 1) on the sub-form "sub"
$form->validate;
# Same as above
$form->validate(cascade => 1);
# Call validate() on fields "foo" and "sub.bar"
$form->validate(cascade => 0);
# Call validate(form_only => 1) on the sub-form "sub"
$form->validate(form_only => 1);
# Don't call validate() on any fields or sub-forms
$form->validate(form_only => 1, cascade => 0);
=item B<validate_field_html_attrs [BOOL]>
Get or set a boolean flag that indicates whether or not the fields of this form will validate their HTML attributes. If a BOOL argument is passed, then it is passed as the argument to a call to L<validate_html_attrs()|Rose::HTML::Object/validate_htm...
view all matches for this distribution