Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: MongoDB and WriteConcern

by thanos1983 (Parson)
on Mar 30, 2017 at 11:20 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-03-29 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found