diff options
author | clang-format-7.0.1 <adam.martin@10gen.com> | 2019-07-26 18:20:35 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-07-27 11:02:23 -0400 |
commit | 134a4083953270e8a11430395357fb70a29047ad (patch) | |
tree | dd428e1230e31d92b20b393dfdc17ffe7fa79cb6 /src/mongo/shell/session.js | |
parent | 1e46b5049003f427047e723ea5fab15b5a9253ca (diff) | |
download | mongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz |
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'src/mongo/shell/session.js')
-rw-r--r-- | src/mongo/shell/session.js | 110 |
1 files changed, 57 insertions, 53 deletions
diff --git a/src/mongo/shell/session.js b/src/mongo/shell/session.js index 0313f46fc0e..0f6eb11323a 100644 --- a/src/mongo/shell/session.js +++ b/src/mongo/shell/session.js @@ -5,7 +5,11 @@ * https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst#abstract */ var { - DriverSession, SessionOptions, _DummyDriverSession, _DelegatingDriverSession, _ServerSession, + DriverSession, + SessionOptions, + _DummyDriverSession, + _DelegatingDriverSession, + _ServerSession, } = (function() { "use strict"; @@ -416,10 +420,10 @@ var { if (writeError !== undefined) { if (jsTest.options().logRetryAttempts) { - jsTest.log("Retrying " + cmdName + - " due to retryable write error (code=" + - writeError.code + "), subsequent retries remaining: " + - numRetries); + jsTest.log( + "Retrying " + cmdName + + " due to retryable write error (code=" + writeError.code + + "), subsequent retries remaining: " + numRetries); } if (client.isReplicaSetConnection()) { client._markNodeAsFailed( @@ -1035,54 +1039,54 @@ var { const DummyDriverSession = makeDriverSessionConstructor( // Force clang-format to break this line. { - createServerSession: function createServerSession(client) { - return { - injectSessionId: function injectSessionId(cmdObj) { - return cmdObj; - }, - - assignTransactionNumber: function assignTransactionNumber(cmdObj) { - return cmdObj; - }, - - canRetryWrites: function canRetryWrites(cmdObj) { - return false; - }, - - assignTxnInfo: function assignTxnInfo(cmdObj) { - return cmdObj; - }, - - isTxnActive: function isTxnActive() { - return false; - }, - - isFirstStatement: function isFirstStatement() { - return false; - }, - - getTxnOptions: function getTxnOptions() { - return {}; - }, - - startTransaction: function startTransaction() { - throw new Error("Must call startSession() on the Mongo connection " + - "object before starting a transaction."); - }, - - commitTransaction: function commitTransaction() { - throw new Error("Must call startSession() on the Mongo connection " + - "object before committing a transaction."); - }, - - abortTransaction: function abortTransaction() { - throw new Error("Must call startSession() on the Mongo connection " + - "object before aborting a transaction."); - }, - }; - }, - - endSession: function endSession(serverSession) {}, + createServerSession: function createServerSession(client) { + return { + injectSessionId: function injectSessionId(cmdObj) { + return cmdObj; + }, + + assignTransactionNumber: function assignTransactionNumber(cmdObj) { + return cmdObj; + }, + + canRetryWrites: function canRetryWrites(cmdObj) { + return false; + }, + + assignTxnInfo: function assignTxnInfo(cmdObj) { + return cmdObj; + }, + + isTxnActive: function isTxnActive() { + return false; + }, + + isFirstStatement: function isFirstStatement() { + return false; + }, + + getTxnOptions: function getTxnOptions() { + return {}; + }, + + startTransaction: function startTransaction() { + throw new Error("Must call startSession() on the Mongo connection " + + "object before starting a transaction."); + }, + + commitTransaction: function commitTransaction() { + throw new Error("Must call startSession() on the Mongo connection " + + "object before committing a transaction."); + }, + + abortTransaction: function abortTransaction() { + throw new Error("Must call startSession() on the Mongo connection " + + "object before aborting a transaction."); + }, + }; + }, + + endSession: function endSession(serverSession) {}, }, {causalConsistency: false, retryWrites: false}); |