Skip to content

Commit e82d2d4

Browse files
author
Lars-Erik Roald
committed
mssql performance
1 parent bc9c81b commit e82d2d4

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/table/relatedTable/aggregate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
let tryGetSessionContext = require('../tryGetSessionContext');
2-
31
function newAggregate(_relations) {
42

53
function aggregate(context, fn) {
6-
const includeMany = tryGetSessionContext(context)?.engine === 'mssql';
4+
//todo
5+
// const includeMany = tryGetSessionContext(context)?.engine === 'mssql';
6+
const includeMany = false;
77
let { relations, alias } = extract(includeMany, _relations);
88
const table = relations[relations.length - 1].childTable;
99
if (!relations[0].isMany || includeMany)

src/table/relatedTable/where.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ let tryGetSessionContext = require('../tryGetSessionContext');
44
function newWhere(_relations, _depth) {
55

66
function where(context, fn) {
7-
const includeMany = tryGetSessionContext(context)?.engine === 'mssql';
7+
// const includeMany = tryGetSessionContext(context)?.engine === 'mssql';
8+
const includeMany = false;
89
let { relations, alias } = extract(includeMany, _relations);
910
const table = relations[relations.length - 1].childTable;
1011
if (!relations[0].isMany || includeMany)

src/tedious/newTransaction.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ var deleteFromSql = require('./deleteFromSql');
44
var selectForUpdateSql = require('./selectForUpdateSql');
55
const limitAndOffset = require('./limitAndOffset');
66
const insertSql = require('./insertSql');
7-
const getManyDto = require('./getManyDto');
87
const formatDateOut = require('./formatDateOut');
98
const formatBigintOut = require('./formatBigintOut');
109
const formatJSONOut = require('./formatJSONOut');
@@ -18,7 +17,6 @@ function newResolveTransaction(domain, pool, { readonly = false } = {}) {
1817
rdb.pool = pool;
1918
}
2019
rdb.engine = 'mssql';
21-
rdb.getManyDto = getManyDto;
2220
rdb.encodeBoolean = encodeBoolean;
2321
rdb.decodeJSON = decodeJSON;
2422
rdb.encodeJSON = JSON.stringify;

0 commit comments

Comments
 (0)