Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mongodb::oid(3pm) [debian man page]

MongoDB::OID(3pm)					User Contributed Perl Documentation					 MongoDB::OID(3pm)

NAME
MongoDB::OID - A Mongo ObjectId SYNOPSIS
If no "_id" field is provided when a document is inserted into the database, an "_id" field will be added with a new "MongoDB::OID" as its value. my $id = $collection->insert({'name' => 'Alice', age => 20}); $id will be a "MongoDB::OID" that can be used to retreive or update the saved document: $collection->update({_id => $id}, {'age' => {'$inc' => 1}}); # now Alice is 21 To create a copy of an existing OID, you must set the value attribute in the constructor. For example: my $id1 = MongoDB::OID->new; my $id2 = MongoDB::OID->new(value => $id1->value); Now $id1 and $id2 will have the same value. Warning: at the moment, OID generation is not thread safe. SEE ALSO
Core documentation on object ids: <http://dochub.mongodb.org/core/objectids>. ATTRIBUTES
value The OID value. A random value will be generated if none exists already. It is a 24-character hexidecimal string (12 bytes). Its string representation is the 24-character string. METHODS
to_string my $hex = $oid->to_string; Gets the value of this OID as a 24-digit hexidecimal string. get_time my $date = DateTime->from_epoch(epoch => $id->get_time); Each OID contains a 4 bytes timestamp from when it was created. This method extracts the timestamp. TO_JSON my $json = JSON->new; $json->allow_blessed; $json->convert_blessed; $json->encode(MongoDB::OID->new); Returns a JSON string for this OID. This is compatible with the strict JSON representation used by MongoDB, that is, an OID with the value "012345678901234567890123" will be represented as "{"$oid" : "012345678901234567890123"}". AUTHOR
Kristina Chodorow <kristina@mongodb.org> perl v5.14.2 2011-09-07 MongoDB::OID(3pm)

Check Out this Related Man Page

GSSAPI::OID(3)						User Contributed Perl Documentation					    GSSAPI::OID(3)

NAME
GSSAPI::OID - methods for handling GSSAPI OIDs and some constant OIDs SYNOPSIS
use GSSAPI; #$oid = GSSAPI::OID->new; # rarely needed or wanted $status = GSSAPI::OID->from_str($oid, "{ 1 2 840 113554 1 2 1 1 }"); # # only supported on MIT Kerberos # $status = $oid->to_str($str); # # only supported on MIT Kerberos # $status = $oid->inquire_names($oidset); # Constant OIDs provided: $oid = gss_nt_user_name; $oid = gss_nt_machine_uid_name; $oid = gss_nt_string_uid_name; $oid = gss_nt_service_name; $oid = gss_nt_exported_name; $oid = gss_nt_service_name_v2; $oid = gss_nt_krb5_name; $oid = gss_nt_krb5_principal; $oid = gss_mech_krb5; $oid = gss_mech_krb5_old; $oid = gss_mech_krb5_v2; $oid = gss_mech_spnego; # if your GSSAPI implementation supports # SPNEGO (Heimdal 0.7 for example # you can use mechtype OID::gss_mech_spnego. # # use GSSAPI::indicate_mechs( $oidset ); # to get the of mechtypes your implementation supports $oid = gss_nt_hostbased_service; # GSS_C_NT_HOSTBASED_SERVICE DESCRIPTION
"GSSAPI::OID" objects are used as unique indentifiers/constants for 'mechanisisms' -- the particular protocol and version being used -- and for the encodings used to represent names. In many cases you can request the default mechanism or encoding for the implmentation by using GSS_C_NO_OID. Check the description of the routine in rfc2743 if you're not sure. AUTHOR
maintained by Achim Grolms <perl@grolmsnet.de> originally written by Philip Guenther <pguen@cpan.org> SEE ALSO
perl(1) GSSAPI(3p) GSSAPI::OID::Set(3p) RFC2743 perl v5.18.2 2008-02-02 GSSAPI::OID(3)
Man Page