_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c172200
validation
// Snapshot creates a new ZFS snapshot of the receiving dataset, using the // specified name. Optionally, the snapshot can be taken recursively, creating // snapshots of all descendent filesystems in a single, atomic operation.
{ "resource": "" }
c172201
validation
// Rollback rolls back the receiving ZFS dataset to a previous snapshot. // Optionally, intermediate snapshots can be destroyed. A ZFS snapshot // rollback cannot be completed without this option, if more recent // snapshots exist. // An error will be returned if the input dataset is not of snapshot type.
{ "resource": "" }
c172202
validation
// Children returns a slice of children of the receiving ZFS dataset. // A recursion depth may be specified, or a depth of 0 allows unlimited // recursion.
{ "resource": "" }
c172203
validation
// Diff returns changes between a snapshot and the given ZFS dataset. // The snapshot name must include the filesystem part as it is possible to // compare clones with their origin snapshots.
{ "resource": "" }
c172204
validation
// msb32 returns the number of bits required to store the value x
{ "resource": "" }
c172205
validation
// msb64 returns the number of bits required to store the value x
{ "resource": "" }
c172206
validation
// EncodeAll returns a packed slice of the values from src. It a value is over // 1 << 28, an error is returned.
{ "resource": "" }
c172207
validation
// DecodeAll returns the uncompressed values from in
{ "resource": "" }
c172208
validation
// returns true if the next n values in in can be packed using bits bits // per value.
{ "resource": "" }
c172209
validation
// pack28 packs 28 values from in using 1 bit each
{ "resource": "" }
c172210
validation
// pack14 packs 14 values from in using 2 bits each
{ "resource": "" }
c172211
validation
// pack9 packs 9 values from in using 3 bits each
{ "resource": "" }
c172212
validation
// pack7 packs 7 values from in using 4 bits each
{ "resource": "" }
c172213
validation
// Decode writes the uncompressed values from src to dst. It returns the number // of values written or an error.
{ "resource": "" }
c172214
validation
// Out returns the data to be sent to the server in the current step.
{ "resource": "" }
c172215
validation
// Step processes the incoming data from the server and makes the // next round of data for the server available via Client.Out. // Step returns false if there are no errors and more data is // still expected.
{ "resource": "" }
c172216
validation
// ParseURL parses a MongoDB URL as accepted by the Dial function and returns // a value suitable for providing into DialWithInfo. // // See Dial for more details on the format of url.
{ "resource": "" }
c172217
validation
// LiveServers returns a list of server addresses which are // currently known to be alive.
{ "resource": "" }
c172218
validation
// DB returns a value representing the named database. If name // is empty, the database name provided in the dialed URL is // used instead. If that is also empty, "test" is used as a // fallback in a way equivalent to the mongo shell. // // Creating this value is a very lightweight operation, and // involves no networ...
{ "resource": "" }
c172219
validation
// C returns a value representing the named collection. // // Creating this value is a very lightweight operation, and // involves no network communication.
{ "resource": "" }
c172220
validation
// With returns a copy of db that uses session s.
{ "resource": "" }
c172221
validation
// With returns a copy of c that uses session s.
{ "resource": "" }
c172222
validation
// Logout removes any established authentication credentials for the database.
{ "resource": "" }
c172223
validation
// LogoutAll removes all established authentication credentials for the session.
{ "resource": "" }
c172224
validation
// New creates a new session with the same parameters as the original // session, including consistency, batch size, prefetching, safety mode, // etc. The returned session will use sockets from the pool, so there's // a chance that writes just performed in another session may not yet // be visible. // // Login informat...
{ "resource": "" }
c172225
validation
// Copy works just like New, but preserves the exact authentication // information from the original session.
{ "resource": "" }
c172226
validation
// Close terminates the session. It's a runtime error to use a session // after it has been closed.
{ "resource": "" }
c172227
validation
// Refresh puts back any reserved sockets in use and restarts the consistency // guarantees according to the current consistency setting for the session.
{ "resource": "" }
c172228
validation
// SetSyncTimeout sets the amount of time an operation with this session // will wait before returning an error in case a connection to a usable // server can't be established. Set it to zero to wait forever. The // default value is 7 seconds.
{ "resource": "" }
c172229
validation
// SetSocketTimeout sets the amount of time to wait for a non-responding // socket to the database before it is forcefully closed.
{ "resource": "" }
c172230
validation
// SetCursorTimeout changes the standard timeout period that the server // enforces on created cursors. The only supported value right now is // 0, which disables the timeout. The standard server timeout is 10 minutes.
{ "resource": "" }
c172231
validation
// SetPoolLimit sets the maximum number of sockets in use in a single server // before this session will block waiting for a socket to be available. // The default limit is 4096. // // This limit must be set to cover more than any expected workload of the // application. It is a bad practice and an unsupported use case...
{ "resource": "" }
c172232
validation
// Safe returns the current safety mode for the session.
{ "resource": "" }
c172233
validation
// Fsync flushes in-memory writes to disk on the server the session // is established with. If async is true, the call returns immediately, // otherwise it returns after the flush has been made.
{ "resource": "" }
c172234
validation
// FsyncUnlock releases the server for writes. See FsyncLock for details.
{ "resource": "" }
c172235
validation
// Repair returns an iterator that goes over all recovered documents in the // collection, in a best-effort manner. This is most useful when there are // damaged data files. Multiple copies of the same document may be returned // by the iterator. // // Repair is supported in MongoDB 2.7.8 and later.
{ "resource": "" }
c172236
validation
// One executes the pipeline and unmarshals the first item from the // result set into the result parameter. // It returns ErrNotFound if no items are generated by the pipeline.
{ "resource": "" }
c172237
validation
// Batch sets the batch size used when fetching documents from the database. // It's possible to change this setting on a per-session basis as well, using // the Batch method of Session. // // The default batch size is defined by the database server.
{ "resource": "" }
c172238
validation
// DropCollection removes the entire collection including all of its documents.
{ "resource": "" }
c172239
validation
// Skip skips over the n initial documents from the query results. Note that // this only makes sense with capped collections where documents are naturally // ordered by insertion time, or with sorted results.
{ "resource": "" }
c172240
validation
// Limit restricts the maximum number of documents retrieved to n, and also // changes the batch size to the same value. Once n documents have been // returned by Next, the following call will return ErrNotFound.
{ "resource": "" }
c172241
validation
// SetMaxScan constrains the query to stop after scanning the specified // number of documents. // // This modifier is generally used to prevent potentially long running // queries from disrupting performance by scanning through too much data.
{ "resource": "" }
c172242
validation
// LogReplay enables an option that optimizes queries that are typically // made on the MongoDB oplog for replaying it. This is an internal // implementation aspect and most likely uninteresting for other uses. // It has seen at least one use case, though, so it's exposed via the API.
{ "resource": "" }
c172243
validation
// CollectionNames returns the collection names present in the db database.
{ "resource": "" }
c172244
validation
// DatabaseNames returns the names of non-empty databases present in the cluster.
{ "resource": "" }
c172245
validation
// Timeout returns true if Next returned false due to a timeout of // a tailable cursor. In those cases, Next may be called again to continue // the iteration at the previous cursor position.
{ "resource": "" }
c172246
validation
// Count returns the total number of documents in the result set.
{ "resource": "" }
c172247
validation
// Count returns the total number of documents in the collection.
{ "resource": "" }
c172248
validation
// VersionAtLeast returns whether the BuildInfo version is greater than or // equal to the provided version number. If more than one number is // provided, numbers will be considered as major, minor, and so on.
{ "resource": "" }
c172249
validation
// BuildInfo retrieves the version and other details about the // running MongoDB server.
{ "resource": "" }
c172250
validation
// setSocket binds socket to this section.
{ "resource": "" }
c172251
validation
// Acquire increases the reference count for the cluster.
{ "resource": "" }
c172252
validation
// Release decreases the reference count for the cluster. Once // it reaches zero, all servers will be closed.
{ "resource": "" }
c172253
validation
// syncServersLoop loops while the cluster is alive to keep its idea of // the server topology up-to-date. It must be called just once from // newCluster. The loop iterates once syncServersDelay has passed, or // if somebody injects a value into the cluster.sync channel to force a // synchronization. A loop iteration...
{ "resource": "" }
c172254
validation
// Close forces closing all sockets that are alive, whether // they're currently in use or not.
{ "resource": "" }
c172255
validation
// RecycleSocket puts socket back into the unused cache.
{ "resource": "" }
c172256
validation
// AbendSocket notifies the server that the given socket has terminated // abnormally, and thus should be discarded rather than cached.
{ "resource": "" }
c172257
validation
// BestFit returns the best guess of what would be the most interesting // server to perform operations on at this point in time.
{ "resource": "" }
c172258
validation
// Add assigns the name to the template
{ "resource": "" }
c172259
validation
// Instance implements gin's HTML render interface
{ "resource": "" }
c172260
validation
// loadTemplate parses the specified template and returns it
{ "resource": "" }
c172261
validation
// New returns a fresh instance of Render
{ "resource": "" }
c172262
validation
// Create goes through the `TemplatesDir` creating the template structure // for rendering. Returns the Render instance.
{ "resource": "" }
c172263
validation
// Validate checks if the directory and the layout files exist as expected // and configured
{ "resource": "" }
c172264
validation
// tokenFor returns a unique transaction token that // is composed by t's id and a nonce. If t already has // a nonce assigned to it, it will be used, otherwise // a new nonce will be generated.
{ "resource": "" }
c172265
validation
// NewRunner returns a new transaction runner that uses tc to hold its // transactions. // // Multiple transaction collections may exist in a single database, but // all collections that are touched by operations in a given transaction // collection must be handled exclusively by it. // // A second collection with the ...
{ "resource": "" }
c172266
validation
// Run creates a new transaction with ops and runs it immediately. // The id parameter specifies the transaction id, and may be written // down ahead of time to later verify the success of the change and // resume it, when the procedure is interrupted for any reason. If // empty, a random id will be generated. // The i...
{ "resource": "" }
c172267
validation
// ResumeAll resumes all pending transactions. All ErrAborted errors // from individual transactions are ignored.
{ "resource": "" }
c172268
validation
// Resume resumes the transaction with id. It returns mgo.ErrNotFound // if the transaction is not found. Otherwise, it has the same semantics // of the Run method after the transaction is inserted.
{ "resource": "" }
c172269
validation
// SetChaos sets the failure injection parameters to c.
{ "resource": "" }
c172270
validation
// Connect middleware clones the database session for each request and // makes the `db` object available for each handler
{ "resource": "" }
c172271
validation
// ErrorHandler is a middleware to handle errors encountered during requests
{ "resource": "" }
c172272
validation
// assert verifies that all assertions in t match the content that t // will be applied upon. If an assertion fails, the transaction state // is changed to aborted.
{ "resource": "" }
c172273
validation
// Server returns the server that the socket is associated with. // It returns nil while the socket is cached in its respective server.
{ "resource": "" }
c172274
validation
// ServerInfo returns details for the server at the time the socket // was initially acquired.
{ "resource": "" }
c172275
validation
// InitialAcquire obtains the first reference to the socket, either // right after the connection is made or once a recycled socket is // being put back in use.
{ "resource": "" }
c172276
validation
// Acquire obtains an additional reference to the socket. // The socket will only be recycled when it's released as many // times as it's been acquired.
{ "resource": "" }
c172277
validation
// Release decrements a socket reference. The socket will be // recycled once its released as many times as it's been acquired.
{ "resource": "" }
c172278
validation
// SetTimeout changes the timeout used on socket operations.
{ "resource": "" }
c172279
validation
// This is intended for use in development + debugging and not intended to be a production error message. // it also allows FieldError to be used as an Error interface
{ "resource": "" }
c172280
validation
// This is intended for use in development + debugging and not intended to be a production error message. // it also allows StructErrors to be used as an Error interface
{ "resource": "" }
c172281
validation
// New creates a new Validate instance for use.
{ "resource": "" }
c172282
validation
// Field allows validation of a single field, still using tag style validation to check multiple errors
{ "resource": "" }
c172283
validation
// FieldWithValue allows validation of a single field, possibly even against another fields value, still using tag style validation to check multiple errors
{ "resource": "" }
c172284
validation
// Create an article
{ "resource": "" }
c172285
validation
// Edit an article
{ "resource": "" }
c172286
validation
// List all articles
{ "resource": "" }
c172287
validation
// Update an article
{ "resource": "" }
c172288
validation
// Delete an article
{ "resource": "" }
c172289
validation
// ObjectIdHex returns an ObjectId from the provided hex representation. // Calling this function with an invalid hex representation will // cause a runtime panic. See the IsObjectIdHex function.
{ "resource": "" }
c172290
validation
// IsObjectIdHex returns whether s is a valid hex representation of // an ObjectId. See the ObjectIdHex function.
{ "resource": "" }
c172291
validation
// NewObjectId returns a new unique ObjectId.
{ "resource": "" }
c172292
validation
// NewObjectIdWithTime returns a dummy ObjectId with the timestamp part filled // with the provided number of seconds from epoch UTC, and all other parts // filled with zeroes. It's not safe to insert a document with an id generated // by this method, it is useful only for queries to find documents with ids // generate...
{ "resource": "" }
c172293
validation
// MarshalJSON turns a bson.ObjectId into a json.Marshaller.
{ "resource": "" }
c172294
validation
// byteSlice returns byte slice of id from start to end. // Calling this function with an invalid id will cause a runtime panic.
{ "resource": "" }
c172295
validation
// Run runs all the operations queued up.
{ "resource": "" }
c172296
validation
// min tests whether a variable value is larger or equal to a given // number. For number types, it's a simple lesser-than test; for // strings it tests the number of characters whereas for maps // and slices it tests the number of items.
{ "resource": "" }
c172297
validation
// max tests whether a variable value is lesser than a given // value. For numbers, it's a simple lesser-than test; for // strings it tests the number of characters whereas for maps // and slices it tests the number of items.
{ "resource": "" }
c172298
validation
// Connect connects to mongodb
{ "resource": "" }
c172299
validation
// Enable the delivery of debug messages to the logger. Only meaningful // if a logger is also set.
{ "resource": "" }