in reply to MongoDB replacing an array
#!/usr/bin/perl use strict; use warnings; use MongoDB; use DateTime; my $today = DateTime->now; my $stamp = DateTime->now->set( 'timestamp' => $today->day, ); my $database = '/tmp/collection'; $database->update( {'host' => '127.0.0.1'}, {'set' => {"timestamp" => 'new'}}, {'multiple' => 1, 'safe' => 1} );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: MongoDB replacing an array
by neilwatson (Priest) on Aug 26, 2012 at 13:13 UTC | |
|
Re^2: MongoDB replacing an array
by Mr. Muskrat (Canon) on Aug 27, 2012 at 18:42 UTC | |
|
Re^2: MongoDB replacing an array
by chchow (Initiate) on May 16, 2014 at 05:43 UTC |