The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

MKDoc::SQL::Condition - construct complex SQL conditions

SYNOPSIS

  use MKDoc::SQL;
  
  # define a condition matching france or uk
  my $country_is_uk = new MKDoc::SQL::Condition ('Country', '=', 'United Kingdom');
  my $country_is_fr = new MKDoc::SQL::Condition ('Country', '=', 'France');
  my $delete_cond   = new MKDoc::SQL::Condition();
  $delete_cond->boolean ('OR');
  $delete_cond->add ($country_is_uk);
  $delete_cond->add ($country_is_fr);
  
  # delete uk or french cities
  my $city_t = MKDoc::SQL::Table->table ('Cities);
  $city_t->delete ($delete_cond);