Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: MongoDB and WriteConcern

by thanos1983 (Parson)
on Mar 30, 2017 at 11:20 UTC ( #1186482=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $users->insert_one( {
            "name" => "Joe",
            "age" => 52,
            "likes" => [qw/skiing math ponies/]
        });
    
  2. or download this
    $db->get_collection( 'users' )->insert_one( { a => 1, b => 1 } );
    
  3. or download this
    $rp = MongoDB::WriteConcern->new(); # w:1, wtimeout: 1000
    
    ...
            w        => 'majority',
            wtimeout => 10000, # milliseconds
        );
    
  4. or download this
        use Try::Tiny;
        use Safe::Isa; # provides $_isa
    ...
                ...
            }
        };
    
  5. or download this
    Returns a MongoDB::WriteConcern object constructed from "w", "write_co
    +ncern" and "j".
    
  6. or download this
    $coll->insert({ name => "John Doe", age => 42 });
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1186482]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2023-02-07 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (40 votes). Check out past polls.

    Notices?