Skip to content

Commit

Permalink
Merge d69ab7a into 00ffc2a
Browse files Browse the repository at this point in the history
  • Loading branch information
haltcase committed Jun 26, 2019
2 parents 00ffc2a + d69ab7a commit fe96756
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/dialects/oracle/index.js
Expand Up @@ -162,7 +162,7 @@ assign(Client_Oracle.prototype, {
});
},

// Process the response as returned = require(the query.
// Process the response as returned from the query.
processResponse(obj, runner) {
let { response } = obj;
const { method } = obj;
Expand Down
2 changes: 1 addition & 1 deletion src/dialects/oracledb/index.js
Expand Up @@ -365,7 +365,7 @@ function readStream(stream, cb) {
});
}

// Process the response as returned = require(the query.
// Process the response as returned from the query.
Client_Oracledb.prototype.processResponse = function(obj, runner) {
let response = obj.response;
const method = obj.method;
Expand Down
4 changes: 2 additions & 2 deletions src/migrate/Migrator.js
Expand Up @@ -31,12 +31,12 @@ function LockError(msg) {

inherits(LockError, Error);

// The new migration we're performing, typically called = require(the `knex.migrate`
// The new migration we're performing, typically called from the `knex.migrate`
// interface on the main `knex` object. Passes the `knex` instance performing
// the migration.
class Migrator {
constructor(knex) {
// Clone knex instance and remove post-processing that is unnecessary for internal queries = require(a cloned config
// Clone knex instance and remove post-processing that is unnecessary for internal queries from a cloned config
if (isFunction(knex)) {
if (!knex.isTransaction) {
this.knex = knex.withUserParams({
Expand Down
2 changes: 1 addition & 1 deletion src/migrate/migration-list-resolver.js
Expand Up @@ -24,7 +24,7 @@ function listCompleted(tableName, schemaName, trxOrKnex) {
);
}

// Gets the migration list = require(the migration directory specified in config, as well as
// Gets the migration list from the migration directory specified in config, as well as
// the list of completed migrations to check what should be run.
function listAllAndCompleted(config, trxOrKnex) {
return Bluebird.all([
Expand Down
2 changes: 1 addition & 1 deletion src/query/methods.js
@@ -1,5 +1,5 @@
// All properties we can use to start a query chain
// = require(the `knex` object, e.g. `knex.select('*').from(...`
// from the `knex` object, e.g. `knex.select('*').from(...`
module.exports = [
'with',
'withRecursive',
Expand Down
4 changes: 2 additions & 2 deletions src/runner.js
Expand Up @@ -235,7 +235,7 @@ assign(Runner.prototype, {

// Check whether there's a transaction flag, and that it has a connection.
ensureConnection() {
// Use override = require(a builder if passed
// Use override from a builder if passed
if (this.builder._connection) {
return Bluebird.resolve(this.builder._connection);
}
Expand All @@ -253,7 +253,7 @@ assign(Runner.prototype, {
throw error;
})
.disposer(() => {
// need to return promise or null = require(handler to prevent warning = require(bluebird
// need to return promise or null from handler to prevent warning from bluebird
return this.client.releaseConnection(this.connection);
});
},
Expand Down
2 changes: 1 addition & 1 deletion src/schema/tablecompiler.js
Expand Up @@ -149,7 +149,7 @@ TableCompiler.prototype.getColumnTypes = (columns) =>
{ sql: [], bindings: [] }
);

// Adds all of the additional queries = require(the "column"
// Adds all of the additional queries from the "column"
TableCompiler.prototype.columnQueries = function(columns) {
const queries = reduce(
map(columns, tail),
Expand Down
4 changes: 2 additions & 2 deletions src/seed/Seeder.js
Expand Up @@ -15,7 +15,7 @@ const {
extend,
} = require('lodash');

// The new seeds we're performing, typically called = require(the `knex.seed`
// The new seeds we're performing, typically called from the `knex.seed`
// interface on the main `knex` object. Passes the `knex` instance performing
// the seeds.
function Seeder(knex) {
Expand Down Expand Up @@ -62,7 +62,7 @@ Seeder.prototype._listAll = async function(config) {
);
};

// Gets the seed file list = require(the specified seed directory.
// Gets the seed file list from the specified seed directory.
Seeder.prototype._seedData = function() {
return Bluebird.join(this._listAll());
};
Expand Down
2 changes: 1 addition & 1 deletion src/transaction.js
Expand Up @@ -76,7 +76,7 @@ class Transaction extends EventEmitter {
this.executionResolveFn = resolve;
});

// If we've returned a "thenable" = require(the transaction container, assume
// If we've returned a "thenable" from the transaction container, assume
// the rollback and commit are chained to this object's success / failure.
// Directly thrown errors are treated as automatic rollbacks.
let result;
Expand Down
6 changes: 3 additions & 3 deletions src/util/make-knex.js
Expand Up @@ -128,7 +128,7 @@ function _copyEventListeners(eventName, sourceKnex, targetKnex) {
}

function redefineProperties(knex, client) {
// Allow chaining methods = require(the root object, before
// Allow chaining methods from the root object, before
// any other information is specified.
QueryInterface.forEach(function(method) {
knex[method] = function() {
Expand All @@ -145,7 +145,7 @@ function redefineProperties(knex, client) {
set(context) {
knex._context = context;

// Redefine public API for knex instance that would be proxying methods = require(correct context
// Redefine public API for knex instance that would be proxying methods from correct context
knex.raw = context.raw;
knex.batchInsert = context.batchInsert;
knex.transaction = context.transaction;
Expand Down Expand Up @@ -221,7 +221,7 @@ function redefineProperties(knex, client) {
knex[key] = ee[key];
}

// Unfortunately, something seems to be broken in Node 6 and removing events = require(a clone also mutates original Knex,
// Unfortunately, something seems to be broken in Node 6 and removing events from a clone also mutates original Knex,
// which is highly undesireable
if (knex._internalListeners) {
knex._internalListeners.forEach(({ eventName, listener }) => {
Expand Down

0 comments on commit fe96756

Please sign in to comment.