User Tools

Site Tools


esmith:db:record

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
esmith:db:record [2015/05/22 07:38]
stephdl [SYNOPSIS]
esmith:db:record [2019/06/05 19:48] (current)
Line 39: Line 39:
 Returns a hash of all the properties for this $record.  In scalar context it will return the number of properties this $record has. Returns a hash of all the properties for this $record.  In scalar context it will return the number of properties this $record has.
  
-==== prop ==== +===== prop ===== 
-=== set_prop ===+==== set_prop ====
              my $value = $record->prop($property);              my $value = $record->prop($property);
                          $record->set_prop($property, $value);                          $record->set_prop($property, $value);
Line 48: Line 48:
 set_prop() will die if the database is read-only. set_prop() will die if the database is read-only.
  
-=== delete_prop ===+==== delete_prop ====
              my $value = $record->delete_prop($property);              my $value = $record->delete_prop($property);
  
Line 54: Line 54:
 delete_prop() will die if the database is read-only. delete_prop() will die if the database is read-only.
  
-=== merge_props ===+==== merge_props ====
              $record->merge_props(%properties);              $record->merge_props(%properties);
  
Line 61: Line 61:
 merge_props() will die if the database is read-only. merge_props() will die if the database is read-only.
  
- {+  {
     my $popd = $DB->get("popd") or return;     my $popd = $DB->get("popd") or return;
     my $pop3 = $DB->get("pop3") ||   $DB->new_record("pop3", { type => "service" });     my $pop3 = $DB->get("pop3") ||   $DB->new_record("pop3", { type => "service" });
     $pop3->merge_props($popd->props);     $pop3->merge_props($popd->props);
     $popd->delete;     $popd->delete;
- }+  }
  
-=== reset_props ===+==== reset_props ====
              $record->reset_props(%properties);              $record->reset_props(%properties);
  
Line 75: Line 75:
 reset_props() will die if the database is read-only. reset_props() will die if the database is read-only.
  
-=== delete ===+==== delete ====
              $record->delete;              $record->delete;
  
Line 89: Line 89:
  
 == SEE ALSO == == SEE ALSO ==
-[http://wiki.contribs.org/Esmith::DB esmith::DB]+[[esmith:db|esmith::DB]
 {{tag> neth-development sme-development }} {{tag> neth-development sme-development }}
  
esmith/db/record.1432280309.txt.gz · Last modified: 2019/06/05 19:48 (external edit)