Commit iniziale
This commit is contained in:
21
node_modules/tedious/LICENSE
generated
vendored
Normal file
21
node_modules/tedious/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2018 Mike D Pilsbury
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
67
node_modules/tedious/README.md
generated
vendored
Normal file
67
node_modules/tedious/README.md
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
# Tedious (node implementation of TDS)
|
||||
[](https://david-dm.org/tediousjs/tedious) [](http://badge.fury.io/js/tedious) [](http://travis-ci.org/tediousjs/tedious) [](https://ci.appveyor.com/project/tediousjs/tedious) [](https://tediousjs-slack.herokuapp.com/)[](https://codecov.io/gh/tediousjs/tedious)
|
||||
|
||||
|
||||
Tedious is a pure-Javascript implementation of the [TDS protocol](http://msdn.microsoft.com/en-us/library/dd304523.aspx),
|
||||
which is used to interact with instances of Microsoft's SQL Server. It is intended to be a fairly slim implementation of the protocol, with not too much additional functionality.
|
||||
|
||||
**NOTE: New columns are nullable by default as of version 1.11.0**
|
||||
|
||||
Previous behavior can be restored using `config.options.enableAnsiNullDefault = false`. See [pull request 230](https://github.com/tediousjs/tedious/pull/230).
|
||||
|
||||
**NOTE: Default login behavior has changed slightly as of version 1.2**
|
||||
|
||||
See the [changelog](https://github.com/tediousjs/tedious/releases) for version history.
|
||||
|
||||
|
||||
### Supported TDS versions
|
||||
|
||||
- TDS 7.4 (SQL Server 2012/2014/2016/2017/2019/2022)
|
||||
- TDS 7.3.B (SQL Server 2008 R2)
|
||||
- TDS 7.3.A (SQL Server 2008)
|
||||
- TDS 7.2 (SQL Server 2005)
|
||||
- TDS 7.1 (SQL Server 2000)
|
||||
|
||||
## Installation
|
||||
|
||||
Node.js is a prerequisite for installing tedious. Once you have installed [Node.js](https://nodejs.org/), installing tedious is simple:
|
||||
|
||||
npm install tedious
|
||||
|
||||
## Getting Started
|
||||
- [Node.js + macOS](https://www.microsoft.com/en-us/sql-server/developer-get-started/node/mac/)
|
||||
- [Node.js + Red Hat Enterprise Linux](https://www.microsoft.com/en-us/sql-server/developer-get-started/node/rhel/)
|
||||
- [Node.js + SUSE Linux Enterprise Server](https://www.microsoft.com/en-us/sql-server/developer-get-started/node/sles/)
|
||||
- [Node.js + Ubuntu](https://www.microsoft.com/en-us/sql-server/developer-get-started/node/ubuntu/)
|
||||
- [Node.js + Windows](https://www.microsoft.com/en-us/sql-server/developer-get-started/node/windows/)
|
||||
|
||||
<a name="documentation"></a>
|
||||
## Documentation
|
||||
More documentation and code samples are available at [tediousjs.github.io/tedious/](http://tediousjs.github.io/tedious/)
|
||||
|
||||
<a name="name"></a>
|
||||
## Name
|
||||
_Tedious_ is simply derived from a fast, slightly garbled, pronunciation of the letters T, D and S.
|
||||
|
||||
## Developer Survey
|
||||
|
||||
We'd like to learn more about how you use tedious:
|
||||
|
||||
<a href="https://aka.ms/mssqltedioussurvey"><img style="float: right;" height="67" width="156" src="https://sqlchoice.blob.core.windows.net/sqlchoice/static/images/survey.png"></a>
|
||||
|
||||
<a name="contributing"></a>
|
||||
## Contributing
|
||||
We welcome contributions from the community. Feel free to checkout the code and submit pull requests.
|
||||
|
||||
<a name="license"></a>
|
||||
## License
|
||||
|
||||
Copyright (c) 2010-2021 Mike D Pilsbury
|
||||
|
||||
The MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
67
node_modules/tedious/appveyor.yml
generated
vendored
Normal file
67
node_modules/tedious/appveyor.yml
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
version: "{build}"
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- nodejs_version: "18"
|
||||
- nodejs_version: "20"
|
||||
- nodejs_version: "21"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- /^maint\/.+/
|
||||
- /v\d+\.\d+\.\d+/
|
||||
|
||||
install:
|
||||
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
|
||||
- npm install
|
||||
|
||||
services:
|
||||
- mssql2017
|
||||
|
||||
cache:
|
||||
- node_modules
|
||||
|
||||
build: off
|
||||
|
||||
before_test:
|
||||
- npm prune
|
||||
|
||||
- sc config sqlbrowser start= auto
|
||||
- net start sqlbrowser
|
||||
|
||||
test_script:
|
||||
- node --version
|
||||
- npm --version
|
||||
|
||||
- pwsh: |-
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
npm run-script test
|
||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||
|
||||
Copy-Item -Force test/config.appveyor.ts test/config.ts
|
||||
|
||||
$env:NTLM_USERNAME = $env:USERNAME
|
||||
$env:NTLM_PASSWORD = [Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword", '')
|
||||
$env:NTLM_DOMAIN = $env:COMPUTERNAME
|
||||
|
||||
$env:TEDIOUS_TDS_VERSION = '7_4'
|
||||
npm run-script test-integration
|
||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||
|
||||
$env:TEDIOUS_TDS_VERSION = '7_3_B'
|
||||
npm run-script test-integration
|
||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||
|
||||
$env:TEDIOUS_TDS_VERSION = '7_3_A'
|
||||
npm run-script test-integration
|
||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||
|
||||
$env:TEDIOUS_TDS_VERSION = '7_2'
|
||||
npm run-script test-integration
|
||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||
|
||||
$env:TEDIOUS_TDS_VERSION = '7_1'
|
||||
npm run-script test-integration
|
||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||
12
node_modules/tedious/benchmarks/README.md
generated
vendored
Normal file
12
node_modules/tedious/benchmarks/README.md
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# Tedious Benchmarks
|
||||
|
||||
This folder contains a collection of benchmarks for `tedious`.
|
||||
|
||||
Running an existing benchmark is easy, simply execute the benchmark file with `node`:
|
||||
|
||||
```sh
|
||||
node benchmarks/query/select-many-rows.js
|
||||
```
|
||||
|
||||
**NOTE:** The benchmarks try to load `tedious` code from `lib`, so make sure
|
||||
you run `npm run prepublish` first.
|
||||
61
node_modules/tedious/benchmarks/bulk-load/iterable.js
generated
vendored
Normal file
61
node_modules/tedious/benchmarks/bulk-load/iterable.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
// @ts-check
|
||||
|
||||
const { createBenchmark, createConnection } = require('../common');
|
||||
|
||||
const { Request, TYPES } = require('tedious');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100],
|
||||
size: [
|
||||
10,
|
||||
100,
|
||||
1000,
|
||||
10000
|
||||
]
|
||||
});
|
||||
|
||||
function main({ n, size }) {
|
||||
createConnection((connection) => {
|
||||
const request = new Request(`
|
||||
CREATE TABLE "#tmpTestTable" (
|
||||
"id" int NOT NULL
|
||||
)
|
||||
`, (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
|
||||
bench.start();
|
||||
|
||||
(function cb() {
|
||||
const bulkLoad = connection.newBulkLoad('#tmpTestTable', (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (i++ === n) {
|
||||
bench.end(n);
|
||||
|
||||
connection.close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
cb();
|
||||
});
|
||||
|
||||
bulkLoad.addColumn('id', TYPES.Int, { nullable: false });
|
||||
|
||||
const rows = [];
|
||||
for (let j = 0; j < size; j++) {
|
||||
rows.push([ j ]);
|
||||
}
|
||||
connection.execBulkLoad(bulkLoad, rows);
|
||||
})();
|
||||
});
|
||||
|
||||
connection.execSqlBatch(request);
|
||||
});
|
||||
}
|
||||
287
node_modules/tedious/benchmarks/common.js
generated
vendored
Normal file
287
node_modules/tedious/benchmarks/common.js
generated
vendored
Normal file
@@ -0,0 +1,287 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const child_process = require('child_process');
|
||||
|
||||
const {
|
||||
PerformanceObserver,
|
||||
constants: {
|
||||
NODE_PERFORMANCE_GC_INCREMENTAL,
|
||||
NODE_PERFORMANCE_GC_MAJOR,
|
||||
NODE_PERFORMANCE_GC_MINOR
|
||||
}
|
||||
} = require('perf_hooks');
|
||||
|
||||
const { Connection } = require('tedious');
|
||||
|
||||
// The `Benchmark` class is taken from Node.js - see
|
||||
// https://github.com/nodejs/node/blob/0f96dc266fd0cd8c1baa82ce7eb951c11b29a331/benchmark/common.js
|
||||
// Copyright Node.js contributors. All rights reserved.
|
||||
function Benchmark(fn, configs, options) {
|
||||
// Use the file name as the name of the benchmark
|
||||
this.name = require.main.filename.slice(__dirname.length + 1);
|
||||
// Parse job-specific configuration from the command line arguments
|
||||
const parsed_args = this._parseArgs(process.argv.slice(2), configs);
|
||||
this.options = parsed_args.cli;
|
||||
this.extra_options = parsed_args.extra;
|
||||
// The configuration list as a queue of jobs
|
||||
this.queue = this._queue(this.options);
|
||||
// The configuration of the current job, head of the queue
|
||||
this.config = this.queue[0];
|
||||
// Execution arguments i.e. flags used to run the jobs
|
||||
this.flags = [];
|
||||
if (options && options.flags) {
|
||||
this.flags = this.flags.concat(options.flags);
|
||||
}
|
||||
if (process.env.NODE_BENCHMARK_FLAGS) {
|
||||
const flags = process.env.NODE_BENCHMARK_FLAGS.split(/\s+/);
|
||||
this.flags = this.flags.concat(flags);
|
||||
}
|
||||
// Holds process.hrtime value
|
||||
this._time = [0, 0];
|
||||
// Used to make sure a benchmark only start a timer once
|
||||
this._started = false;
|
||||
|
||||
this._gcStats = {
|
||||
[NODE_PERFORMANCE_GC_INCREMENTAL]: {
|
||||
count: 0,
|
||||
totalDuration: 0
|
||||
},
|
||||
[NODE_PERFORMANCE_GC_MINOR]: {
|
||||
count: 0,
|
||||
totalDuration: 0
|
||||
},
|
||||
[NODE_PERFORMANCE_GC_MAJOR]: {
|
||||
count: 0,
|
||||
totalDuration: 0
|
||||
}
|
||||
};
|
||||
|
||||
this._observer = new PerformanceObserver((list) => {
|
||||
const entries = list.getEntries();
|
||||
const length = entries.length;
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
const entry = entries[i];
|
||||
const stats = this._gcStats[entry.detail.kind];
|
||||
|
||||
if (stats) {
|
||||
stats.count += 1;
|
||||
stats.totalDuration += entry.duration;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// this._run will use fork() to create a new process for each configuration
|
||||
// combination.
|
||||
if (process.env.hasOwnProperty('NODE_RUN_BENCHMARK_FN')) {
|
||||
process.nextTick(() => fn(this.config));
|
||||
} else {
|
||||
process.nextTick(() => this._run());
|
||||
}
|
||||
}
|
||||
|
||||
Benchmark.prototype._parseArgs = function(argv, configs) {
|
||||
const cliOptions = {};
|
||||
const extraOptions = {};
|
||||
const validArgRE = /^(.+?)=([\s\S]*)$/;
|
||||
// Parse configuration arguments
|
||||
for (const arg of argv) {
|
||||
const match = arg.match(validArgRE);
|
||||
if (!match) {
|
||||
console.error(`bad argument: ${arg}`);
|
||||
process.exit(1);
|
||||
}
|
||||
const config = match[1];
|
||||
|
||||
if (configs[config]) {
|
||||
// Infer the type from the config object and parse accordingly
|
||||
const isNumber = typeof configs[config][0] === 'number';
|
||||
const value = isNumber ? +match[2] : match[2];
|
||||
if (!cliOptions[config])
|
||||
cliOptions[config] = [];
|
||||
cliOptions[config].push(value);
|
||||
} else {
|
||||
extraOptions[config] = match[2];
|
||||
}
|
||||
}
|
||||
return { cli: Object.assign({}, configs, cliOptions), extra: extraOptions };
|
||||
};
|
||||
|
||||
Benchmark.prototype._queue = function(options) {
|
||||
const queue = [];
|
||||
const keys = Object.keys(options);
|
||||
|
||||
// Perform a depth-first walk though all options to generate a
|
||||
// configuration list that contains all combinations.
|
||||
function recursive(keyIndex, prevConfig) {
|
||||
const key = keys[keyIndex];
|
||||
const values = options[key];
|
||||
const type = typeof values[0];
|
||||
|
||||
for (const value of values) {
|
||||
if (typeof value !== 'number' && typeof value !== 'string') {
|
||||
throw new TypeError(`configuration "${key}" had type ${typeof value}`);
|
||||
}
|
||||
if (typeof value !== type) {
|
||||
// This is a requirement for being able to consistently and predictably
|
||||
// parse CLI provided configuration values.
|
||||
throw new TypeError(`configuration "${key}" has mixed types`);
|
||||
}
|
||||
|
||||
const currConfig = Object.assign({ [key]: value }, prevConfig);
|
||||
|
||||
if (keyIndex + 1 < keys.length) {
|
||||
recursive(keyIndex + 1, currConfig);
|
||||
} else {
|
||||
queue.push(currConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (keys.length > 0) {
|
||||
recursive(0, {});
|
||||
} else {
|
||||
queue.push({});
|
||||
}
|
||||
|
||||
return queue;
|
||||
};
|
||||
|
||||
Benchmark.prototype._run = function() {
|
||||
const self = this;
|
||||
// If forked, report to the parent.
|
||||
if (process.send) {
|
||||
process.send({
|
||||
type: 'config',
|
||||
name: this.name,
|
||||
queueLength: this.queue.length,
|
||||
});
|
||||
}
|
||||
|
||||
(function recursive(queueIndex) {
|
||||
const config = self.queue[queueIndex];
|
||||
|
||||
// Set NODE_RUN_BENCHMARK_FN to indicate that the child shouldn't construct
|
||||
// a configuration queue, but just execute the benchmark function.
|
||||
const childEnv = Object.assign({}, process.env);
|
||||
childEnv.NODE_RUN_BENCHMARK_FN = '';
|
||||
|
||||
// Create configuration arguments
|
||||
const childArgs = [];
|
||||
for (const key of Object.keys(config)) {
|
||||
childArgs.push(`${key}=${config[key]}`);
|
||||
}
|
||||
for (const key of Object.keys(self.extra_options)) {
|
||||
childArgs.push(`${key}=${self.extra_options[key]}`);
|
||||
}
|
||||
|
||||
const child = child_process.fork(require.main.filename, childArgs, {
|
||||
env: childEnv,
|
||||
execArgv: self.flags.concat(process.execArgv),
|
||||
});
|
||||
child.on('message', sendResult);
|
||||
child.on('close', (code) => {
|
||||
if (code) {
|
||||
process.exit(code);
|
||||
}
|
||||
|
||||
if (queueIndex + 1 < self.queue.length) {
|
||||
recursive(queueIndex + 1);
|
||||
}
|
||||
});
|
||||
})(0);
|
||||
};
|
||||
|
||||
Benchmark.prototype.start = function() {
|
||||
if (this._started) {
|
||||
throw new Error('Called start more than once in a single benchmark');
|
||||
}
|
||||
this._started = true;
|
||||
this._observer.observe({ entryTypes: ['gc'], buffered: false });
|
||||
|
||||
this._time = process.hrtime();
|
||||
};
|
||||
|
||||
Benchmark.prototype.end = function(operations) {
|
||||
// Get elapsed time now and do error checking later for accuracy.
|
||||
const elapsed = process.hrtime(this._time);
|
||||
|
||||
if (!this._started) {
|
||||
throw new Error('called end without start');
|
||||
}
|
||||
if (typeof operations !== 'number') {
|
||||
throw new Error('called end() without specifying operation count');
|
||||
}
|
||||
if (!process.env.NODEJS_BENCHMARK_ZERO_ALLOWED && operations <= 0) {
|
||||
throw new Error('called end() with operation count <= 0');
|
||||
}
|
||||
if (elapsed[0] === 0 && elapsed[1] === 0) {
|
||||
if (!process.env.NODEJS_BENCHMARK_ZERO_ALLOWED)
|
||||
throw new Error('insufficient clock precision for short benchmark');
|
||||
// Avoid dividing by zero
|
||||
elapsed[1] = 1;
|
||||
}
|
||||
|
||||
this._observer.disconnect();
|
||||
|
||||
const time = elapsed[0] + elapsed[1] / 1e9;
|
||||
const rate = operations / time;
|
||||
this.report(rate, elapsed);
|
||||
};
|
||||
|
||||
function formatResult(data) {
|
||||
// Construct configuration string, " A=a, B=b, ..."
|
||||
let conf = '';
|
||||
for (const key of Object.keys(data.conf)) {
|
||||
conf += ` ${key}=${JSON.stringify(data.conf[key])}`;
|
||||
}
|
||||
|
||||
var rate = data.rate.toString().split('.');
|
||||
rate[0] = rate[0].replace(/(\d)(?=(?:\d\d\d)+(?!\d))/g, '$1,');
|
||||
rate = (rate[1] ? rate.join('.') : rate[0]);
|
||||
|
||||
var gcInfo;
|
||||
gcInfo = `(minor: ${data.gcStats[NODE_PERFORMANCE_GC_MINOR].count} - ${data.gcStats[NODE_PERFORMANCE_GC_MINOR].totalDuration}ms,`;
|
||||
gcInfo += ` major: ${data.gcStats[NODE_PERFORMANCE_GC_MAJOR].count} - ${data.gcStats[NODE_PERFORMANCE_GC_MAJOR].totalDuration}ms,`;
|
||||
gcInfo += ` incremental: ${data.gcStats[NODE_PERFORMANCE_GC_INCREMENTAL].count} - ${data.gcStats[NODE_PERFORMANCE_GC_INCREMENTAL].totalDuration}ms)`;
|
||||
|
||||
return `${data.name}${conf}: ${rate} ${gcInfo}`;
|
||||
}
|
||||
|
||||
function sendResult(data) {
|
||||
if (process.send) {
|
||||
// If forked, report by process send
|
||||
process.send(data);
|
||||
} else {
|
||||
// Otherwise report by stdout
|
||||
console.log(formatResult(data));
|
||||
}
|
||||
}
|
||||
|
||||
Benchmark.prototype.report = function(rate, elapsed) {
|
||||
sendResult({
|
||||
name: this.name,
|
||||
conf: this.config,
|
||||
rate: rate,
|
||||
time: elapsed[0] + elapsed[1] / 1e9,
|
||||
type: 'report',
|
||||
gcStats: this._gcStats
|
||||
});
|
||||
};
|
||||
|
||||
function createBenchmark(fn, configs, options) {
|
||||
return new Benchmark(fn, configs, options);
|
||||
}
|
||||
|
||||
function createConnection(cb) {
|
||||
var config = JSON.parse(fs.readFileSync(require('os').homedir() + '/.tedious/test-connection.json', 'utf8')).config;
|
||||
|
||||
var connection = new Connection(config);
|
||||
connection.connect(function() {
|
||||
cb(connection);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.createBenchmark = createBenchmark;
|
||||
module.exports.createConnection = createConnection;
|
||||
26
node_modules/tedious/benchmarks/connection/open.js
generated
vendored
Normal file
26
node_modules/tedious/benchmarks/connection/open.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
const { createBenchmark, createConnection } = require('../common');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100]
|
||||
});
|
||||
|
||||
function main({ n }) {
|
||||
let i = 0;
|
||||
bench.start();
|
||||
|
||||
(function cb() {
|
||||
createConnection(function(connection) {
|
||||
connection.close();
|
||||
|
||||
if (i++ === n) {
|
||||
bench.end(n);
|
||||
|
||||
connection.close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
cb();
|
||||
});
|
||||
})();
|
||||
}
|
||||
21173
node_modules/tedious/benchmarks/package-lock.json
generated
vendored
Normal file
21173
node_modules/tedious/benchmarks/package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
node_modules/tedious/benchmarks/package.json
generated
vendored
Normal file
11
node_modules/tedious/benchmarks/package.json
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "tedious-benchmarks",
|
||||
"version": "1.0.0",
|
||||
"description": "This folder contains a collection of benchmarks for `tedious`.",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"tedious": "file:.."
|
||||
}
|
||||
}
|
||||
105
node_modules/tedious/benchmarks/query/call-tvp.js
generated
vendored
Normal file
105
node_modules/tedious/benchmarks/query/call-tvp.js
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
const { createBenchmark, createConnection } = require('../common');
|
||||
|
||||
const { Request, TYPES } = require('tedious');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100]
|
||||
});
|
||||
|
||||
function main({ n }) {
|
||||
createConnection(function(connection) {
|
||||
const request = new Request(`
|
||||
USE tempdb;
|
||||
|
||||
DROP TYPE IF EXISTS TediousTestType;
|
||||
|
||||
CREATE TYPE TediousTestType AS TABLE (
|
||||
FileId uniqueidentifier,
|
||||
FileNumber bigint,
|
||||
FileVersion varchar(20),
|
||||
FileCommitID varchar(40),
|
||||
FileModel nvarchar(max)
|
||||
);
|
||||
`, (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
const request = new Request(`
|
||||
CREATE PROCEDURE #__tediousTvpTest @tvp TediousTestType readonly AS BEGIN select COUNT(*) from @tvp END
|
||||
`, (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
const tvp = {
|
||||
columns: [
|
||||
{
|
||||
name: 'FileId',
|
||||
type: TYPES.UniqueIdentifier
|
||||
},
|
||||
{
|
||||
name: 'FileNumber',
|
||||
type: TYPES.BigInt
|
||||
},
|
||||
{
|
||||
name: 'FileVersion',
|
||||
type: TYPES.VarChar,
|
||||
length: 20,
|
||||
},
|
||||
{
|
||||
name: 'FileCommitID',
|
||||
type: TYPES.VarChar,
|
||||
length: 40,
|
||||
},
|
||||
{
|
||||
name: 'FileModel',
|
||||
type: TYPES.NVarChar,
|
||||
length: Infinity
|
||||
}
|
||||
],
|
||||
rows: []
|
||||
};
|
||||
|
||||
for (let i = 0; i < 500; i++) {
|
||||
tvp.rows.push([
|
||||
'6F9619FF-8B86-D011-B42D-00C04FC964FF',
|
||||
1,
|
||||
'12345',
|
||||
'6b8bd41619d843b35b13478bb8aa88ea67039a05',
|
||||
new Array(5000).join('x')
|
||||
]);
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
bench.start();
|
||||
|
||||
(function cb() {
|
||||
const request = new Request('#__tediousTvpTest', (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (i++ === n) {
|
||||
bench.end(n);
|
||||
|
||||
connection.close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
cb();
|
||||
});
|
||||
|
||||
request.addParameter('tvp', TYPES.TVP, tvp);
|
||||
|
||||
connection.callProcedure(request);
|
||||
})();
|
||||
});
|
||||
|
||||
connection.execSqlBatch(request);
|
||||
});
|
||||
|
||||
connection.execSqlBatch(request);
|
||||
});
|
||||
}
|
||||
46
node_modules/tedious/benchmarks/query/insert-varbinary.js
generated
vendored
Normal file
46
node_modules/tedious/benchmarks/query/insert-varbinary.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
const { createBenchmark, createConnection } = require('../common');
|
||||
|
||||
const { Request, TYPES } = require('tedious');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100],
|
||||
size: [
|
||||
10,
|
||||
1024,
|
||||
1024 * 1024,
|
||||
10 * 1024 * 1024
|
||||
]
|
||||
});
|
||||
|
||||
function main({ n, size }) {
|
||||
createConnection(function(connection) {
|
||||
const buf = Buffer.alloc(size);
|
||||
buf.fill('x');
|
||||
|
||||
let i = 0;
|
||||
|
||||
bench.start();
|
||||
|
||||
(function cb() {
|
||||
const request = new Request('SELECT DATALENGTH(@value)', (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (i++ === n) {
|
||||
bench.end(n);
|
||||
|
||||
connection.close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
cb();
|
||||
});
|
||||
|
||||
request.addParameter('value', TYPES.VarBinary, buf);
|
||||
|
||||
connection.execSql(request);
|
||||
})();
|
||||
});
|
||||
}
|
||||
63
node_modules/tedious/benchmarks/query/select-many-rows.js
generated
vendored
Normal file
63
node_modules/tedious/benchmarks/query/select-many-rows.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
const { createBenchmark, createConnection } = require('../common');
|
||||
|
||||
const { Request, TYPES } = require('tedious');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100, 1000],
|
||||
size: [10, 100, 1000, 10000]
|
||||
});
|
||||
|
||||
function main({ n, size }) {
|
||||
createConnection(function(connection) {
|
||||
const request = new Request('CREATE TABLE #benchmark ([id] int IDENTITY(1,1), [name] nvarchar(100), [description] nvarchar(max))', (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
(function insertNext(num, done) {
|
||||
var request = new Request('INSERT INTO #benchmark ([name], [description]) VALUES (@name, @description)', (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (num === size) {
|
||||
done();
|
||||
} else {
|
||||
insertNext(num + 1, done);
|
||||
}
|
||||
});
|
||||
|
||||
request.addParameter('name', TYPES.NVarChar, 'Row ' + n);
|
||||
request.addParameter('description', TYPES.NVarChar, 'Example Test Description for Row ' + n);
|
||||
|
||||
connection.execSql(request);
|
||||
})(0, (err) => {
|
||||
let i = 0;
|
||||
|
||||
bench.start();
|
||||
|
||||
(function cb() {
|
||||
const request = new Request('SELECT * FROM #benchmark', (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (i++ === n) {
|
||||
bench.end(n);
|
||||
|
||||
connection.close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
cb();
|
||||
});
|
||||
|
||||
connection.execSql(request);
|
||||
})();
|
||||
});
|
||||
});
|
||||
|
||||
connection.execSqlBatch(request);
|
||||
});
|
||||
}
|
||||
50
node_modules/tedious/benchmarks/query/select-nvarchar.js
generated
vendored
Normal file
50
node_modules/tedious/benchmarks/query/select-nvarchar.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
const { createBenchmark, createConnection } = require('../common');
|
||||
|
||||
const { Request, TYPES } = require('tedious');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100, 1000],
|
||||
size: [10, 100, 1000, 10000]
|
||||
});
|
||||
|
||||
function main({ n, size }) {
|
||||
createConnection(function(connection) {
|
||||
const request = new Request('CREATE TABLE #benchmark ([value] nvarchar(max))', (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
var request = new Request('INSERT INTO #benchmark ([value]) VALUES (@value)', (err) => {
|
||||
let i = 0;
|
||||
|
||||
bench.start();
|
||||
|
||||
(function cb() {
|
||||
const request = new Request('SELECT * FROM #benchmark', (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (i++ === n) {
|
||||
bench.end(n);
|
||||
|
||||
connection.close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
cb();
|
||||
});
|
||||
|
||||
connection.execSql(request);
|
||||
})();
|
||||
});
|
||||
|
||||
const value = 'a'.repeat(size);
|
||||
request.addParameter('value', TYPES.NVarChar, value);
|
||||
connection.execSql(request);
|
||||
});
|
||||
|
||||
connection.execSqlBatch(request);
|
||||
});
|
||||
}
|
||||
50
node_modules/tedious/benchmarks/query/select-varbinary.js
generated
vendored
Normal file
50
node_modules/tedious/benchmarks/query/select-varbinary.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
const { createBenchmark, createConnection } = require('../common');
|
||||
|
||||
const { Request, TYPES } = require('tedious');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100],
|
||||
size: [10, 100, 1000, 10000, 1024 * 1024, 10 * 1024 * 1024]
|
||||
});
|
||||
|
||||
function main({ n, size }) {
|
||||
createConnection(function(connection) {
|
||||
const request = new Request('CREATE TABLE #benchmark ([value] varbinary(max))', (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
var request = new Request('INSERT INTO #benchmark ([value]) VALUES (@value)', (err) => {
|
||||
let i = 0;
|
||||
|
||||
bench.start();
|
||||
|
||||
(function cb() {
|
||||
const request = new Request('SELECT * FROM #benchmark', (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (i++ === n) {
|
||||
bench.end(n);
|
||||
|
||||
connection.close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
cb();
|
||||
});
|
||||
|
||||
connection.execSql(request);
|
||||
})();
|
||||
});
|
||||
|
||||
const value = Buffer.alloc(size, 'a');
|
||||
request.addParameter('value', TYPES.VarBinary, value);
|
||||
connection.execSql(request);
|
||||
});
|
||||
|
||||
connection.execSqlBatch(request);
|
||||
});
|
||||
}
|
||||
45
node_modules/tedious/benchmarks/request/rpcrequest-payload-tvp.js
generated
vendored
Normal file
45
node_modules/tedious/benchmarks/request/rpcrequest-payload-tvp.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const { createBenchmark } = require('../common');
|
||||
|
||||
const { Request, TYPES } = require('tedious');
|
||||
const RpcRequestPayload = require('tedious/lib/rpcrequest-payload');
|
||||
|
||||
const { Readable } = require('stream');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100],
|
||||
size: [10, 100, 1000, 10000]
|
||||
});
|
||||
|
||||
function main({ n, size }) {
|
||||
var table = {
|
||||
columns: [
|
||||
{ name: 'user_id', type: TYPES.Int },
|
||||
{ name: 'user_name', type: TYPES.VarChar, length: 500 },
|
||||
{ name: 'user_enabled', type: TYPES.Bit }
|
||||
],
|
||||
rows: []
|
||||
};
|
||||
|
||||
for (let j = 0; j < size; j++) {
|
||||
table.rows.push([15, 'Eric', true]);
|
||||
}
|
||||
|
||||
const request = new Request('...', () => {});
|
||||
request.addParameter('value', TYPES.TVP, table);
|
||||
request.validateParameters();
|
||||
|
||||
let i = 0;
|
||||
bench.start();
|
||||
|
||||
(function cb() {
|
||||
if (i++ === n) {
|
||||
bench.end(n);
|
||||
return;
|
||||
}
|
||||
|
||||
const payload = new RpcRequestPayload(request.sqlTextOrProcedure, request.parameters, Buffer.alloc(0), {}, undefined);
|
||||
const stream = Readable.from(payload);
|
||||
stream.on('data', () => {});
|
||||
stream.on('end', cb);
|
||||
})();
|
||||
}
|
||||
37
node_modules/tedious/benchmarks/request/rpcrequest-payload-varbinary.js
generated
vendored
Normal file
37
node_modules/tedious/benchmarks/request/rpcrequest-payload-varbinary.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
const { createBenchmark } = require('../common');
|
||||
|
||||
const { Request, TYPES } = require('tedious');
|
||||
const RpcRequestPayload = require('tedious/lib/rpcrequest-payload');
|
||||
|
||||
const { Readable } = require('stream');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100],
|
||||
size: [
|
||||
1024 * 1024,
|
||||
10 * 1024 * 1024,
|
||||
50 * 1024 * 1024,
|
||||
]
|
||||
});
|
||||
|
||||
function main({ n, size }) {
|
||||
const buf = Buffer.alloc(size, 'x');
|
||||
|
||||
const request = new Request('...', () => {});
|
||||
request.addParameter('value', TYPES.VarBinary, buf);
|
||||
|
||||
let i = 0;
|
||||
bench.start();
|
||||
|
||||
(function cb() {
|
||||
if (i++ === n) {
|
||||
bench.end(n);
|
||||
return;
|
||||
}
|
||||
|
||||
const payload = new RpcRequestPayload(request.sqlTextOrProcedure, request.parameters, Buffer.alloc(0), {}, undefined);
|
||||
const stream = Readable.from(payload);
|
||||
stream.on('data', () => {});
|
||||
stream.on('end', cb);
|
||||
})();
|
||||
}
|
||||
27
node_modules/tedious/benchmarks/token-parser/colmetadata-token.js
generated
vendored
Normal file
27
node_modules/tedious/benchmarks/token-parser/colmetadata-token.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
const { createBenchmark } = require('../common');
|
||||
|
||||
const { Parser } = require('tedious/lib/token/token-stream-parser');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100, 1000],
|
||||
tokenCount: [10, 100, 1000, 10000]
|
||||
});
|
||||
|
||||
async function * repeat(data, n) {
|
||||
for (let i = 0; i < n; i++) {
|
||||
yield data;
|
||||
}
|
||||
}
|
||||
|
||||
function main({ n, tokenCount }) {
|
||||
const data = Buffer.from('810300000000001000380269006400000000000900e7c8000904d00034046e0061006d006500000000000900e7ffff0904d000340b6400650073006300720069007000740069006f006e00'.repeat(tokenCount), 'hex');
|
||||
const parser = new Parser(repeat(data, n), { token: function() { } }, {
|
||||
onColMetadata: (token) => { }
|
||||
}, {});
|
||||
|
||||
bench.start();
|
||||
|
||||
parser.on('end', () => {
|
||||
bench.end(n);
|
||||
});
|
||||
}
|
||||
28
node_modules/tedious/benchmarks/token-parser/done-token.js
generated
vendored
Normal file
28
node_modules/tedious/benchmarks/token-parser/done-token.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
const { createBenchmark } = require('../common');
|
||||
|
||||
const { Parser } = require('tedious/lib/token/token-stream-parser');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100, 1000],
|
||||
tokenCount: [10, 100, 1000, 10000]
|
||||
});
|
||||
|
||||
async function * repeat(data, n) {
|
||||
for (let i = 0; i < n; i++) {
|
||||
yield data;
|
||||
}
|
||||
}
|
||||
|
||||
function main({ n, tokenCount }) {
|
||||
const data = Buffer.from('FE0000E0000000000000000000'.repeat(tokenCount), 'hex');
|
||||
|
||||
const parser = new Parser(repeat(data, n), { token: function() { } }, {
|
||||
onDoneProc: (token) => { }
|
||||
}, {});
|
||||
|
||||
bench.start();
|
||||
|
||||
parser.on('end', () => {
|
||||
bench.end(n);
|
||||
});
|
||||
}
|
||||
363
node_modules/tedious/benchmarks/token-parser/simple-tokens.js
generated
vendored
Normal file
363
node_modules/tedious/benchmarks/token-parser/simple-tokens.js
generated
vendored
Normal file
@@ -0,0 +1,363 @@
|
||||
const { createBenchmark } = require('../common');
|
||||
|
||||
const { Parser } = require('tedious/lib/token/token-stream-parser');
|
||||
|
||||
const bench = createBenchmark(main, {
|
||||
n: [10, 100, 1000]
|
||||
});
|
||||
|
||||
async function * repeat(data, n) {
|
||||
for (let i = 0; i < n; i++) {
|
||||
yield data;
|
||||
}
|
||||
}
|
||||
|
||||
function main({ n }) {
|
||||
const data = Buffer.from([
|
||||
'810300000000001000380269006400000000000900E7C8000904D00034046E00',
|
||||
'61006D006500000000000900E7FFFF0904D000340B6400650073006300720069',
|
||||
'007000740069006F006E00D1010000000A0052006F0077002000300044000000',
|
||||
'00000000440000004500780061006D0070006C00650020005400650073007400',
|
||||
'20004400650073006300720069007000740069006F006E00200066006F007200',
|
||||
'200052006F0077002000300000000000D1020000000A0052006F007700200031',
|
||||
'004400000000000000440000004500780061006D0070006C0065002000540065',
|
||||
'007300740020004400650073006300720069007000740069006F006E00200066',
|
||||
'006F007200200052006F0077002000310000000000D1030000000A0052006F00',
|
||||
'7700200032004400000000000000440000004500780061006D0070006C006500',
|
||||
'2000540065007300740020004400650073006300720069007000740069006F00',
|
||||
'6E00200066006F007200200052006F0077002000320000000000D1040000000A',
|
||||
'0052006F007700200033004400000000000000440000004500780061006D0070',
|
||||
'006C006500200054006500730074002000440065007300630072006900700074',
|
||||
'0069006F006E00200066006F007200200052006F0077002000330000000000D1',
|
||||
'050000000A0052006F0077002000340044000000000000004400000045007800',
|
||||
'61006D0070006C00650020005400650073007400200044006500730063007200',
|
||||
'69007000740069006F006E00200066006F007200200052006F00770020003400',
|
||||
'00000000D1060000000A0052006F007700200035004400000000000000440000',
|
||||
'004500780061006D0070006C0065002000540065007300740020004400650073',
|
||||
'006300720069007000740069006F006E00200066006F007200200052006F0077',
|
||||
'002000350000000000D1070000000A0052006F00770020003600440000000000',
|
||||
'0000440000004500780061006D0070006C006500200054006500730074002000',
|
||||
'4400650073006300720069007000740069006F006E00200066006F0072002000',
|
||||
'52006F0077002000360000000000D1080000000A0052006F0077002000370044',
|
||||
'00000000000000440000004500780061006D0070006C00650020005400650073',
|
||||
'00740020004400650073006300720069007000740069006F006E00200066006F',
|
||||
'007200200052006F0077002000370000000000D1090000000A0052006F007700',
|
||||
'200038004400000000000000440000004500780061006D0070006C0065002000',
|
||||
'540065007300740020004400650073006300720069007000740069006F006E00',
|
||||
'200066006F007200200052006F0077002000380000000000D10A0000000A0052',
|
||||
'006F007700200039004400000000000000440000004500780061006D0070006C',
|
||||
'0065002000540065007300740020004400650073006300720069007000740069',
|
||||
'006F006E00200066006F007200200052006F0077002000390000000000D10B00',
|
||||
'00000C0052006F00770020003100300046000000000000004600000045007800',
|
||||
'61006D0070006C00650020005400650073007400200044006500730063007200',
|
||||
'69007000740069006F006E00200066006F007200200052006F00770020003100',
|
||||
'300000000000D10C0000000C0052006F00770020003100310046000000000000',
|
||||
'00460000004500780061006D0070006C00650020005400650073007400200044',
|
||||
'00650073006300720069007000740069006F006E00200066006F007200200052',
|
||||
'006F00770020003100310000000000D10D0000000C0052006F00770020003100',
|
||||
'32004600000000000000460000004500780061006D0070006C00650020005400',
|
||||
'65007300740020004400650073006300720069007000740069006F006E002000',
|
||||
'66006F007200200052006F00770020003100320000000000D10E0000000C0052',
|
||||
'006F0077002000310033004600000000000000460000004500780061006D0070',
|
||||
'006C006500200054006500730074002000440065007300630072006900700074',
|
||||
'0069006F006E00200066006F007200200052006F007700200031003300000000',
|
||||
'00D10F0000000C0052006F007700200031003400460000000000000046000000',
|
||||
'4500780061006D0070006C006500200054006500730074002000440065007300',
|
||||
'6300720069007000740069006F006E00200066006F007200200052006F007700',
|
||||
'20003100340000000000D1100000000C0052006F007700200031003500460000',
|
||||
'0000000000460000004500780061006D0070006C006500200054006500730074',
|
||||
'0020004400650073006300720069007000740069006F006E00200066006F0072',
|
||||
'00200052006F00770020003100350000000000D1110000000C0052006F007700',
|
||||
'2000310036004600000000000000460000004500780061006D0070006C006500',
|
||||
'2000540065007300740020004400650073006300720069007000740069006F00',
|
||||
'6E00200066006F007200200052006F00770020003100360000000000D1120000',
|
||||
'000C0052006F0077002000310037004600000000000000460000004500780061',
|
||||
'006D0070006C0065002000540065007300740020004400650073006300720069',
|
||||
'007000740069006F006E00200066006F007200200052006F0077002000310037',
|
||||
'0000000000D1130000000C0052006F0077002000310038004600000000000000',
|
||||
'460000004500780061006D0070006C0065002000540065007300740020004400',
|
||||
'650073006300720069007000740069006F006E00200066006F00720020005200',
|
||||
'6F00770020003100380000000000D1140000000C0052006F0077002000310039',
|
||||
'004600000000000000460000004500780061006D0070006C0065002000540065',
|
||||
'007300740020004400650073006300720069007000740069006F006E00200066',
|
||||
'006F007200200052006F00770020003100390000000000D1150000000C005200',
|
||||
'6F0077002000320030004600000000000000460000004500780061006D007000',
|
||||
'6C00650020005400650073007400200044006500730063007200690070007400',
|
||||
'69006F006E00200066006F007200200052006F00770020003200300000000000',
|
||||
'D1160000000C0052006F00770020003200310046000000000000004600000045',
|
||||
'00780061006D0070006C00650020005400650073007400200044006500730063',
|
||||
'00720069007000740069006F006E00200066006F007200200052006F00770020',
|
||||
'003200310000000000D1170000000C0052006F00770020003200320046000000',
|
||||
'00000000460000004500780061006D0070006C00650020005400650073007400',
|
||||
'20004400650073006300720069007000740069006F006E00200066006F007200',
|
||||
'200052006F00770020003200320000000000D1180000000C0052006F00770020',
|
||||
'00320033004600000000000000460000004500780061006D0070006C00650020',
|
||||
'00540065007300740020004400650073006300720069007000740069006F006E',
|
||||
'00200066006F007200200052006F00770020003200330000000000D119000000',
|
||||
'0C0052006F007700200032003400460000000000000046000000450078006100',
|
||||
'6D0070006C006500200054006500730074002000440065007300630072006900',
|
||||
'7000740069006F006E00200066006F007200200052006F007700200032003400',
|
||||
'00000000D11A0000000C0052006F007700200032003500460000000000000046',
|
||||
'0000004500780061006D0070006C006500200054006500730074002000440065',
|
||||
'0073006300720069007000740069006F006E00200066006F007200200052006F',
|
||||
'00770020003200350000000000D11B0000000C0052006F007700200032003600',
|
||||
'4600000000000000460000004500780061006D0070006C006500200054006500',
|
||||
'7300740020004400650073006300720069007000740069006F006E0020006600',
|
||||
'6F007200200052006F00770020003200360000000000D11C0000000C0052006F',
|
||||
'0077002000320037004600000000000000460000004500780061006D0070006C',
|
||||
'0065002000540065007300740020004400650073006300720069007000740069',
|
||||
'006F006E00200066006F007200200052006F00770020003200370000000000D1',
|
||||
'1D0000000C0052006F0077002000320038004600000000000000460000004500',
|
||||
'780061006D0070006C0065002000540065007300740020004400650073006300',
|
||||
'720069007000740069006F006E00200066006F007200200052006F0077002000',
|
||||
'3200380000000000D11E0000000C0052006F0077002000320039004600000000',
|
||||
'000000460000004500780061006D0070006C0065002000540065007300740020',
|
||||
'004400650073006300720069007000740069006F006E00200066006F00720020',
|
||||
'0052006F00770020003200390000000000D11F0000000C0052006F0077002000',
|
||||
'330030004600000000000000460000004500780061006D0070006C0065002000',
|
||||
'540065007300740020004400650073006300720069007000740069006F006E00',
|
||||
'200066006F007200200052006F00770020003300300000000000D1200000000C',
|
||||
'0052006F0077002000330031004600000000000000460000004500780061006D',
|
||||
'0070006C00650020005400650073007400200044006500730063007200690070',
|
||||
'00740069006F006E00200066006F007200200052006F00770020003300310000',
|
||||
'000000D1210000000C0052006F00770020003300320046000000000000004600',
|
||||
'00004500780061006D0070006C00650020005400650073007400200044006500',
|
||||
'73006300720069007000740069006F006E00200066006F007200200052006F00',
|
||||
'770020003300320000000000D1220000000C0052006F00770020003300330046',
|
||||
'00000000000000460000004500780061006D0070006C00650020005400650073',
|
||||
'00740020004400650073006300720069007000740069006F006E00200066006F',
|
||||
'007200200052006F00770020003300330000000000D1230000000C0052006F00',
|
||||
'77002000330034004600000000000000460000004500780061006D0070006C00',
|
||||
'6500200054006500730074002000440065007300630072006900700074006900',
|
||||
'6F006E00200066006F007200200052006F00770020003300340000000000D124',
|
||||
'0000000C0052006F007700200033003500460000000000000046000000450078',
|
||||
'0061006D0070006C006500200054006500730074002000440065007300630072',
|
||||
'0069007000740069006F006E00200066006F007200200052006F007700200033',
|
||||
'00350000000000D1250000000C0052006F007700200033003600460000000000',
|
||||
'0000460000004500780061006D0070006C006500200054006500730074002000',
|
||||
'4400650073006300720069007000740069006F006E00200066006F0072002000',
|
||||
'52006F00770020003300360000000000D1260000000C0052006F007700200033',
|
||||
'0037004600000000000000460000004500780061006D0070006C006500200054',
|
||||
'0065007300740020004400650073006300720069007000740069006F006E0020',
|
||||
'0066006F007200200052006F00770020003300370000000000D1270000000C00',
|
||||
'52006F0077002000330038004600000000000000200000004500780061006D00',
|
||||
'70006C006500200054006500730074002000440065007300',
|
||||
'260000006300720069007000740069006F006E00200066006F00720020005200',
|
||||
'6F00770020003300380000000000D1280000000C0052006F0077002000330039',
|
||||
'004600000000000000460000004500780061006D0070006C0065002000540065',
|
||||
'007300740020004400650073006300720069007000740069006F006E00200066',
|
||||
'006F007200200052006F00770020003300390000000000D1290000000C005200',
|
||||
'6F0077002000340030004600000000000000460000004500780061006D007000',
|
||||
'6C00650020005400650073007400200044006500730063007200690070007400',
|
||||
'69006F006E00200066006F007200200052006F00770020003400300000000000',
|
||||
'D12A0000000C0052006F00770020003400310046000000000000004600000045',
|
||||
'00780061006D0070006C00650020005400650073007400200044006500730063',
|
||||
'00720069007000740069006F006E00200066006F007200200052006F00770020',
|
||||
'003400310000000000D12B0000000C0052006F00770020003400320046000000',
|
||||
'00000000460000004500780061006D0070006C00650020005400650073007400',
|
||||
'20004400650073006300720069007000740069006F006E00200066006F007200',
|
||||
'200052006F00770020003400320000000000D12C0000000C0052006F00770020',
|
||||
'00340033004600000000000000460000004500780061006D0070006C00650020',
|
||||
'00540065007300740020004400650073006300720069007000740069006F006E',
|
||||
'00200066006F007200200052006F00770020003400330000000000D12D000000',
|
||||
'0C0052006F007700200034003400460000000000000046000000450078006100',
|
||||
'6D0070006C006500200054006500730074002000440065007300630072006900',
|
||||
'7000740069006F006E00200066006F007200200052006F007700200034003400',
|
||||
'00000000D12E0000000C0052006F007700200034003500460000000000000046',
|
||||
'0000004500780061006D0070006C006500200054006500730074002000440065',
|
||||
'0073006300720069007000740069006F006E00200066006F007200200052006F',
|
||||
'00770020003400350000000000D12F0000000C0052006F007700200034003600',
|
||||
'4600000000000000460000004500780061006D0070006C006500200054006500',
|
||||
'7300740020004400650073006300720069007000740069006F006E0020006600',
|
||||
'6F007200200052006F00770020003400360000000000D1300000000C0052006F',
|
||||
'0077002000340037004600000000000000460000004500780061006D0070006C',
|
||||
'0065002000540065007300740020004400650073006300720069007000740069',
|
||||
'006F006E00200066006F007200200052006F00770020003400370000000000D1',
|
||||
'310000000C0052006F0077002000340038004600000000000000460000004500',
|
||||
'780061006D0070006C0065002000540065007300740020004400650073006300',
|
||||
'720069007000740069006F006E00200066006F007200200052006F0077002000',
|
||||
'3400380000000000D1320000000C0052006F0077002000340039004600000000',
|
||||
'000000460000004500780061006D0070006C0065002000540065007300740020',
|
||||
'004400650073006300720069007000740069006F006E00200066006F00720020',
|
||||
'0052006F00770020003400390000000000D1330000000C0052006F0077002000',
|
||||
'350030004600000000000000460000004500780061006D0070006C0065002000',
|
||||
'540065007300740020004400650073006300720069007000740069006F006E00',
|
||||
'200066006F007200200052006F00770020003500300000000000D1340000000C',
|
||||
'0052006F0077002000350031004600000000000000460000004500780061006D',
|
||||
'0070006C00650020005400650073007400200044006500730063007200690070',
|
||||
'00740069006F006E00200066006F007200200052006F00770020003500310000',
|
||||
'000000D1350000000C0052006F00770020003500320046000000000000004600',
|
||||
'00004500780061006D0070006C00650020005400650073007400200044006500',
|
||||
'73006300720069007000740069006F006E00200066006F007200200052006F00',
|
||||
'770020003500320000000000D1360000000C0052006F00770020003500330046',
|
||||
'00000000000000460000004500780061006D0070006C00650020005400650073',
|
||||
'00740020004400650073006300720069007000740069006F006E00200066006F',
|
||||
'007200200052006F00770020003500330000000000D1370000000C0052006F00',
|
||||
'77002000350034004600000000000000460000004500780061006D0070006C00',
|
||||
'6500200054006500730074002000440065007300630072006900700074006900',
|
||||
'6F006E00200066006F007200200052006F00770020003500340000000000D138',
|
||||
'0000000C0052006F007700200035003500460000000000000046000000450078',
|
||||
'0061006D0070006C006500200054006500730074002000440065007300630072',
|
||||
'0069007000740069006F006E00200066006F007200200052006F007700200035',
|
||||
'00350000000000D1390000000C0052006F007700200035003600460000000000',
|
||||
'0000460000004500780061006D0070006C006500200054006500730074002000',
|
||||
'4400650073006300720069007000740069006F006E00200066006F0072002000',
|
||||
'52006F00770020003500360000000000D13A0000000C0052006F007700200035',
|
||||
'0037004600000000000000460000004500780061006D0070006C006500200054',
|
||||
'0065007300740020004400650073006300720069007000740069006F006E0020',
|
||||
'0066006F007200200052006F00770020003500370000000000D13B0000000C00',
|
||||
'52006F0077002000350038004600000000000000460000004500780061006D00',
|
||||
'70006C0065002000540065007300740020004400650073006300720069007000',
|
||||
'740069006F006E00200066006F007200200052006F0077002000350038000000',
|
||||
'0000D13C0000000C0052006F0077002000350039004600000000000000460000',
|
||||
'004500780061006D0070006C0065002000540065007300740020004400650073',
|
||||
'006300720069007000740069006F006E00200066006F007200200052006F0077',
|
||||
'0020003500390000000000D13D0000000C0052006F0077002000360030004600',
|
||||
'000000000000460000004500780061006D0070006C0065002000540065007300',
|
||||
'740020004400650073006300720069007000740069006F006E00200066006F00',
|
||||
'7200200052006F00770020003600300000000000D13E0000000C0052006F0077',
|
||||
'002000360031004600000000000000460000004500780061006D0070006C0065',
|
||||
'002000540065007300740020004400650073006300720069007000740069006F',
|
||||
'006E00200066006F007200200052006F00770020003600310000000000D13F00',
|
||||
'00000C0052006F00770020003600320046000000000000004600000045007800',
|
||||
'61006D0070006C00650020005400650073007400200044006500730063007200',
|
||||
'69007000740069006F006E00200066006F007200200052006F00770020003600',
|
||||
'320000000000D1400000000C0052006F00770020003600330046000000000000',
|
||||
'00460000004500780061006D0070006C00650020005400650073007400200044',
|
||||
'00650073006300720069007000740069006F006E00200066006F007200200052',
|
||||
'006F00770020003600330000000000D1410000000C0052006F00770020003600',
|
||||
'34004600000000000000460000004500780061006D0070006C00650020005400',
|
||||
'65007300740020004400650073006300720069007000740069006F006E002000',
|
||||
'66006F007200200052006F00770020003600340000000000D1420000000C0052',
|
||||
'006F0077002000360035004600000000000000460000004500780061006D0070',
|
||||
'006C006500200054006500730074002000440065007300630072006900700074',
|
||||
'0069006F006E00200066006F007200200052006F007700200036003500000000',
|
||||
'00D1430000000C0052006F007700200036003600460000000000000046000000',
|
||||
'4500780061006D0070006C006500200054006500730074002000440065007300',
|
||||
'6300720069007000740069006F006E00200066006F007200200052006F007700',
|
||||
'20003600360000000000D1440000000C0052006F007700200036003700460000',
|
||||
'0000000000460000004500780061006D0070006C006500200054006500730074',
|
||||
'0020004400650073006300720069007000740069006F006E00200066006F0072',
|
||||
'00200052006F00770020003600370000000000D1450000000C0052006F007700',
|
||||
'2000360038004600000000000000460000004500780061006D0070006C006500',
|
||||
'2000540065007300740020004400650073006300720069007000740069006F00',
|
||||
'6E00200066006F007200200052006F00770020003600380000000000D1460000',
|
||||
'000C0052006F0077002000360039004600000000000000460000004500780061',
|
||||
'006D0070006C0065002000540065007300740020004400650073006300720069',
|
||||
'007000740069006F006E00200066006F007200200052006F0077002000360039',
|
||||
'0000000000D1470000000C0052006F0077002000370030004600000000000000',
|
||||
'460000004500780061006D0070006C0065002000540065007300740020004400',
|
||||
'650073006300720069007000740069006F006E00200066006F00720020005200',
|
||||
'6F00770020003700300000000000D1480000000C0052006F0077002000370031',
|
||||
'004600000000000000460000004500780061006D0070006C0065002000540065',
|
||||
'007300740020004400650073006300720069007000740069006F006E00200066',
|
||||
'006F007200200052006F00770020003700310000000000D1490000000C005200',
|
||||
'6F0077002000370032004600000000000000460000004500780061006D007000',
|
||||
'6C00650020005400650073007400200044006500730063007200690070007400',
|
||||
'69006F006E00200066006F007200200052006F00770020003700320000000000',
|
||||
'D14A0000000C0052006F00770020003700330046000000000000004600000045',
|
||||
'00780061006D0070006C00650020005400650073007400200044006500730063',
|
||||
'00720069007000740069006F006E00200066006F007200200052006F00770020',
|
||||
'003700330000000000D14B0000000C0052006F00770020003700340046000000',
|
||||
'00000000460000004500780061006D0070006C00650020005400650073007400',
|
||||
'20004400650073006300720069007000740069006F006E00200066006F007200',
|
||||
'200052006F00770020003700340000000000D14C0000000C0052006F00770020',
|
||||
'00370035004600000000000000460000004500780061006D0070006C00650020',
|
||||
'00540065007300740020004400650073006300720069007000740069006F006E',
|
||||
'00200066006F007200200052006F00770020003700350000000000D14D000000',
|
||||
'0C0052006F007700200037003600460000000000000046000000450078006100',
|
||||
'6D0070006C006500200054006500730074002000440065007300630072006900',
|
||||
'7000740069006F006E00200066006F007200200052006F007700200037003600',
|
||||
'00000000D14E0000000C0052006F007700200037003700460000000000000015',
|
||||
'0000004500780061006D0070006C00650020005400650073',
|
||||
'3100000000740020004400650073006300720069007000740069006F006E0020',
|
||||
'0066006F007200200052006F00770020003700370000000000D14F0000000C00',
|
||||
'52006F0077002000370038004600000000000000460000004500780061006D00',
|
||||
'70006C0065002000540065007300740020004400650073006300720069007000',
|
||||
'740069006F006E00200066006F007200200052006F0077002000370038000000',
|
||||
'0000D1500000000C0052006F0077002000370039004600000000000000460000',
|
||||
'004500780061006D0070006C0065002000540065007300740020004400650073',
|
||||
'006300720069007000740069006F006E00200066006F007200200052006F0077',
|
||||
'0020003700390000000000D1510000000C0052006F0077002000380030004600',
|
||||
'000000000000460000004500780061006D0070006C0065002000540065007300',
|
||||
'740020004400650073006300720069007000740069006F006E00200066006F00',
|
||||
'7200200052006F00770020003800300000000000D1520000000C0052006F0077',
|
||||
'002000380031004600000000000000460000004500780061006D0070006C0065',
|
||||
'002000540065007300740020004400650073006300720069007000740069006F',
|
||||
'006E00200066006F007200200052006F00770020003800310000000000D15300',
|
||||
'00000C0052006F00770020003800320046000000000000004600000045007800',
|
||||
'61006D0070006C00650020005400650073007400200044006500730063007200',
|
||||
'69007000740069006F006E00200066006F007200200052006F00770020003800',
|
||||
'320000000000D1540000000C0052006F00770020003800330046000000000000',
|
||||
'00460000004500780061006D0070006C00650020005400650073007400200044',
|
||||
'00650073006300720069007000740069006F006E00200066006F007200200052',
|
||||
'006F00770020003800330000000000D1550000000C0052006F00770020003800',
|
||||
'34004600000000000000460000004500780061006D0070006C00650020005400',
|
||||
'65007300740020004400650073006300720069007000740069006F006E002000',
|
||||
'66006F007200200052006F00770020003800340000000000D1560000000C0052',
|
||||
'006F0077002000380035004600000000000000460000004500780061006D0070',
|
||||
'006C006500200054006500730074002000440065007300630072006900700074',
|
||||
'0069006F006E00200066006F007200200052006F007700200038003500000000',
|
||||
'00D1570000000C0052006F007700200038003600460000000000000046000000',
|
||||
'4500780061006D0070006C006500200054006500730074002000440065007300',
|
||||
'6300720069007000740069006F006E00200066006F007200200052006F007700',
|
||||
'20003800360000000000D1580000000C0052006F007700200038003700460000',
|
||||
'0000000000460000004500780061006D0070006C006500200054006500730074',
|
||||
'0020004400650073006300720069007000740069006F006E00200066006F0072',
|
||||
'00200052006F00770020003800370000000000D1590000000C0052006F007700',
|
||||
'2000380038004600000000000000460000004500780061006D0070006C006500',
|
||||
'2000540065007300740020004400650073006300720069007000740069006F00',
|
||||
'6E00200066006F007200200052006F00770020003800380000000000D15A0000',
|
||||
'000C0052006F0077002000380039004600000000000000460000004500780061',
|
||||
'006D0070006C0065002000540065007300740020004400650073006300720069',
|
||||
'007000740069006F006E00200066006F007200200052006F0077002000380039',
|
||||
'0000000000D15B0000000C0052006F0077002000390030004600000000000000',
|
||||
'460000004500780061006D0070006C0065002000540065007300740020004400',
|
||||
'650073006300720069007000740069006F006E00200066006F00720020005200',
|
||||
'6F00770020003900300000000000D15C0000000C0052006F0077002000390031',
|
||||
'004600000000000000460000004500780061006D0070006C0065002000540065',
|
||||
'007300740020004400650073006300720069007000740069006F006E00200066',
|
||||
'006F007200200052006F00770020003900310000000000D15D0000000C005200',
|
||||
'6F0077002000390032004600000000000000460000004500780061006D007000',
|
||||
'6C00650020005400650073007400200044006500730063007200690070007400',
|
||||
'69006F006E00200066006F007200200052006F00770020003900320000000000',
|
||||
'D15E0000000C0052006F00770020003900330046000000000000004600000045',
|
||||
'00780061006D0070006C00650020005400650073007400200044006500730063',
|
||||
'00720069007000740069006F006E00200066006F007200200052006F00770020',
|
||||
'003900330000000000D15F0000000C0052006F00770020003900340046000000',
|
||||
'00000000460000004500780061006D0070006C00650020005400650073007400',
|
||||
'20004400650073006300720069007000740069006F006E00200066006F007200',
|
||||
'200052006F00770020003900340000000000D1600000000C0052006F00770020',
|
||||
'00390035004600000000000000460000004500780061006D0070006C00650020',
|
||||
'00540065007300740020004400650073006300720069007000740069006F006E',
|
||||
'00200066006F007200200052006F00770020003900350000000000D161000000',
|
||||
'0C0052006F007700200039003600460000000000000046000000450078006100',
|
||||
'6D0070006C006500200054006500730074002000440065007300630072006900',
|
||||
'7000740069006F006E00200066006F007200200052006F007700200039003600',
|
||||
'00000000D1620000000C0052006F007700200039003700460000000000000046',
|
||||
'0000004500780061006D0070006C006500200054006500730074002000440065',
|
||||
'0073006300720069007000740069006F006E00200066006F007200200052006F',
|
||||
'00770020003900370000000000D1630000000C0052006F007700200039003800',
|
||||
'4600000000000000460000004500780061006D0070006C006500200054006500',
|
||||
'7300740020004400650073006300720069007000740069006F006E0020006600',
|
||||
'6F007200200052006F00770020003900380000000000D1640000000C0052006F',
|
||||
'0077002000390039004600000000000000460000004500780061006D0070006C',
|
||||
'0065002000540065007300740020004400650073006300720069007000740069',
|
||||
'006F006E00200066006F007200200052006F00770020003900390000000000FF',
|
||||
'1100C10064000000000000007900000000FE0000E0000000000000000000'
|
||||
].join(''), 'hex');
|
||||
|
||||
const parser = new Parser(repeat(data, n), {}, {
|
||||
onColMetadata: () => { },
|
||||
onRow: () => { },
|
||||
onDoneInProc: () => { },
|
||||
onDoneProc: () => { },
|
||||
onReturnStatus: () => { }
|
||||
}, {});
|
||||
|
||||
bench.start();
|
||||
|
||||
parser.on('end', () => {
|
||||
bench.end(n);
|
||||
});
|
||||
}
|
||||
2
node_modules/tedious/lib/all-headers.d.ts
generated
vendored
Normal file
2
node_modules/tedious/lib/all-headers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import WritableTrackingBuffer from './tracking-buffer/writable-tracking-buffer';
|
||||
export declare function writeToTrackingBuffer(buffer: WritableTrackingBuffer, txnDescriptor: Buffer, outstandingRequestCount: number): WritableTrackingBuffer;
|
||||
24
node_modules/tedious/lib/all-headers.js
generated
vendored
Normal file
24
node_modules/tedious/lib/all-headers.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.writeToTrackingBuffer = writeToTrackingBuffer;
|
||||
const TYPE = {
|
||||
QUERY_NOTIFICATIONS: 1,
|
||||
TXN_DESCRIPTOR: 2,
|
||||
TRACE_ACTIVITY: 3
|
||||
};
|
||||
const TXNDESCRIPTOR_HEADER_DATA_LEN = 4 + 8;
|
||||
const TXNDESCRIPTOR_HEADER_LEN = 4 + 2 + TXNDESCRIPTOR_HEADER_DATA_LEN;
|
||||
function writeToTrackingBuffer(buffer, txnDescriptor, outstandingRequestCount) {
|
||||
buffer.writeUInt32LE(0);
|
||||
buffer.writeUInt32LE(TXNDESCRIPTOR_HEADER_LEN);
|
||||
buffer.writeUInt16LE(TYPE.TXN_DESCRIPTOR);
|
||||
buffer.writeBuffer(txnDescriptor);
|
||||
buffer.writeUInt32LE(outstandingRequestCount);
|
||||
const data = buffer.data;
|
||||
data.writeUInt32LE(data.length, 0);
|
||||
return buffer;
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJUWVBFIiwiUVVFUllfTk9USUZJQ0FUSU9OUyIsIlRYTl9ERVNDUklQVE9SIiwiVFJBQ0VfQUNUSVZJVFkiLCJUWE5ERVNDUklQVE9SX0hFQURFUl9EQVRBX0xFTiIsIlRYTkRFU0NSSVBUT1JfSEVBREVSX0xFTiIsIndyaXRlVG9UcmFja2luZ0J1ZmZlciIsImJ1ZmZlciIsInR4bkRlc2NyaXB0b3IiLCJvdXRzdGFuZGluZ1JlcXVlc3RDb3VudCIsIndyaXRlVUludDMyTEUiLCJ3cml0ZVVJbnQxNkxFIiwid3JpdGVCdWZmZXIiLCJkYXRhIiwibGVuZ3RoIl0sInNvdXJjZXMiOlsiLi4vc3JjL2FsbC1oZWFkZXJzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBXcml0YWJsZVRyYWNraW5nQnVmZmVyIGZyb20gJy4vdHJhY2tpbmctYnVmZmVyL3dyaXRhYmxlLXRyYWNraW5nLWJ1ZmZlcic7XG5cbmNvbnN0IFRZUEUgPSB7XG4gIFFVRVJZX05PVElGSUNBVElPTlM6IDEsXG4gIFRYTl9ERVNDUklQVE9SOiAyLFxuICBUUkFDRV9BQ1RJVklUWTogM1xufTtcblxuY29uc3QgVFhOREVTQ1JJUFRPUl9IRUFERVJfREFUQV9MRU4gPSA0ICsgODtcblxuY29uc3QgVFhOREVTQ1JJUFRPUl9IRUFERVJfTEVOID0gNCArIDIgKyBUWE5ERVNDUklQVE9SX0hFQURFUl9EQVRBX0xFTjtcblxuZXhwb3J0IGZ1bmN0aW9uIHdyaXRlVG9UcmFja2luZ0J1ZmZlcihidWZmZXI6IFdyaXRhYmx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LENBQUNLLFdBQVcsQ0FBQ0osYUFBYSxDQUFDO0VBQ2pDRCxNQUFNLENBQUNHLGFBQWEsQ0FBQ0QsdUJBQXVCLENBQUM7RUFFN0MsTUFBTUksSUFBSSxHQUFHTixNQUFNLENBQUNNLElBQUk7RUFDeEJBLElBQUksQ0FBQ0gsYUFBYSxDQUFDRyxJQUFJLENBQUNDLE1BQU0sRUFBRSxDQUFDLENBQUM7RUFDbEMsT0FBT1AsTUFBTTtBQUNmIn0=
|
||||
1
node_modules/tedious/lib/all-headers.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/all-headers.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"all-headers.js","names":["TYPE","QUERY_NOTIFICATIONS","TXN_DESCRIPTOR","TRACE_ACTIVITY","TXNDESCRIPTOR_HEADER_DATA_LEN","TXNDESCRIPTOR_HEADER_LEN","writeToTrackingBuffer","buffer","txnDescriptor","outstandingRequestCount","writeUInt32LE","writeUInt16LE","writeBuffer","data","length"],"sources":["../src/all-headers.ts"],"sourcesContent":["import WritableTrackingBuffer from './tracking-buffer/writable-tracking-buffer';\n\nconst TYPE = {\n QUERY_NOTIFICATIONS: 1,\n TXN_DESCRIPTOR: 2,\n TRACE_ACTIVITY: 3\n};\n\nconst TXNDESCRIPTOR_HEADER_DATA_LEN = 4 + 8;\n\nconst TXNDESCRIPTOR_HEADER_LEN = 4 + 2 + TXNDESCRIPTOR_HEADER_DATA_LEN;\n\nexport function writeToTrackingBuffer(buffer: WritableTrackingBuffer, txnDescriptor: Buffer, outstandingRequestCount: number) {\n buffer.writeUInt32LE(0);\n buffer.writeUInt32LE(TXNDESCRIPTOR_HEADER_LEN);\n buffer.writeUInt16LE(TYPE.TXN_DESCRIPTOR);\n buffer.writeBuffer(txnDescriptor);\n buffer.writeUInt32LE(outstandingRequestCount);\n\n const data = buffer.data;\n data.writeUInt32LE(data.length, 0);\n return buffer;\n}\n"],"mappings":";;;;;;AAEA,MAAMA,IAAI,GAAG;EACXC,mBAAmB,EAAE,CAAC;EACtBC,cAAc,EAAE,CAAC;EACjBC,cAAc,EAAE;AAClB,CAAC;AAED,MAAMC,6BAA6B,GAAG,CAAC,GAAG,CAAC;AAE3C,MAAMC,wBAAwB,GAAG,CAAC,GAAG,CAAC,GAAGD,6BAA6B;AAE/D,SAASE,qBAAqBA,CAACC,MAA8B,EAAEC,aAAqB,EAAEC,uBAA+B,EAAE;EAC5HF,MAAM,CAACG,aAAa,CAAC,CAAC,CAAC;EACvBH,MAAM,CAACG,aAAa,CAACL,wBAAwB,CAAC;EAC9CE,MAAM,CAACI,aAAa,CAACX,IAAI,CAACE,cAAc,CAAC;EACzCK,MAAM,CAACK,WAAW,CAACJ,aAAa,CAAC;EACjCD,MAAM,CAACG,aAAa,CAACD,uBAAuB,CAAC;EAE7C,MAAMI,IAAI,GAAGN,MAAM,CAACM,IAAI;EACxBA,IAAI,CAACH,aAAa,CAACG,IAAI,CAACC,MAAM,EAAE,CAAC,CAAC;EAClC,OAAOP,MAAM;AACf"}
|
||||
82
node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-algorithm.js
generated
vendored
Normal file
82
node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-algorithm.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-algorithm.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-algorithm.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
55
node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-encryption-key.js
generated
vendored
Normal file
55
node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-encryption-key.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-encryption-key.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-encryption-key.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
11
node_modules/tedious/lib/always-encrypted/cek-entry.d.ts
generated
vendored
Normal file
11
node_modules/tedious/lib/always-encrypted/cek-entry.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { type EncryptionKeyInfo } from './types';
|
||||
export declare class CEKEntry {
|
||||
columnEncryptionKeyValues: EncryptionKeyInfo[];
|
||||
ordinal: number;
|
||||
databaseId: number;
|
||||
cekId: number;
|
||||
cekVersion: number;
|
||||
cekMdVersion: Buffer;
|
||||
constructor(ordinalVal: number);
|
||||
add(encryptedKey: Buffer, dbId: number, keyId: number, keyVersion: number, mdVersion: Buffer, keyPath: string, keyStoreName: string, algorithmName: string): void;
|
||||
}
|
||||
42
node_modules/tedious/lib/always-encrypted/cek-entry.js
generated
vendored
Normal file
42
node_modules/tedious/lib/always-encrypted/cek-entry.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.CEKEntry = void 0;
|
||||
// This code is based on the `mssql-jdbc` library published under the conditions of MIT license.
|
||||
// Copyright (c) 2019 Microsoft Corporation
|
||||
|
||||
class CEKEntry {
|
||||
constructor(ordinalVal) {
|
||||
this.ordinal = ordinalVal;
|
||||
this.databaseId = 0;
|
||||
this.cekId = 0;
|
||||
this.cekVersion = 0;
|
||||
this.cekMdVersion = Buffer.alloc(0);
|
||||
this.columnEncryptionKeyValues = [];
|
||||
}
|
||||
add(encryptedKey, dbId, keyId, keyVersion, mdVersion, keyPath, keyStoreName, algorithmName) {
|
||||
const encryptionKey = {
|
||||
encryptedKey,
|
||||
dbId,
|
||||
keyId,
|
||||
keyVersion,
|
||||
mdVersion,
|
||||
keyPath,
|
||||
keyStoreName,
|
||||
algorithmName
|
||||
};
|
||||
this.columnEncryptionKeyValues.push(encryptionKey);
|
||||
if (this.databaseId === 0) {
|
||||
this.databaseId = dbId;
|
||||
this.cekId = keyId;
|
||||
this.cekVersion = keyVersion;
|
||||
this.cekMdVersion = mdVersion;
|
||||
} else if (this.databaseId !== dbId || this.cekId !== keyId || this.cekVersion !== keyVersion || !this.cekMdVersion || !mdVersion || this.cekMdVersion.length !== mdVersion.length) {
|
||||
throw new Error('Invalid databaseId, cekId, cekVersion or cekMdVersion.');
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.CEKEntry = CEKEntry;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJDRUtFbnRyeSIsImNvbnN0cnVjdG9yIiwib3JkaW5hbFZhbCIsIm9yZGluYWwiLCJkYXRhYmFzZUlkIiwiY2VrSWQiLCJjZWtWZXJzaW9uIiwiY2VrTWRWZXJzaW9uIiwiQnVmZmVyIiwiYWxsb2MiLCJjb2x1bW5FbmNyeXB0aW9uS2V5VmFsdWVzIiwiYWRkIiwiZW5jcnlwdGVkS2V5IiwiZGJJZCIsImtleUlkIiwia2V5VmVyc2lvbiIsIm1kVmVyc2lvbiIsImtleVBhdGgiLCJrZXlTdG9yZU5hbWUiLCJhbGdvcml0aG1OYW1lIiwiZW5jcnlwdGlvbktleSIsInB1c2giLCJsZW5ndGgiLCJFcnJvciIsImV4cG9ydHMiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvYWx3YXlzLWVuY3J5cHRlZC9jZWstZW50cnkudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gVGhpcyBjb2RlIGlzIGJhc2VkIG9uIHRoZSBgbXNzcWwtamRiY2AgbGlicmFyeSBwdWJsaXNoZWQgdW5kZXIgdGhlIGNvbmRpdGlvbnMgb2YgTUlUIGxpY2Vuc2UuXG4vLyBDb3B5cmlnaHQgKGMpIDIwMTkgTWljcm9zb2Z0IENvcnBvcmF0aW9uXG5cbmltcG9ydCB7IHR5cGUgRW5jcnlwdGlvbktleUluZm8gfSBmcm9tICcuL3R5cGVz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CLFFBQUEsR0FBQUEsUUFBQSJ9
|
||||
1
node_modules/tedious/lib/always-encrypted/cek-entry.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/always-encrypted/cek-entry.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cek-entry.js","names":["CEKEntry","constructor","ordinalVal","ordinal","databaseId","cekId","cekVersion","cekMdVersion","Buffer","alloc","columnEncryptionKeyValues","add","encryptedKey","dbId","keyId","keyVersion","mdVersion","keyPath","keyStoreName","algorithmName","encryptionKey","push","length","Error","exports"],"sources":["../../src/always-encrypted/cek-entry.ts"],"sourcesContent":["// This code is based on the `mssql-jdbc` library published under the conditions of MIT license.\n// Copyright (c) 2019 Microsoft Corporation\n\nimport { type EncryptionKeyInfo } from './types';\n\nexport class CEKEntry {\n declare columnEncryptionKeyValues: EncryptionKeyInfo[];\n declare ordinal: number;\n declare databaseId: number;\n declare cekId: number;\n declare cekVersion: number;\n declare cekMdVersion: Buffer;\n\n constructor(ordinalVal: number) {\n this.ordinal = ordinalVal;\n this.databaseId = 0;\n this.cekId = 0;\n this.cekVersion = 0;\n this.cekMdVersion = Buffer.alloc(0);\n this.columnEncryptionKeyValues = [];\n }\n\n add(encryptedKey: Buffer, dbId: number, keyId: number, keyVersion: number, mdVersion: Buffer, keyPath: string, keyStoreName: string, algorithmName: string): void {\n const encryptionKey: EncryptionKeyInfo = {\n encryptedKey,\n dbId,\n keyId,\n keyVersion,\n mdVersion,\n keyPath,\n keyStoreName,\n algorithmName,\n };\n\n this.columnEncryptionKeyValues.push(encryptionKey);\n\n if (this.databaseId === 0) {\n this.databaseId = dbId;\n this.cekId = keyId;\n this.cekVersion = keyVersion;\n this.cekMdVersion = mdVersion;\n } else if ((this.databaseId !== dbId) || (this.cekId !== keyId) || (this.cekVersion !== keyVersion) || !this.cekMdVersion || !mdVersion || this.cekMdVersion.length !== mdVersion.length) {\n throw new Error('Invalid databaseId, cekId, cekVersion or cekMdVersion.');\n }\n }\n}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tedious/lib/always-encrypted/get-parameter-encryption-metadata.js
generated
vendored
Normal file
90
node_modules/tedious/lib/always-encrypted/get-parameter-encryption-metadata.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/always-encrypted/get-parameter-encryption-metadata.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/always-encrypted/get-parameter-encryption-metadata.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
94
node_modules/tedious/lib/always-encrypted/key-crypto.js
generated
vendored
Normal file
94
node_modules/tedious/lib/always-encrypted/key-crypto.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/always-encrypted/key-crypto.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/always-encrypted/key-crypto.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
21
node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.d.ts
generated
vendored
Normal file
21
node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
export declare class ColumnEncryptionAzureKeyVaultProvider {
|
||||
readonly name: string;
|
||||
private url;
|
||||
private readonly rsaEncryptionAlgorithmWithOAEPForAKV;
|
||||
private readonly firstVersion;
|
||||
private credentials;
|
||||
private readonly azureKeyVaultDomainName;
|
||||
private keyClient;
|
||||
constructor(clientId: string, clientKey: string, tenantId: string);
|
||||
decryptColumnEncryptionKey(masterKeyPath: string, encryptionAlgorithm: string, encryptedColumnEncryptionKey: Buffer): Promise<Buffer>;
|
||||
encryptColumnEncryptionKey(masterKeyPath: string, encryptionAlgorithm: string, columnEncryptionKey: Buffer): Promise<Buffer>;
|
||||
private getMasterKey;
|
||||
private createKeyClient;
|
||||
private createCryptoClient;
|
||||
private parsePath;
|
||||
private azureKeyVaultSignedHashedData;
|
||||
private azureKeyVaultWrap;
|
||||
private azureKeyVaultUnWrap;
|
||||
private getAKVKeySize;
|
||||
private validateEncryptionAlgorithm;
|
||||
}
|
||||
247
node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.js
generated
vendored
Normal file
247
node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
36
node_modules/tedious/lib/always-encrypted/symmetric-key-cache.js
generated
vendored
Normal file
36
node_modules/tedious/lib/always-encrypted/symmetric-key-cache.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/always-encrypted/symmetric-key-cache.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/always-encrypted/symmetric-key-cache.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"symmetric-key-cache.js","names":["_symmetricKey","_interopRequireDefault","require","_lruCache","obj","__esModule","default","cache","LRU","getKey","keyInfo","options","trustedServerNameAE","Error","serverName","keyLookupValue","Buffer","from","encryptedKey","toString","keyStoreName","has","get","provider","encryptionKeyStoreProviders","plaintextKey","decryptColumnEncryptionKey","keyPath","algorithmName","encryptionKey","SymmetricKey","columnEncryptionKeyCacheTTL","set","exports"],"sources":["../../src/always-encrypted/symmetric-key-cache.ts"],"sourcesContent":["// This code is based on the `mssql-jdbc` library published under the conditions of MIT license.\n// Copyright (c) 2019 Microsoft Corporation\n\nimport { type EncryptionKeyInfo } from './types';\nimport SymmetricKey from './symmetric-key';\nimport { type InternalConnectionOptions as ConnectionOptions } from '../connection';\nimport LRU from 'lru-cache';\n\nconst cache = new LRU<string, SymmetricKey>(0);\n\nexport const getKey = async (keyInfo: EncryptionKeyInfo, options: ConnectionOptions): Promise<SymmetricKey> => {\n if (!options.trustedServerNameAE) {\n throw new Error('Server name should not be null in getKey');\n }\n\n const serverName: string = options.trustedServerNameAE;\n\n const keyLookupValue = `${serverName}:${Buffer.from(keyInfo.encryptedKey).toString('base64')}:${keyInfo.keyStoreName}`;\n\n if (cache.has(keyLookupValue)) {\n return cache.get(keyLookupValue) as SymmetricKey;\n } else {\n const provider = options.encryptionKeyStoreProviders && options.encryptionKeyStoreProviders[keyInfo.keyStoreName];\n if (!provider) {\n throw new Error(`Failed to decrypt a column encryption key. Invalid key store provider name: ${keyInfo.keyStoreName}. A key store provider name must denote either a system key store provider or a registered custom key store provider. Valid (currently registered) custom key store provider names are: ${options.encryptionKeyStoreProviders}. Please verify key store provider information in column master key definitions in the database, and verify all custom key store providers used in your application are registered properly.`);\n }\n\n const plaintextKey: Buffer = await provider.decryptColumnEncryptionKey(keyInfo.keyPath, keyInfo.algorithmName, keyInfo.encryptedKey);\n\n const encryptionKey = new SymmetricKey(plaintextKey);\n\n if (options.columnEncryptionKeyCacheTTL > 0) {\n cache.set(keyLookupValue, encryptionKey, options.columnEncryptionKeyCacheTTL);\n }\n\n return encryptionKey;\n }\n};\n"],"mappings":";;;;;;AAIA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA4B,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAN5B;AACA;;AAOA,MAAMG,KAAK,GAAG,IAAIC,iBAAG,CAAuB,CAAC,CAAC;AAEvC,MAAMC,MAAM,GAAG,MAAAA,CAAOC,OAA0B,EAAEC,OAA0B,KAA4B;EAC7G,IAAI,CAACA,OAAO,CAACC,mBAAmB,EAAE;IAChC,MAAM,IAAIC,KAAK,CAAC,0CAA0C,CAAC;EAC7D;EAEA,MAAMC,UAAkB,GAAGH,OAAO,CAACC,mBAAmB;EAEtD,MAAMG,cAAc,GAAI,GAAED,UAAW,IAAGE,MAAM,CAACC,IAAI,CAACP,OAAO,CAACQ,YAAY,CAAC,CAACC,QAAQ,CAAC,QAAQ,CAAE,IAAGT,OAAO,CAACU,YAAa,EAAC;EAEtH,IAAIb,KAAK,CAACc,GAAG,CAACN,cAAc,CAAC,EAAE;IAC7B,OAAOR,KAAK,CAACe,GAAG,CAACP,cAAc,CAAC;EAClC,CAAC,MAAM;IACL,MAAMQ,QAAQ,GAAGZ,OAAO,CAACa,2BAA2B,IAAIb,OAAO,CAACa,2BAA2B,CAACd,OAAO,CAACU,YAAY,CAAC;IACjH,IAAI,CAACG,QAAQ,EAAE;MACb,MAAM,IAAIV,KAAK,CAAE,+EAA8EH,OAAO,CAACU,YAAa,2LAA0LT,OAAO,CAACa,2BAA4B,8LAA6L,CAAC;IAClhB;IAEA,MAAMC,YAAoB,GAAG,MAAMF,QAAQ,CAACG,0BAA0B,CAAChB,OAAO,CAACiB,OAAO,EAAEjB,OAAO,CAACkB,aAAa,EAAElB,OAAO,CAACQ,YAAY,CAAC;IAEpI,MAAMW,aAAa,GAAG,IAAIC,qBAAY,CAACL,YAAY,CAAC;IAEpD,IAAId,OAAO,CAACoB,2BAA2B,GAAG,CAAC,EAAE;MAC3CxB,KAAK,CAACyB,GAAG,CAACjB,cAAc,EAAEc,aAAa,EAAElB,OAAO,CAACoB,2BAA2B,CAAC;IAC/E;IAEA,OAAOF,aAAa;EACtB;AACF,CAAC;AAACI,OAAA,CAAAxB,MAAA,GAAAA,MAAA"}
|
||||
25
node_modules/tedious/lib/always-encrypted/symmetric-key.js
generated
vendored
Normal file
25
node_modules/tedious/lib/always-encrypted/symmetric-key.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.SymmetricKey = void 0;
|
||||
// This code is based on the `mssql-jdbc` library published under the conditions of MIT license.
|
||||
// Copyright (c) 2019 Microsoft Corporation
|
||||
|
||||
class SymmetricKey {
|
||||
constructor(rootKey) {
|
||||
if (!rootKey) {
|
||||
throw new Error('Column encryption key cannot be null.');
|
||||
} else if (0 === rootKey.length) {
|
||||
throw new Error('Empty column encryption key specified.');
|
||||
}
|
||||
this.rootKey = rootKey;
|
||||
}
|
||||
zeroOutKey() {
|
||||
this.rootKey = Buffer.alloc(this.rootKey.length);
|
||||
}
|
||||
}
|
||||
exports.SymmetricKey = SymmetricKey;
|
||||
var _default = exports.default = SymmetricKey;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJTeW1tZXRyaWNLZXkiLCJjb25zdHJ1Y3RvciIsInJvb3RLZXkiLCJFcnJvciIsImxlbmd0aCIsInplcm9PdXRLZXkiLCJCdWZmZXIiLCJhbGxvYyIsImV4cG9ydHMiLCJfZGVmYXVsdCIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvYWx3YXlzLWVuY3J5cHRlZC9zeW1tZXRyaWMta2V5LnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIFRoaXMgY29kZSBpcyBiYXNlZCBvbiB0aGUgYG1zc3FsLWpkYmNgIGxpYnJhcnkgcHVibGlzaGVkIHVuZGVyIHRoZSBjb25kaXRpb25zIG9mIE1JVCBsaWNlbnNlLlxuLy8gQ29weXJpZ2h0IChjKSAyMDE5IE1pY3Jvc29mdCBDb3Jwb3JhdGlvblxuXG5leHBvcnQgY2xhc3MgU3ltbWV0cmljS2V5IHtcbiAgZGVjbGFyZSByb290S2V5OiBCdWZmZXI7XG5cbiAgY29uc3RydWN0b3Iocm9vdEtleTogQnVmZmVyKSB7XG4gICAgaWYgKCFyb290S2V5KSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ0NvbHVtbiBlbmNyeXB0aW9uIGtleSBjYW5ub3QgYmUgbnVsbC4nKTtcbiAgICB9IGVsc2UgaWYgKDAgPT09IHJvb3RLZXkubGVuZ3RoKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ0VtcHR5IGNvbHVtbiBlbmNyeXB0aW9uIGtleSBzcGVjaWZpZWQuJyk7XG4gICAgfVxuICAgIHRoaXMucm9vdEtleSA9IHJvb3RLZXk7XG4gIH1cblxuICB6ZXJvT3V0S2V5KCkge1xuICAgIHRoaXMucm9vdEtleSA9IEJ1ZmZlci5hbGxvYyh0aGlzLnJvb3RLZXkubGVuZ3RoKTtcbiAgfVxufVxuZXhwb3J0IGRlZmF1bHQgU3ltbWV0cmljS2V5O1xuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQTtBQUNBOztBQUVPLE1BQU1BLFlBQVksQ0FBQztFQUd4QkMsV0FBV0EsQ0FBQ0MsT0FBZSxFQUFFO0lBQzNCLElBQUksQ0FBQ0EsT0FBTyxFQUFFO01BQ1osTUFBTSxJQUFJQyxLQUFLLENBQUMsdUNBQXVDLENBQUM7SUFDMUQsQ0FBQyxNQUFNLElBQUksQ0FBQyxLQUFLRCxPQUFPLENBQUNFLE1BQU0sRUFBRTtNQUMvQixNQUFNLElBQUlELEtBQUssQ0FBQyx3Q0FBd0MsQ0FBQztJQUMzRDtJQUNBLElBQUksQ0FBQ0QsT0FBTyxHQUFHQSxPQUFPO0VBQ3hCO0VBRUFHLFVBQVVBLENBQUEsRUFBRztJQUNYLElBQUksQ0FBQ0gsT0FBTyxHQUFHSSxNQUFNLENBQUNDLEtBQUssQ0FBQyxJQUFJLENBQUNMLE9BQU8sQ0FBQ0UsTUFBTSxDQUFDO0VBQ2xEO0FBQ0Y7QUFBQ0ksT0FBQSxDQUFBUixZQUFBLEdBQUFBLFlBQUE7QUFBQSxJQUFBUyxRQUFBLEdBQUFELE9BQUEsQ0FBQUUsT0FBQSxHQUNjVixZQUFZIn0=
|
||||
1
node_modules/tedious/lib/always-encrypted/symmetric-key.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/always-encrypted/symmetric-key.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"symmetric-key.js","names":["SymmetricKey","constructor","rootKey","Error","length","zeroOutKey","Buffer","alloc","exports","_default","default"],"sources":["../../src/always-encrypted/symmetric-key.ts"],"sourcesContent":["// This code is based on the `mssql-jdbc` library published under the conditions of MIT license.\n// Copyright (c) 2019 Microsoft Corporation\n\nexport class SymmetricKey {\n declare rootKey: Buffer;\n\n constructor(rootKey: Buffer) {\n if (!rootKey) {\n throw new Error('Column encryption key cannot be null.');\n } else if (0 === rootKey.length) {\n throw new Error('Empty column encryption key specified.');\n }\n this.rootKey = rootKey;\n }\n\n zeroOutKey() {\n this.rootKey = Buffer.alloc(this.rootKey.length);\n }\n}\nexport default SymmetricKey;\n"],"mappings":";;;;;;AAAA;AACA;;AAEO,MAAMA,YAAY,CAAC;EAGxBC,WAAWA,CAACC,OAAe,EAAE;IAC3B,IAAI,CAACA,OAAO,EAAE;MACZ,MAAM,IAAIC,KAAK,CAAC,uCAAuC,CAAC;IAC1D,CAAC,MAAM,IAAI,CAAC,KAAKD,OAAO,CAACE,MAAM,EAAE;MAC/B,MAAM,IAAID,KAAK,CAAC,wCAAwC,CAAC;IAC3D;IACA,IAAI,CAACD,OAAO,GAAGA,OAAO;EACxB;EAEAG,UAAUA,CAAA,EAAG;IACX,IAAI,CAACH,OAAO,GAAGI,MAAM,CAACC,KAAK,CAAC,IAAI,CAACL,OAAO,CAACE,MAAM,CAAC;EAClD;AACF;AAACI,OAAA,CAAAR,YAAA,GAAAA,YAAA;AAAA,IAAAS,QAAA,GAAAD,OAAA,CAAAE,OAAA,GACcV,YAAY"}
|
||||
73
node_modules/tedious/lib/always-encrypted/types.d.ts
generated
vendored
Normal file
73
node_modules/tedious/lib/always-encrypted/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
import { CEKEntry } from './cek-entry';
|
||||
import { type BaseMetadata } from '../metadata-parser';
|
||||
export interface EncryptionKeyInfo {
|
||||
encryptedKey: Buffer;
|
||||
dbId: number;
|
||||
keyId: number;
|
||||
keyVersion: number;
|
||||
mdVersion: Buffer;
|
||||
keyPath: string;
|
||||
keyStoreName: string;
|
||||
algorithmName: string;
|
||||
}
|
||||
export declare enum SQLServerEncryptionType {
|
||||
Deterministic = 1,
|
||||
Randomized = 2,
|
||||
PlainText = 0
|
||||
}
|
||||
export interface EncryptionAlgorithm {
|
||||
encryptData: (plainText: Buffer) => Buffer;
|
||||
decryptData: (cipherText: Buffer) => Buffer;
|
||||
}
|
||||
export interface CryptoMetadata {
|
||||
cekEntry?: CEKEntry;
|
||||
cipherAlgorithmId: number;
|
||||
cipherAlgorithmName?: string;
|
||||
normalizationRuleVersion: Buffer;
|
||||
encryptionKeyInfo?: EncryptionKeyInfo;
|
||||
ordinal: number;
|
||||
encryptionType: SQLServerEncryptionType;
|
||||
cipherAlgorithm?: EncryptionAlgorithm;
|
||||
baseTypeInfo?: BaseMetadata;
|
||||
}
|
||||
export interface HashMap<T> {
|
||||
[hash: string]: T;
|
||||
}
|
||||
export declare enum DescribeParameterEncryptionResultSet1 {
|
||||
KeyOrdinal = 0,
|
||||
DbId = 1,
|
||||
KeyId = 2,
|
||||
KeyVersion = 3,
|
||||
KeyMdVersion = 4,
|
||||
EncryptedKey = 5,
|
||||
ProviderName = 6,
|
||||
KeyPath = 7,
|
||||
KeyEncryptionAlgorithm = 8
|
||||
}
|
||||
export declare enum DescribeParameterEncryptionResultSet2 {
|
||||
ParameterOrdinal = 0,
|
||||
ParameterName = 1,
|
||||
ColumnEncryptionAlgorithm = 2,
|
||||
ColumnEncrytionType = 3,
|
||||
ColumnEncryptionKeyOrdinal = 4,
|
||||
NormalizationRuleVersion = 5
|
||||
}
|
||||
export declare enum SQLServerStatementColumnEncryptionSetting {
|
||||
/**
|
||||
* if "Column Encryption Setting=Enabled" in the connection string, use Enabled. Otherwise, maps to Disabled.
|
||||
*/
|
||||
UseConnectionSetting = 0,
|
||||
/**
|
||||
* Enables TCE for the command. Overrides the connection level setting for this command.
|
||||
*/
|
||||
Enabled = 1,
|
||||
/**
|
||||
* Parameters will not be encrypted, only the ResultSet will be decrypted. This is an optimization for queries that
|
||||
* do not pass any encrypted input parameters. Overrides the connection level setting for this command.
|
||||
*/
|
||||
ResultSetOnly = 2,
|
||||
/**
|
||||
* Disables TCE for the command.Overrides the connection level setting for this command.
|
||||
*/
|
||||
Disabled = 3
|
||||
}
|
||||
48
node_modules/tedious/lib/always-encrypted/types.js
generated
vendored
Normal file
48
node_modules/tedious/lib/always-encrypted/types.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/always-encrypted/types.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/always-encrypted/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","names":["SQLServerEncryptionType","exports","DescribeParameterEncryptionResultSet1","DescribeParameterEncryptionResultSet2","SQLServerStatementColumnEncryptionSetting"],"sources":["../../src/always-encrypted/types.ts"],"sourcesContent":["// This code is based on the `mssql-jdbc` library published under the conditions of MIT license.\n// Copyright (c) 2019 Microsoft Corporation\n\nimport { CEKEntry } from './cek-entry';\nimport { type BaseMetadata } from '../metadata-parser';\n\nexport interface EncryptionKeyInfo {\n encryptedKey: Buffer;\n dbId: number;\n keyId: number;\n keyVersion: number;\n mdVersion: Buffer;\n keyPath: string;\n keyStoreName: string;\n algorithmName: string;\n}\n\nexport enum SQLServerEncryptionType {\n Deterministic = 1,\n Randomized = 2,\n PlainText = 0,\n}\n\nexport interface EncryptionAlgorithm {\n encryptData: (plainText: Buffer) => Buffer;\n decryptData: (cipherText: Buffer) => Buffer;\n}\n\nexport interface CryptoMetadata {\n cekEntry?: CEKEntry;\n cipherAlgorithmId: number;\n cipherAlgorithmName?: string;\n normalizationRuleVersion: Buffer;\n encryptionKeyInfo?: EncryptionKeyInfo;\n ordinal: number;\n encryptionType: SQLServerEncryptionType;\n cipherAlgorithm?: EncryptionAlgorithm;\n baseTypeInfo?: BaseMetadata;\n}\n\nexport interface HashMap<T> {\n [hash: string]: T;\n}\n\n\n// Fields in the first resultset of \"sp_describe_parameter_encryption\"\n// We expect the server to return the fields in the resultset in the same order as mentioned below.\n// If the server changes the below order, then transparent parameter encryption will break.\nexport enum DescribeParameterEncryptionResultSet1 {\n KeyOrdinal,\n DbId,\n KeyId,\n KeyVersion,\n KeyMdVersion,\n EncryptedKey,\n ProviderName,\n KeyPath,\n KeyEncryptionAlgorithm\n}\n\n\n// Fields in the second resultset of \"sp_describe_parameter_encryption\"\n// We expect the server to return the fields in the resultset in the same order as mentioned below.\n// If the server changes the below order, then transparent parameter encryption will break.\nexport enum DescribeParameterEncryptionResultSet2 {\n ParameterOrdinal,\n ParameterName,\n ColumnEncryptionAlgorithm,\n ColumnEncrytionType,\n ColumnEncryptionKeyOrdinal,\n NormalizationRuleVersion\n}\n\nexport enum SQLServerStatementColumnEncryptionSetting {\n /**\n * if \"Column Encryption Setting=Enabled\" in the connection string, use Enabled. Otherwise, maps to Disabled.\n */\n UseConnectionSetting,\n /**\n * Enables TCE for the command. Overrides the connection level setting for this command.\n */\n Enabled,\n /**\n * Parameters will not be encrypted, only the ResultSet will be decrypted. This is an optimization for queries that\n * do not pass any encrypted input parameters. Overrides the connection level setting for this command.\n */\n ResultSetOnly,\n /**\n * Disables TCE for the command.Overrides the connection level setting for this command.\n */\n Disabled,\n}\n"],"mappings":";;;;;;AAAA;AACA;AAAA,IAgBYA,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,0BAAvBA,uBAAuB;EAAvBA,uBAAuB,CAAvBA,uBAAuB;EAAvBA,uBAAuB,CAAvBA,uBAAuB;EAAvBA,uBAAuB,CAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;AA4BnC;AACA;AACA;AAAA,IACYE,qCAAqC,GAAAD,OAAA,CAAAC,qCAAA,0BAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAAA,OAArCA,qCAAqC;AAAA,OAajD;AACA;AACA;AAAA,IACYC,qCAAqC,GAAAF,OAAA,CAAAE,qCAAA,0BAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAArCA,qCAAqC,CAArCA,qCAAqC;EAAA,OAArCA,qCAAqC;AAAA;AAAA,IASrCC,yCAAyC,GAAAH,OAAA,CAAAG,yCAAA,0BAAzCA,yCAAyC;EAAzCA,yCAAyC,CAAzCA,yCAAyC;EAAzCA,yCAAyC,CAAzCA,yCAAyC;EAAzCA,yCAAyC,CAAzCA,yCAAyC;EAAzCA,yCAAyC,CAAzCA,yCAAyC;EAAA,OAAzCA,yCAAyC;AAAA"}
|
||||
23
node_modules/tedious/lib/always-encrypted/utils.js
generated
vendored
Normal file
23
node_modules/tedious/lib/always-encrypted/utils.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.shouldHonorAE = void 0;
|
||||
var _types = require("./types");
|
||||
// This code is based on the `mssql-jdbc` library published under the conditions of MIT license.
|
||||
// Copyright (c) 2019 Microsoft Corporation
|
||||
|
||||
const shouldHonorAE = (stmtColumnEncryptionSetting, columnEncryptionSetting) => {
|
||||
switch (stmtColumnEncryptionSetting) {
|
||||
case _types.SQLServerStatementColumnEncryptionSetting.Disabled:
|
||||
case _types.SQLServerStatementColumnEncryptionSetting.ResultSetOnly:
|
||||
return false;
|
||||
case _types.SQLServerStatementColumnEncryptionSetting.Enabled:
|
||||
return true;
|
||||
default:
|
||||
return columnEncryptionSetting;
|
||||
}
|
||||
};
|
||||
exports.shouldHonorAE = shouldHonorAE;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfdHlwZXMiLCJyZXF1aXJlIiwic2hvdWxkSG9ub3JBRSIsInN0bXRDb2x1bW5FbmNyeXB0aW9uU2V0dGluZyIsImNvbHVtbkVuY3J5cHRpb25TZXR0aW5nIiwiU1FMU2VydmVyU3RhdGVtZW50Q29sdW1uRW5jcnlwdGlvblNldHRpbmciLCJEaXNhYmxlZCIsIlJlc3VsdFNldE9ubHkiLCJFbmFibGVkIiwiZXhwb3J0cyJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hbHdheXMtZW5jcnlwdGVkL3V0aWxzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIFRoaXMgY29kZSBpcyBiYXNlZCBvbiB0aGUgYG1zc3FsLWpkYmNgIGxpYnJhcnkgcHVibGlzaGVkIHVuZGVyIHRoZSBjb25kaXRpb25zIG9mIE1JVCBsaWNlbnNlLlxuLy8gQ29weXJpZ2h0IChjKSAyMDE5IE1pY3Jvc29mdCBDb3Jwb3JhdGlvblxuXG5pbXBvcnQgeyBTUUxTZXJ2ZXJTdGF0ZW1lbnRDb2x1bW5FbmNyeXB0aW9uU2V0dGluZyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3Qgc2hvdWxkSG9ub3JBRSA9IChzdG10Q29sdW1uRW5jcnlwdGlvblNldHRpbmc6IFNRTFNlcnZlclN0YXRlbWVudENvbHVtbkVuY3J5cHRpb25TZXR0aW5nLCBjb2x1bW5FbmNyeXB0aW9uU2V0dGluZzogYm9vbGVhbik6IGJvb2xlYW4gPT4ge1xuICBzd2l0Y2ggKHN0bXRDb2x1bW5FbmNyeXB0aW9uU2V0dGluZykge1xuICAgIGNhc2UgU1FMU2VydmVyU3RhdGVtZW50Q29sdW1uRW5jcnlwdGlvblNldHRpbmcuRGlzYWJsZWQ6XG4gICAgY2FzZSBTUUxTZXJ2ZXJTdGF0ZW1lbnRDb2x1bW5FbmNyeXB0aW9uU2V0dGluZy5SZXN1bHRTZXRPbmx5OlxuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIGNhc2UgU1FMU2VydmVyU3RhdGVtZW50Q29sdW1uRW5jcnlwdGlvblNldHRpbmcuRW5hYmxlZDpcbiAgICAgIHJldHVybiB0cnVlO1xuICAgIGRlZmF1bHQ6XG4gICAgICByZXR1cm4gY29sdW1uRW5jcnlwdGlvblNldHRpbmc7XG4gIH1cbn07XG4iXSwibWFwcGluZ3MiOiI7Ozs7OztBQUdBLElBQUFBLE1BQUEsR0FBQUMsT0FBQTtBQUhBO0FBQ0E7O0FBSU8sTUFBTUMsYUFBYSxHQUFHQSxDQUFDQywyQkFBc0UsRUFBRUMsdUJBQWdDLEtBQWM7RUFDbEosUUFBUUQsMkJBQTJCO0lBQ2pDLEtBQUtFLGdEQUF5QyxDQUFDQyxRQUFRO0lBQ3ZELEtBQUtELGdEQUF5QyxDQUFDRSxhQUFhO01BQzFELE9BQU8sS0FBSztJQUNkLEtBQUtGLGdEQUF5QyxDQUFDRyxPQUFPO01BQ3BELE9BQU8sSUFBSTtJQUNiO01BQ0UsT0FBT0osdUJBQXVCO0VBQ2xDO0FBQ0YsQ0FBQztBQUFDSyxPQUFBLENBQUFQLGFBQUEsR0FBQUEsYUFBQSJ9
|
||||
1
node_modules/tedious/lib/always-encrypted/utils.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/always-encrypted/utils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils.js","names":["_types","require","shouldHonorAE","stmtColumnEncryptionSetting","columnEncryptionSetting","SQLServerStatementColumnEncryptionSetting","Disabled","ResultSetOnly","Enabled","exports"],"sources":["../../src/always-encrypted/utils.ts"],"sourcesContent":["// This code is based on the `mssql-jdbc` library published under the conditions of MIT license.\n// Copyright (c) 2019 Microsoft Corporation\n\nimport { SQLServerStatementColumnEncryptionSetting } from './types';\n\nexport const shouldHonorAE = (stmtColumnEncryptionSetting: SQLServerStatementColumnEncryptionSetting, columnEncryptionSetting: boolean): boolean => {\n switch (stmtColumnEncryptionSetting) {\n case SQLServerStatementColumnEncryptionSetting.Disabled:\n case SQLServerStatementColumnEncryptionSetting.ResultSetOnly:\n return false;\n case SQLServerStatementColumnEncryptionSetting.Enabled:\n return true;\n default:\n return columnEncryptionSetting;\n }\n};\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;;AAIO,MAAMC,aAAa,GAAGA,CAACC,2BAAsE,EAAEC,uBAAgC,KAAc;EAClJ,QAAQD,2BAA2B;IACjC,KAAKE,gDAAyC,CAACC,QAAQ;IACvD,KAAKD,gDAAyC,CAACE,aAAa;MAC1D,OAAO,KAAK;IACd,KAAKF,gDAAyC,CAACG,OAAO;MACpD,OAAO,IAAI;IACb;MACE,OAAOJ,uBAAuB;EAClC;AACF,CAAC;AAACK,OAAA,CAAAP,aAAA,GAAAA,aAAA"}
|
||||
8
node_modules/tedious/lib/bulk-load-payload.d.ts
generated
vendored
Normal file
8
node_modules/tedious/lib/bulk-load-payload.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import BulkLoad from './bulk-load';
|
||||
export declare class BulkLoadPayload implements AsyncIterable<Buffer> {
|
||||
bulkLoad: BulkLoad;
|
||||
iterator: AsyncIterableIterator<Buffer>;
|
||||
constructor(bulkLoad: BulkLoad);
|
||||
[Symbol.asyncIterator](): AsyncIterableIterator<Buffer>;
|
||||
toString(indent?: string): string;
|
||||
}
|
||||
23
node_modules/tedious/lib/bulk-load-payload.js
generated
vendored
Normal file
23
node_modules/tedious/lib/bulk-load-payload.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.BulkLoadPayload = void 0;
|
||||
class BulkLoadPayload {
|
||||
constructor(bulkLoad) {
|
||||
this.bulkLoad = bulkLoad;
|
||||
|
||||
// We need to grab the iterator here so that `error` event handlers are set up
|
||||
// as early as possible (and are not potentially lost).
|
||||
this.iterator = this.bulkLoad.rowToPacketTransform[Symbol.asyncIterator]();
|
||||
}
|
||||
[Symbol.asyncIterator]() {
|
||||
return this.iterator;
|
||||
}
|
||||
toString(indent = '') {
|
||||
return indent + 'BulkLoad';
|
||||
}
|
||||
}
|
||||
exports.BulkLoadPayload = BulkLoadPayload;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJCdWxrTG9hZFBheWxvYWQiLCJjb25zdHJ1Y3RvciIsImJ1bGtMb2FkIiwiaXRlcmF0b3IiLCJyb3dUb1BhY2tldFRyYW5zZm9ybSIsIlN5bWJvbCIsImFzeW5jSXRlcmF0b3IiLCJ0b1N0cmluZyIsImluZGVudCIsImV4cG9ydHMiXSwic291cmNlcyI6WyIuLi9zcmMvYnVsay1sb2FkLXBheWxvYWQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJ1bGtMb2FkIGZyb20gJy4vYnVsay1sb2FkJztcblxuZXhwb3J0IGNsYXNzIEJ1bGtMb2FkUGF5bG9hZCBpbXBsZW1lbnRzIEFzeW5jSXRlcmFibGU8QnVmZmVyPiB7XG4gIGRlY2xhcmUgYnVsa0xvYWQ6IEJ1bGtMb2FkO1xuICBkZWNsYXJlIGl0ZXJhdG9yOiBBc3luY0l0ZXJhYmxlSXRlcmF0b3I8QnVmZmVyPjtcblxuICBjb25zdHJ1Y3RvcihidWxrTG9hZDogQnVsa0xvYWQpIHtcbiAgICB0aGlzLmJ1bGtMb2FkID0gYnVsa0xvYWQ7XG5cbiAgICAvLyBXZSBuZWVkIHRvIGdyYWIgdGhlIGl0ZXJhdG9yIGhlcmUgc28gdGhhdCBgZXJyb3JgIGV2ZW50IGhhbmRsZXJzIGFyZSBzZXQgdXBcbiAgICAvLyBhcyBlYXJseSBhcyBwb3NzaWJsZSAoYW5kIGFyZSBub3QgcG90ZW50aWFsbHkgbG9zdCkuXG4gICAgdGhpcy5pdGVyYXRvciA9IHRoaXMuYnVsa0xvYWQucm93VG9QYWNrZXRUcmFuc2Zvcm1bU3ltYm9sLmFzeW5jSXRlcmF0b3JdKCk7XG4gIH1cblxuICBbU3ltYm9sLmFzeW5jSXRlcmF0b3JdKCkge1xuICAgIHJldHVybiB0aGlzLml0ZXJhdG9yO1xuICB9XG5cbiAgdG9TdHJpbmcoaW5kZW50ID0gJycpIHtcbiAgICByZXR1cm4gaW5kZW50ICsgKCdCdWxrTG9hZCcpO1xuICB9XG59XG4iXSwibWFwcGluZ3MiOiI7Ozs7OztBQUVPLE1BQU1BLGVBQWUsQ0FBa0M7RUFJNURDLFdBQVdBLENBQUNDLFFBQWtCLEVBQUU7SUFDOUIsSUFBSSxDQUFDQSxRQUFRLEdBQUdBLFFBQVE7O0lBRXhCO0lBQ0E7SUFDQSxJQUFJLENBQUNDLFFBQVEsR0FBRyxJQUFJLENBQUNELFFBQVEsQ0FBQ0Usb0JBQW9CLENBQUNDLE1BQU0sQ0FBQ0MsYUFBYSxDQUFDLENBQUMsQ0FBQztFQUM1RTtFQUVBLENBQUNELE1BQU0sQ0FBQ0MsYUFBYSxJQUFJO0lBQ3ZCLE9BQU8sSUFBSSxDQUFDSCxRQUFRO0VBQ3RCO0VBRUFJLFFBQVFBLENBQUNDLE1BQU0sR0FBRyxFQUFFLEVBQUU7SUFDcEIsT0FBT0EsTUFBTSxHQUFJLFVBQVc7RUFDOUI7QUFDRjtBQUFDQyxPQUFBLENBQUFULGVBQUEsR0FBQUEsZUFBQSJ9
|
||||
1
node_modules/tedious/lib/bulk-load-payload.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/bulk-load-payload.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bulk-load-payload.js","names":["BulkLoadPayload","constructor","bulkLoad","iterator","rowToPacketTransform","Symbol","asyncIterator","toString","indent","exports"],"sources":["../src/bulk-load-payload.ts"],"sourcesContent":["import BulkLoad from './bulk-load';\n\nexport class BulkLoadPayload implements AsyncIterable<Buffer> {\n declare bulkLoad: BulkLoad;\n declare iterator: AsyncIterableIterator<Buffer>;\n\n constructor(bulkLoad: BulkLoad) {\n this.bulkLoad = bulkLoad;\n\n // We need to grab the iterator here so that `error` event handlers are set up\n // as early as possible (and are not potentially lost).\n this.iterator = this.bulkLoad.rowToPacketTransform[Symbol.asyncIterator]();\n }\n\n [Symbol.asyncIterator]() {\n return this.iterator;\n }\n\n toString(indent = '') {\n return indent + ('BulkLoad');\n }\n}\n"],"mappings":";;;;;;AAEO,MAAMA,eAAe,CAAkC;EAI5DC,WAAWA,CAACC,QAAkB,EAAE;IAC9B,IAAI,CAACA,QAAQ,GAAGA,QAAQ;;IAExB;IACA;IACA,IAAI,CAACC,QAAQ,GAAG,IAAI,CAACD,QAAQ,CAACE,oBAAoB,CAACC,MAAM,CAACC,aAAa,CAAC,CAAC,CAAC;EAC5E;EAEA,CAACD,MAAM,CAACC,aAAa,IAAI;IACvB,OAAO,IAAI,CAACH,QAAQ;EACtB;EAEAI,QAAQA,CAACC,MAAM,GAAG,EAAE,EAAE;IACpB,OAAOA,MAAM,GAAI,UAAW;EAC9B;AACF;AAACC,OAAA,CAAAT,eAAA,GAAAA,eAAA"}
|
||||
275
node_modules/tedious/lib/bulk-load.d.ts
generated
vendored
Normal file
275
node_modules/tedious/lib/bulk-load.d.ts
generated
vendored
Normal file
@@ -0,0 +1,275 @@
|
||||
import { EventEmitter } from 'events';
|
||||
import Connection, { type InternalConnectionOptions } from './connection';
|
||||
import { Transform } from 'stream';
|
||||
import { type DataType, type Parameter } from './data-type';
|
||||
import { Collation } from './collation';
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
interface InternalOptions {
|
||||
checkConstraints: boolean;
|
||||
fireTriggers: boolean;
|
||||
keepNulls: boolean;
|
||||
lockTable: boolean;
|
||||
order: {
|
||||
[columnName: string]: 'ASC' | 'DESC';
|
||||
};
|
||||
}
|
||||
export interface Options {
|
||||
/**
|
||||
* Honors constraints during bulk load, using T-SQL
|
||||
* [CHECK_CONSTRAINTS](https://technet.microsoft.com/en-us/library/ms186247(v=sql.105).aspx).
|
||||
* (default: `false`)
|
||||
*/
|
||||
checkConstraints?: InternalOptions['checkConstraints'] | undefined;
|
||||
/**
|
||||
* Honors insert triggers during bulk load, using the T-SQL [FIRE_TRIGGERS](https://technet.microsoft.com/en-us/library/ms187640(v=sql.105).aspx). (default: `false`)
|
||||
*/
|
||||
fireTriggers?: InternalOptions['fireTriggers'] | undefined;
|
||||
/**
|
||||
* Honors null value passed, ignores the default values set on table, using T-SQL [KEEP_NULLS](https://msdn.microsoft.com/en-us/library/ms187887(v=sql.120).aspx). (default: `false`)
|
||||
*/
|
||||
keepNulls?: InternalOptions['keepNulls'] | undefined;
|
||||
/**
|
||||
* Places a bulk update(BU) lock on table while performing bulk load, using T-SQL [TABLOCK](https://technet.microsoft.com/en-us/library/ms180876(v=sql.105).aspx). (default: `false`)
|
||||
*/
|
||||
lockTable?: InternalOptions['lockTable'] | undefined;
|
||||
/**
|
||||
* Specifies the ordering of the data to possibly increase bulk insert performance, using T-SQL [ORDER](https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms177468(v=sql.105)). (default: `{}`)
|
||||
*/
|
||||
order?: InternalOptions['order'] | undefined;
|
||||
}
|
||||
export type Callback =
|
||||
/**
|
||||
* A function which will be called after the [[BulkLoad]] finishes executing.
|
||||
*
|
||||
* @param rowCount the number of rows inserted
|
||||
*/
|
||||
(err: Error | undefined | null, rowCount?: number) => void;
|
||||
interface Column extends Parameter {
|
||||
objName: string;
|
||||
collation: Collation | undefined;
|
||||
}
|
||||
interface ColumnOptions {
|
||||
output?: boolean;
|
||||
/**
|
||||
* For VarChar, NVarChar, VarBinary. Use length as `Infinity` for VarChar(max), NVarChar(max) and VarBinary(max).
|
||||
*/
|
||||
length?: number;
|
||||
/**
|
||||
* For Numeric, Decimal.
|
||||
*/
|
||||
precision?: number;
|
||||
/**
|
||||
* For Numeric, Decimal, Time, DateTime2, DateTimeOffset.
|
||||
*/
|
||||
scale?: number;
|
||||
/**
|
||||
* If the name of the column is different from the name of the property found on `rowObj` arguments passed to [[addRow]], then you can use this option to specify the property name.
|
||||
*/
|
||||
objName?: string;
|
||||
/**
|
||||
* Indicates whether the column accepts NULL values.
|
||||
*/
|
||||
nullable?: boolean;
|
||||
}
|
||||
declare class RowTransform extends Transform {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
columnMetadataWritten: boolean;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
bulkLoad: BulkLoad;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
mainOptions: BulkLoad['options'];
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
columns: BulkLoad['columns'];
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
constructor(bulkLoad: BulkLoad);
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
_transform(row: Array<unknown> | {
|
||||
[colName: string]: unknown;
|
||||
}, _encoding: string, callback: (error?: Error) => void): void;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
_flush(callback: () => void): void;
|
||||
}
|
||||
/**
|
||||
* A BulkLoad instance is used to perform a bulk insert.
|
||||
*
|
||||
* Use [[Connection.newBulkLoad]] to create a new instance, and [[Connection.execBulkLoad]] to execute it.
|
||||
*
|
||||
* Example of BulkLoad Usages:
|
||||
*
|
||||
* ```js
|
||||
* // optional BulkLoad options
|
||||
* const options = { keepNulls: true };
|
||||
*
|
||||
* // instantiate - provide the table where you'll be inserting to, options and a callback
|
||||
* const bulkLoad = connection.newBulkLoad('MyTable', options, (error, rowCount) => {
|
||||
* console.log('inserted %d rows', rowCount);
|
||||
* });
|
||||
*
|
||||
* // setup your columns - always indicate whether the column is nullable
|
||||
* bulkLoad.addColumn('myInt', TYPES.Int, { nullable: false });
|
||||
* bulkLoad.addColumn('myString', TYPES.NVarChar, { length: 50, nullable: true });
|
||||
*
|
||||
* // execute
|
||||
* connection.execBulkLoad(bulkLoad, [
|
||||
* { myInt: 7, myString: 'hello' },
|
||||
* { myInt: 23, myString: 'world' }
|
||||
* ]);
|
||||
* ```
|
||||
*/
|
||||
declare class BulkLoad extends EventEmitter {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
error: Error | undefined;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
canceled: boolean;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
executionStarted: boolean;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
streamingMode: boolean;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
table: string;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
timeout: number | undefined;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
options: InternalConnectionOptions;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
callback: Callback;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
columns: Array<Column>;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
columnsByName: {
|
||||
[name: string]: Column;
|
||||
};
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
firstRowWritten: boolean;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
rowToPacketTransform: RowTransform;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
bulkOptions: InternalOptions;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
connection: Connection | undefined;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
rows: Array<any> | undefined;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
rst: Array<any> | undefined;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
rowCount: number | undefined;
|
||||
collation: Collation | undefined;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
constructor(table: string, collation: Collation | undefined, connectionOptions: InternalConnectionOptions, { checkConstraints, fireTriggers, keepNulls, lockTable, order, }: Options, callback: Callback);
|
||||
/**
|
||||
* Adds a column to the bulk load.
|
||||
*
|
||||
* The column definitions should match the table you are trying to insert into.
|
||||
* Attempting to call addColumn after the first row has been added will throw an exception.
|
||||
*
|
||||
* ```js
|
||||
* bulkLoad.addColumn('MyIntColumn', TYPES.Int, { nullable: false });
|
||||
* ```
|
||||
*
|
||||
* @param name The name of the column.
|
||||
* @param type One of the supported `data types`.
|
||||
* @param __namedParameters Additional column type information. At a minimum, `nullable` must be set to true or false.
|
||||
* @param length For VarChar, NVarChar, VarBinary. Use length as `Infinity` for VarChar(max), NVarChar(max) and VarBinary(max).
|
||||
* @param nullable Indicates whether the column accepts NULL values.
|
||||
* @param objName If the name of the column is different from the name of the property found on `rowObj` arguments passed to [[addRow]] or [[Connection.execBulkLoad]], then you can use this option to specify the property name.
|
||||
* @param precision For Numeric, Decimal.
|
||||
* @param scale For Numeric, Decimal, Time, DateTime2, DateTimeOffset.
|
||||
*/
|
||||
addColumn(name: string, type: DataType, { output, length, precision, scale, objName, nullable }: ColumnOptions): void;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
getOptionsSql(): string;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
getBulkInsertSql(): string;
|
||||
/**
|
||||
* This is simply a helper utility function which returns a `CREATE TABLE SQL` statement based on the columns added to the bulkLoad object.
|
||||
* This may be particularly handy when you want to insert into a temporary table (a table which starts with `#`).
|
||||
*
|
||||
* ```js
|
||||
* var sql = bulkLoad.getTableCreationSql();
|
||||
* ```
|
||||
*
|
||||
* A side note on bulk inserting into temporary tables: if you want to access a local temporary table after executing the bulk load,
|
||||
* you'll need to use the same connection and execute your requests using [[Connection.execSqlBatch]] instead of [[Connection.execSql]]
|
||||
*/
|
||||
getTableCreationSql(): string;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
getColMetaData(): Buffer;
|
||||
/**
|
||||
* Sets a timeout for this bulk load.
|
||||
*
|
||||
* ```js
|
||||
* bulkLoad.setTimeout(timeout);
|
||||
* ```
|
||||
*
|
||||
* @param timeout The number of milliseconds before the bulk load is considered failed, or 0 for no timeout.
|
||||
* When no timeout is set for the bulk load, the [[ConnectionOptions.requestTimeout]] of the Connection is used.
|
||||
*/
|
||||
setTimeout(timeout?: number): void;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
createDoneToken(): Buffer;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
cancel(): void;
|
||||
}
|
||||
export default BulkLoad;
|
||||
516
node_modules/tedious/lib/bulk-load.js
generated
vendored
Normal file
516
node_modules/tedious/lib/bulk-load.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/bulk-load.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/bulk-load.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
28
node_modules/tedious/lib/collation.d.ts
generated
vendored
Normal file
28
node_modules/tedious/lib/collation.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
type Encoding = 'utf-8' | 'CP437' | 'CP850' | 'CP874' | 'CP932' | 'CP936' | 'CP949' | 'CP950' | 'CP1250' | 'CP1251' | 'CP1252' | 'CP1253' | 'CP1254' | 'CP1255' | 'CP1256' | 'CP1257' | 'CP1258';
|
||||
export declare const codepageByLanguageId: {
|
||||
[key: number]: Encoding;
|
||||
};
|
||||
export declare const codepageBySortId: {
|
||||
[key: number]: Encoding;
|
||||
};
|
||||
export declare const Flags: {
|
||||
IGNORE_CASE: number;
|
||||
IGNORE_ACCENT: number;
|
||||
IGNORE_KANA: number;
|
||||
IGNORE_WIDTH: number;
|
||||
BINARY: number;
|
||||
BINARY2: number;
|
||||
UTF8: number;
|
||||
};
|
||||
export declare class Collation {
|
||||
readonly lcid: number;
|
||||
readonly flags: number;
|
||||
readonly version: number;
|
||||
readonly sortId: number;
|
||||
readonly codepage: Encoding | undefined;
|
||||
private buffer;
|
||||
static fromBuffer(buffer: Buffer, offset?: number): Collation;
|
||||
constructor(lcid: number, flags: number, version: number, sortId: number);
|
||||
toBuffer(): Buffer;
|
||||
}
|
||||
export {};
|
||||
348
node_modules/tedious/lib/collation.js
generated
vendored
Normal file
348
node_modules/tedious/lib/collation.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/collation.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/collation.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1310
node_modules/tedious/lib/connection.d.ts
generated
vendored
Normal file
1310
node_modules/tedious/lib/connection.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2730
node_modules/tedious/lib/connection.js
generated
vendored
Normal file
2730
node_modules/tedious/lib/connection.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/connection.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/connection.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
18
node_modules/tedious/lib/connector.d.ts
generated
vendored
Normal file
18
node_modules/tedious/lib/connector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import net from 'net';
|
||||
import dns from 'dns';
|
||||
type LookupFunction = (hostname: string, options: dns.LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: dns.LookupAddress[]) => void) => void;
|
||||
export declare function connectInParallel(options: {
|
||||
host: string;
|
||||
port: number;
|
||||
localAddress?: string | undefined;
|
||||
}, lookup: LookupFunction, signal: AbortSignal): Promise<net.Socket>;
|
||||
export declare function connectInSequence(options: {
|
||||
host: string;
|
||||
port: number;
|
||||
localAddress?: string | undefined;
|
||||
}, lookup: LookupFunction, signal: AbortSignal): Promise<net.Socket>;
|
||||
/**
|
||||
* Look up all addresses for the given hostname.
|
||||
*/
|
||||
export declare function lookupAllAddresses(host: string, lookup: LookupFunction, signal: AbortSignal): Promise<dns.LookupAddress[]>;
|
||||
export {};
|
||||
150
node_modules/tedious/lib/connector.js
generated
vendored
Normal file
150
node_modules/tedious/lib/connector.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/connector.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/connector.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
455
node_modules/tedious/lib/data-type.d.ts
generated
vendored
Normal file
455
node_modules/tedious/lib/data-type.d.ts
generated
vendored
Normal file
@@ -0,0 +1,455 @@
|
||||
import { type CryptoMetadata } from './always-encrypted/types';
|
||||
import { type InternalConnectionOptions } from './connection';
|
||||
import { Collation } from './collation';
|
||||
export interface Parameter {
|
||||
type: DataType;
|
||||
name: string;
|
||||
value: unknown;
|
||||
output: boolean;
|
||||
length?: number | undefined;
|
||||
precision?: number | undefined;
|
||||
scale?: number | undefined;
|
||||
nullable?: boolean | undefined;
|
||||
forceEncrypt?: boolean | undefined;
|
||||
cryptoMetadata?: CryptoMetadata | undefined;
|
||||
encryptedVal?: Buffer | undefined;
|
||||
}
|
||||
export interface ParameterData<T = any> {
|
||||
length?: number | undefined;
|
||||
scale?: number | undefined;
|
||||
precision?: number | undefined;
|
||||
collation?: Collation | undefined;
|
||||
value: T;
|
||||
}
|
||||
export interface DataType {
|
||||
id: number;
|
||||
type: string;
|
||||
name: string;
|
||||
declaration(parameter: Parameter): string;
|
||||
generateTypeInfo(parameter: ParameterData, options: InternalConnectionOptions): Buffer;
|
||||
generateParameterLength(parameter: ParameterData, options: InternalConnectionOptions): Buffer;
|
||||
generateParameterData(parameter: ParameterData, options: InternalConnectionOptions): Generator<Buffer, void>;
|
||||
validate(value: any, collation: Collation | undefined, options?: InternalConnectionOptions): any;
|
||||
hasTableName?: boolean;
|
||||
resolveLength?: (parameter: Parameter) => number;
|
||||
resolvePrecision?: (parameter: Parameter) => number;
|
||||
resolveScale?: (parameter: Parameter) => number;
|
||||
}
|
||||
export declare const TYPE: {
|
||||
[x: number]: DataType;
|
||||
};
|
||||
/**
|
||||
* <table>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>Type</th>
|
||||
* <th>Constant</th>
|
||||
* <th>JavaScript</th>
|
||||
* <th>Result set</th>
|
||||
* <th>Parameter</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
*
|
||||
* <tbody>
|
||||
* <tr class="group-heading">
|
||||
* <th colspan="5">Exact numerics</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>bit</code></td>
|
||||
* <td><code>[[TYPES.Bit]]</code></td>
|
||||
* <td><code>boolean</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>tinyint</code></td>
|
||||
* <td><code>[[TYPES.TinyInt]]</code></td>
|
||||
* <td><code>number</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>smallint</code></td>
|
||||
* <td><code>[[TYPES.SmallInt]]</code></td>
|
||||
* <td><code>number</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>int</code></td>
|
||||
* <td><code>[[TYPES.Int]]</code></td>
|
||||
* <td><code>number</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>bigint</code><sup>1</sup></td>
|
||||
* <td><code>[[TYPES.BigInt]]</code></td>
|
||||
* <td><code>string</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>numeric</code><sup>2</sup></td>
|
||||
* <td><code>[[TYPES.Numeric]]</code></td>
|
||||
* <td><code>number</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>decimal</code><sup>2</sup></td>
|
||||
* <td><code>[[TYPES.Decimal]]</code></td>
|
||||
* <td><code>number</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>smallmoney</code></td>
|
||||
* <td><code>[[TYPES.SmallMoney]]</code></td>
|
||||
* <td><code>number</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>money</code></td>
|
||||
* <td><code>[[TYPES.Money]]</code></td>
|
||||
* <td><code>number</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
*
|
||||
* <tbody>
|
||||
* <tr class="group-heading">
|
||||
* <th colspan="5">Approximate numerics</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>float</code></td>
|
||||
* <td><code>[[TYPES.Float]]</code></td>
|
||||
* <td><code>number</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>real</code></td>
|
||||
* <td><code>[[TYPES.Real]]</code></td>
|
||||
* <td><code>number</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
*
|
||||
* <tbody>
|
||||
* <tr class="group-heading">
|
||||
* <th colspan="4">Date and Time</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>smalldatetime</code></td>
|
||||
* <td><code>[[TYPES.SmallDateTime]]</code></td>
|
||||
* <td><code>Date</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>datetime</code></td>
|
||||
* <td><code>[[TYPES.DateTime]]</code></td>
|
||||
* <td><code>Date</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>datetime2</code></td>
|
||||
* <td><code>[[TYPES.DateTime2]]</code></td>
|
||||
* <td><code>Date</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>datetimeoffset</code></td>
|
||||
* <td><code>[[TYPES.DateTimeOffset]]</code></td>
|
||||
* <td><code>Date</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>time</code></td>
|
||||
* <td><code>[[TYPES.Time]]</code></td>
|
||||
* <td><code>Date</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>date</code></td>
|
||||
* <td><code>[[TYPES.Date]]</code></td>
|
||||
* <td><code>Date</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
*
|
||||
* <tbody>
|
||||
* <tr class="group-heading">
|
||||
* <th colspan="4">Character Strings</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>char</code></td>
|
||||
* <td><code>[[TYPES.Char]]</code></td>
|
||||
* <td><code>string</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>varchar</code><sup>3</sup></td>
|
||||
* <td><code>[[TYPES.VarChar]]</code></td>
|
||||
* <td><code>string</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>text</code></td>
|
||||
* <td><code>[[TYPES.Text]]</code></td>
|
||||
* <td><code>string</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
*
|
||||
* <tbody>
|
||||
* <tr class="group-heading">
|
||||
* <th colspan="4">Unicode Strings</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>nchar</code></td>
|
||||
* <td><code>[[TYPES.NChar]]</code></td>
|
||||
* <td><code>string</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>nvarchar</code><sup>3</sup></td>
|
||||
* <td><code>[[TYPES.NVarChar]]</code></td>
|
||||
* <td><code>string</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>ntext</code></td>
|
||||
* <td><code>[[TYPES.NText]]</code></td>
|
||||
* <td><code>string</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>-</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
*
|
||||
* <tbody>
|
||||
* <tr class="group-heading">
|
||||
* <th colspan="5">Binary Strings<sup>4</sup></th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>binary</code></td>
|
||||
* <td><code>[[TYPES.Binary]]</code></td>
|
||||
* <td><code>Buffer</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>varbinary</code></td>
|
||||
* <td><code>[[TYPES.VarBinary]]</code></td>
|
||||
* <td><code>Buffer</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>image</code></td>
|
||||
* <td><code>[[TYPES.Image]]</code></td>
|
||||
* <td><code>Buffer</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
*
|
||||
* <tbody>
|
||||
* <tr class="group-heading">
|
||||
* <th colspan="5">Other Data Types</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>TVP</code></td>
|
||||
* <td><code>[[TYPES.TVP]]</code></td>
|
||||
* <td><code>Object</code></td>
|
||||
* <td>-</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>UDT</code></td>
|
||||
* <td><code>[[TYPES.UDT]]</code></td>
|
||||
* <td><code>Buffer</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>-</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>uniqueidentifier</code><sup>4</sup></td>
|
||||
* <td><code>[[TYPES.UniqueIdentifier]]</code></td>
|
||||
* <td><code>string</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>✓</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>variant</code></td>
|
||||
* <td><code>[[TYPES.Variant]]</code></td>
|
||||
* <td><code>any</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>-</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>xml</code></td>
|
||||
* <td><code>[[TYPES.Xml]]</code></td>
|
||||
* <td><code>string</code></td>
|
||||
* <td>✓</td>
|
||||
* <td>-</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <ol>
|
||||
* <li>
|
||||
* <h4>BigInt</h4>
|
||||
* <p>
|
||||
* Values are returned as a string. This is because values can exceed 53 bits of significant data, which is greater than a
|
||||
* Javascript <code>number</code> type can represent as an integer.
|
||||
* </p>
|
||||
* </li>
|
||||
* <li>
|
||||
* <h4>Numerical, Decimal</h4>
|
||||
* <p>
|
||||
* For input parameters, default precision is 18 and default scale is 0. Maximum supported precision is 19.
|
||||
* </p>
|
||||
* </li>
|
||||
* <li>
|
||||
* <h4>VarChar, NVarChar</h4>
|
||||
* <p>
|
||||
* <code>varchar(max)</code> and <code>nvarchar(max)</code> are also supported.
|
||||
* </p>
|
||||
* </li>
|
||||
* <li>
|
||||
* <h4>UniqueIdentifier</h4>
|
||||
* <p>
|
||||
* Values are returned as a 16 byte hexadecimal string.
|
||||
* </p>
|
||||
* <p>
|
||||
* Note that the order of bytes is not the same as the character representation. See
|
||||
* <a href="http://msdn.microsoft.com/en-us/library/ms190215.aspx">Using uniqueidentifier Data</a>
|
||||
* for an example of the different ordering of bytes.
|
||||
* </p>
|
||||
* </li>
|
||||
* </ol>
|
||||
*/
|
||||
export declare const TYPES: {
|
||||
TinyInt: DataType;
|
||||
Bit: DataType;
|
||||
SmallInt: DataType;
|
||||
Int: DataType;
|
||||
SmallDateTime: DataType;
|
||||
Real: DataType;
|
||||
Money: DataType;
|
||||
DateTime: DataType;
|
||||
Float: DataType;
|
||||
Decimal: DataType & {
|
||||
resolvePrecision: NonNullable<DataType["resolvePrecision"]>;
|
||||
resolveScale: NonNullable<DataType["resolveScale"]>;
|
||||
};
|
||||
Numeric: DataType & {
|
||||
resolveScale: NonNullable<DataType["resolveScale"]>;
|
||||
resolvePrecision: NonNullable<DataType["resolvePrecision"]>;
|
||||
};
|
||||
SmallMoney: DataType;
|
||||
BigInt: DataType;
|
||||
Image: DataType;
|
||||
Text: DataType;
|
||||
UniqueIdentifier: DataType;
|
||||
NText: DataType;
|
||||
VarBinary: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
VarChar: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
Binary: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
Char: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
NVarChar: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
NChar: DataType & {
|
||||
maximumLength: number;
|
||||
};
|
||||
Xml: DataType;
|
||||
Time: DataType;
|
||||
Date: DataType;
|
||||
DateTime2: DataType & {
|
||||
resolveScale: NonNullable<DataType["resolveScale"]>;
|
||||
};
|
||||
DateTimeOffset: DataType & {
|
||||
resolveScale: NonNullable<DataType["resolveScale"]>;
|
||||
};
|
||||
UDT: DataType;
|
||||
TVP: DataType;
|
||||
Variant: DataType;
|
||||
};
|
||||
export declare const typeByName: {
|
||||
TinyInt: DataType;
|
||||
Bit: DataType;
|
||||
SmallInt: DataType;
|
||||
Int: DataType;
|
||||
SmallDateTime: DataType;
|
||||
Real: DataType;
|
||||
Money: DataType;
|
||||
DateTime: DataType;
|
||||
Float: DataType;
|
||||
Decimal: DataType & {
|
||||
resolvePrecision: NonNullable<DataType["resolvePrecision"]>;
|
||||
resolveScale: NonNullable<DataType["resolveScale"]>;
|
||||
};
|
||||
Numeric: DataType & {
|
||||
resolveScale: NonNullable<DataType["resolveScale"]>;
|
||||
resolvePrecision: NonNullable<DataType["resolvePrecision"]>;
|
||||
};
|
||||
SmallMoney: DataType;
|
||||
BigInt: DataType;
|
||||
Image: DataType;
|
||||
Text: DataType;
|
||||
UniqueIdentifier: DataType;
|
||||
NText: DataType;
|
||||
VarBinary: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
VarChar: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
Binary: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
Char: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
NVarChar: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
NChar: DataType & {
|
||||
maximumLength: number;
|
||||
};
|
||||
Xml: DataType;
|
||||
Time: DataType;
|
||||
Date: DataType;
|
||||
DateTime2: DataType & {
|
||||
resolveScale: NonNullable<DataType["resolveScale"]>;
|
||||
};
|
||||
DateTimeOffset: DataType & {
|
||||
resolveScale: NonNullable<DataType["resolveScale"]>;
|
||||
};
|
||||
UDT: DataType;
|
||||
TVP: DataType;
|
||||
Variant: DataType;
|
||||
};
|
||||
428
node_modules/tedious/lib/data-type.js
generated
vendored
Normal file
428
node_modules/tedious/lib/data-type.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/data-type.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-type.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/tedious/lib/data-types/bigint.d.ts
generated
vendored
Normal file
3
node_modules/tedious/lib/data-types/bigint.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const BigInt: DataType;
|
||||
export default BigInt;
|
||||
53
node_modules/tedious/lib/data-types/bigint.js
generated
vendored
Normal file
53
node_modules/tedious/lib/data-types/bigint.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _intn = _interopRequireDefault(require("./intn"));
|
||||
var _writableTrackingBuffer = _interopRequireDefault(require("../tracking-buffer/writable-tracking-buffer"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
const DATA_LENGTH = Buffer.from([0x08]);
|
||||
const NULL_LENGTH = Buffer.from([0x00]);
|
||||
const MAX_SAFE_BIGINT = 9223372036854775807n;
|
||||
const MIN_SAFE_BIGINT = -9223372036854775808n;
|
||||
const BigInt = {
|
||||
id: 0x7F,
|
||||
type: 'INT8',
|
||||
name: 'BigInt',
|
||||
declaration: function () {
|
||||
return 'bigint';
|
||||
},
|
||||
generateTypeInfo() {
|
||||
return Buffer.from([_intn.default.id, 0x08]);
|
||||
},
|
||||
generateParameterLength(parameter, options) {
|
||||
if (parameter.value == null) {
|
||||
return NULL_LENGTH;
|
||||
}
|
||||
return DATA_LENGTH;
|
||||
},
|
||||
*generateParameterData(parameter, options) {
|
||||
if (parameter.value == null) {
|
||||
return;
|
||||
}
|
||||
const buffer = new _writableTrackingBuffer.default(8);
|
||||
buffer.writeBigInt64LE(typeof parameter.value === 'bigint' ? parameter.value : globalThis.BigInt(parameter.value));
|
||||
yield buffer.data;
|
||||
},
|
||||
validate: function (value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
if (typeof value !== 'bigint') {
|
||||
value = globalThis.BigInt(value);
|
||||
}
|
||||
if (value < MIN_SAFE_BIGINT || value > MAX_SAFE_BIGINT) {
|
||||
throw new TypeError(`Value must be between ${MIN_SAFE_BIGINT} and ${MAX_SAFE_BIGINT}, inclusive.`);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
};
|
||||
var _default = exports.default = BigInt;
|
||||
module.exports = BigInt;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozL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QUksT0FBT0EsS0FBSyxLQUFLLFFBQVEsRUFBRTtNQUM3QkEsS0FBSyxHQUFHSyxVQUFVLENBQUNmLE1BQU0sQ0FBQ1UsS0FBSyxDQUFDO0lBQ2xDO0lBRUEsSUFBSUEsS0FBSyxHQUFHWCxlQUFlLElBQUlXLEtBQUssR0FBR1osZUFBZSxFQUFFO01BQ3RELE1BQU0sSUFBSW9CLFNBQVMsQ0FBRSx5QkFBd0JuQixlQUFnQixRQUFPRCxlQUFnQixjQUFhLENBQUM7SUFDcEc7SUFFQSxPQUFPWSxLQUFLO0VBQ2Q7QUFDRixDQUFDO0FBQUMsSUFBQVMsUUFBQSxHQUFBQyxPQUFBLENBQUEzQixPQUFBLEdBRWFPLE1BQU07QUFDckJxQixNQUFNLENBQUNELE9BQU8sR0FBR3BCLE1BQU0ifQ==
|
||||
1
node_modules/tedious/lib/data-types/bigint.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/bigint.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bigint.js","names":["_intn","_interopRequireDefault","require","_writableTrackingBuffer","obj","__esModule","default","DATA_LENGTH","Buffer","from","NULL_LENGTH","MAX_SAFE_BIGINT","MIN_SAFE_BIGINT","BigInt","id","type","name","declaration","generateTypeInfo","IntN","generateParameterLength","parameter","options","value","generateParameterData","buffer","WritableTrackingBuffer","writeBigInt64LE","globalThis","data","validate","TypeError","_default","exports","module"],"sources":["../../src/data-types/bigint.ts"],"sourcesContent":["import { type DataType } from '../data-type';\nimport IntN from './intn';\nimport WritableTrackingBuffer from '../tracking-buffer/writable-tracking-buffer';\n\nconst DATA_LENGTH = Buffer.from([0x08]);\nconst NULL_LENGTH = Buffer.from([0x00]);\nconst MAX_SAFE_BIGINT = 9223372036854775807n;\nconst MIN_SAFE_BIGINT = -9223372036854775808n;\n\nconst BigInt: DataType = {\n id: 0x7F,\n type: 'INT8',\n name: 'BigInt',\n\n declaration: function() {\n return 'bigint';\n },\n\n generateTypeInfo() {\n return Buffer.from([IntN.id, 0x08]);\n },\n\n generateParameterLength(parameter, options) {\n if (parameter.value == null) {\n return NULL_LENGTH;\n }\n\n return DATA_LENGTH;\n },\n\n * generateParameterData(parameter, options) {\n if (parameter.value == null) {\n return;\n }\n\n const buffer = new WritableTrackingBuffer(8);\n buffer.writeBigInt64LE(typeof parameter.value === 'bigint' ? parameter.value : globalThis.BigInt(parameter.value));\n yield buffer.data;\n },\n\n validate: function(value): null | bigint {\n if (value == null) {\n return null;\n }\n\n if (typeof value !== 'bigint') {\n value = globalThis.BigInt(value);\n }\n\n if (value < MIN_SAFE_BIGINT || value > MAX_SAFE_BIGINT) {\n throw new TypeError(`Value must be between ${MIN_SAFE_BIGINT} and ${MAX_SAFE_BIGINT}, inclusive.`);\n }\n\n return value;\n }\n};\n\nexport default BigInt;\nmodule.exports = BigInt;\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAiF,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEjF,MAAMG,WAAW,GAAGC,MAAM,CAACC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AACvC,MAAMC,WAAW,GAAGF,MAAM,CAACC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AACvC,MAAME,eAAe,GAAG,oBAAoB;AAC5C,MAAMC,eAAe,GAAG,CAAC,oBAAoB;AAE7C,MAAMC,MAAgB,GAAG;EACvBC,EAAE,EAAE,IAAI;EACRC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,QAAQ;EAEdC,WAAW,EAAE,SAAAA,CAAA,EAAW;IACtB,OAAO,QAAQ;EACjB,CAAC;EAEDC,gBAAgBA,CAAA,EAAG;IACjB,OAAOV,MAAM,CAACC,IAAI,CAAC,CAACU,aAAI,CAACL,EAAE,EAAE,IAAI,CAAC,CAAC;EACrC,CAAC;EAEDM,uBAAuBA,CAACC,SAAS,EAAEC,OAAO,EAAE;IAC1C,IAAID,SAAS,CAACE,KAAK,IAAI,IAAI,EAAE;MAC3B,OAAOb,WAAW;IACpB;IAEA,OAAOH,WAAW;EACpB,CAAC;EAED,CAAEiB,qBAAqBA,CAACH,SAAS,EAAEC,OAAO,EAAE;IAC1C,IAAID,SAAS,CAACE,KAAK,IAAI,IAAI,EAAE;MAC3B;IACF;IAEA,MAAME,MAAM,GAAG,IAAIC,+BAAsB,CAAC,CAAC,CAAC;IAC5CD,MAAM,CAACE,eAAe,CAAC,OAAON,SAAS,CAACE,KAAK,KAAK,QAAQ,GAAGF,SAAS,CAACE,KAAK,GAAGK,UAAU,CAACf,MAAM,CAACQ,SAAS,CAACE,KAAK,CAAC,CAAC;IAClH,MAAME,MAAM,CAACI,IAAI;EACnB,CAAC;EAEDC,QAAQ,EAAE,SAAAA,CAASP,KAAK,EAAiB;IACvC,IAAIA,KAAK,IAAI,IAAI,EAAE;MACjB,OAAO,IAAI;IACb;IAEA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;MAC7BA,KAAK,GAAGK,UAAU,CAACf,MAAM,CAACU,KAAK,CAAC;IAClC;IAEA,IAAIA,KAAK,GAAGX,eAAe,IAAIW,KAAK,GAAGZ,eAAe,EAAE;MACtD,MAAM,IAAIoB,SAAS,CAAE,yBAAwBnB,eAAgB,QAAOD,eAAgB,cAAa,CAAC;IACpG;IAEA,OAAOY,KAAK;EACd;AACF,CAAC;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAA3B,OAAA,GAEaO,MAAM;AACrBqB,MAAM,CAACD,OAAO,GAAGpB,MAAM"}
|
||||
5
node_modules/tedious/lib/data-types/binary.d.ts
generated
vendored
Normal file
5
node_modules/tedious/lib/data-types/binary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const Binary: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
export default Binary;
|
||||
67
node_modules/tedious/lib/data-types/binary.js
generated
vendored
Normal file
67
node_modules/tedious/lib/data-types/binary.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/data-types/binary.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/binary.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"binary.js","names":["NULL_LENGTH","Buffer","from","Binary","id","type","name","maximumLength","declaration","parameter","value","length","output","resolveLength","generateTypeInfo","buffer","alloc","writeUInt8","writeUInt16LE","generateParameterLength","options","generateParameterData","slice","undefined","Math","min","validate","isBuffer","TypeError","_default","exports","default","module"],"sources":["../../src/data-types/binary.ts"],"sourcesContent":["import { type DataType } from '../data-type';\n\nconst NULL_LENGTH = Buffer.from([0xFF, 0xFF]);\n\nconst Binary: { maximumLength: number } & DataType = {\n id: 0xAD,\n type: 'BIGBinary',\n name: 'Binary',\n maximumLength: 8000,\n\n declaration: function(parameter) {\n const value = parameter.value as Buffer | null;\n\n let length;\n if (parameter.length) {\n length = parameter.length;\n } else if (value != null) {\n length = value.length || 1;\n } else if (value === null && !parameter.output) {\n length = 1;\n } else {\n length = this.maximumLength;\n }\n\n return 'binary(' + length + ')';\n },\n\n resolveLength: function(parameter) {\n const value = parameter.value as Buffer | null;\n\n if (value != null) {\n return value.length;\n } else {\n return this.maximumLength;\n }\n },\n\n generateTypeInfo(parameter) {\n const buffer = Buffer.alloc(3);\n buffer.writeUInt8(this.id, 0);\n buffer.writeUInt16LE(parameter.length!, 1);\n return buffer;\n },\n\n generateParameterLength(parameter, options) {\n if (parameter.value == null) {\n return NULL_LENGTH;\n }\n\n const buffer = Buffer.alloc(2);\n buffer.writeUInt16LE(parameter.length!, 0);\n return buffer;\n },\n\n * generateParameterData(parameter, options) {\n if (parameter.value == null) {\n return;\n }\n\n yield parameter.value.slice(0, parameter.length !== undefined ? Math.min(parameter.length, this.maximumLength) : this.maximumLength);\n },\n\n validate: function(value): Buffer | null {\n if (value == null) {\n return null;\n }\n\n if (!Buffer.isBuffer(value)) {\n throw new TypeError('Invalid buffer.');\n }\n\n return value;\n }\n};\n\nexport default Binary;\nmodule.exports = Binary;\n"],"mappings":";;;;;;AAEA,MAAMA,WAAW,GAAGC,MAAM,CAACC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAE7C,MAAMC,MAA4C,GAAG;EACnDC,EAAE,EAAE,IAAI;EACRC,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAE,QAAQ;EACdC,aAAa,EAAE,IAAI;EAEnBC,WAAW,EAAE,SAAAA,CAASC,SAAS,EAAE;IAC/B,MAAMC,KAAK,GAAGD,SAAS,CAACC,KAAsB;IAE9C,IAAIC,MAAM;IACV,IAAIF,SAAS,CAACE,MAAM,EAAE;MACpBA,MAAM,GAAGF,SAAS,CAACE,MAAM;IAC3B,CAAC,MAAM,IAAID,KAAK,IAAI,IAAI,EAAE;MACxBC,MAAM,GAAGD,KAAK,CAACC,MAAM,IAAI,CAAC;IAC5B,CAAC,MAAM,IAAID,KAAK,KAAK,IAAI,IAAI,CAACD,SAAS,CAACG,MAAM,EAAE;MAC9CD,MAAM,GAAG,CAAC;IACZ,CAAC,MAAM;MACLA,MAAM,GAAG,IAAI,CAACJ,aAAa;IAC7B;IAEA,OAAO,SAAS,GAAGI,MAAM,GAAG,GAAG;EACjC,CAAC;EAEDE,aAAa,EAAE,SAAAA,CAASJ,SAAS,EAAE;IACjC,MAAMC,KAAK,GAAGD,SAAS,CAACC,KAAsB;IAE9C,IAAIA,KAAK,IAAI,IAAI,EAAE;MACjB,OAAOA,KAAK,CAACC,MAAM;IACrB,CAAC,MAAM;MACL,OAAO,IAAI,CAACJ,aAAa;IAC3B;EACF,CAAC;EAEDO,gBAAgBA,CAACL,SAAS,EAAE;IAC1B,MAAMM,MAAM,GAAGd,MAAM,CAACe,KAAK,CAAC,CAAC,CA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data-types/bit.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const Bit: DataType;
|
||||
export default Bit;
|
||||
46
node_modules/tedious/lib/data-types/bit.js
generated
vendored
Normal file
46
node_modules/tedious/lib/data-types/bit.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _bitn = _interopRequireDefault(require("./bitn"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
const DATA_LENGTH = Buffer.from([0x01]);
|
||||
const NULL_LENGTH = Buffer.from([0x00]);
|
||||
const Bit = {
|
||||
id: 0x32,
|
||||
type: 'BIT',
|
||||
name: 'Bit',
|
||||
declaration: function () {
|
||||
return 'bit';
|
||||
},
|
||||
generateTypeInfo() {
|
||||
return Buffer.from([_bitn.default.id, 0x01]);
|
||||
},
|
||||
generateParameterLength(parameter, options) {
|
||||
if (parameter.value == null) {
|
||||
return NULL_LENGTH;
|
||||
}
|
||||
return DATA_LENGTH;
|
||||
},
|
||||
*generateParameterData(parameter, options) {
|
||||
if (parameter.value == null) {
|
||||
return;
|
||||
}
|
||||
yield parameter.value ? Buffer.from([0x01]) : Buffer.from([0x00]);
|
||||
},
|
||||
validate: function (value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
if (value) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
var _default = exports.default = Bit;
|
||||
module.exports = Bit;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYml0biIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwib2JqIiwiX19lc01vZHVsZSIsImRlZmF1bHQiLCJEQVRBX0xFTkdUSCIsIkJ1ZmZ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modules/tedious/lib/data-types/bit.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/bit.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bit.js","names":["_bitn","_interopRequireDefault","require","obj","__esModule","default","DATA_LENGTH","Buffer","from","NULL_LENGTH","Bit","id","type","name","declaration","generateTypeInfo","BitN","generateParameterLength","parameter","options","value","generateParameterData","validate","_default","exports","module"],"sources":["../../src/data-types/bit.ts"],"sourcesContent":["import { type DataType } from '../data-type';\nimport BitN from './bitn';\n\nconst DATA_LENGTH = Buffer.from([0x01]);\nconst NULL_LENGTH = Buffer.from([0x00]);\n\nconst Bit: DataType = {\n id: 0x32,\n type: 'BIT',\n name: 'Bit',\n\n declaration: function() {\n return 'bit';\n },\n\n generateTypeInfo() {\n return Buffer.from([BitN.id, 0x01]);\n },\n\n generateParameterLength(parameter, options) {\n if (parameter.value == null) {\n return NULL_LENGTH;\n }\n\n return DATA_LENGTH;\n },\n\n * generateParameterData(parameter, options) {\n if (parameter.value == null) {\n return;\n }\n\n yield parameter.value ? Buffer.from([0x01]) : Buffer.from([0x00]);\n },\n\n validate: function(value): null | boolean {\n if (value == null) {\n return null;\n }\n if (value) {\n return true;\n } else {\n return false;\n }\n }\n};\n\nexport default Bit;\nmodule.exports = Bit;\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE1B,MAAMG,WAAW,GAAGC,MAAM,CAACC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AACvC,MAAMC,WAAW,GAAGF,MAAM,CAACC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAEvC,MAAME,GAAa,GAAG;EACpBC,EAAE,EAAE,IAAI;EACRC,IAAI,EAAE,KAAK;EACXC,IAAI,EAAE,KAAK;EAEXC,WAAW,EAAE,SAAAA,CAAA,EAAW;IACtB,OAAO,KAAK;EACd,CAAC;EAEDC,gBAAgBA,CAAA,EAAG;IACjB,OAAOR,MAAM,CAACC,IAAI,CAAC,CAACQ,aAAI,CAACL,EAAE,EAAE,IAAI,CAAC,CAAC;EACrC,CAAC;EAEDM,uBAAuBA,CAACC,SAAS,EAAEC,OAAO,EAAE;IAC1C,IAAID,SAAS,CAACE,KAAK,IAAI,IAAI,EAAE;MAC3B,OAAOX,WAAW;IACpB;IAEA,OAAOH,WAAW;EACpB,CAAC;EAED,CAAEe,qBAAqBA,CAACH,SAAS,EAAEC,OAAO,EAAE;IAC1C,IAAID,SAAS,CAACE,KAAK,IAAI,IAAI,EAAE;MAC3B;IACF;IAEA,MAAMF,SAAS,CAACE,KAAK,GAAGb,MAAM,CAACC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAGD,MAAM,CAACC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;EACnE,CAAC;EAEDc,QAAQ,EAAE,SAAAA,CAASF,KAAK,EAAkB;IACxC,IAAIA,KAAK,IAAI,IAAI,EAAE;MACjB,OAAO,IAAI;IACb;IACA,IAAIA,KAAK,EAAE;MACT,OAAO,IAAI;IACb,CAAC,MAAM;MACL,OAAO,KAAK;IACd;EACF;AACF,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAnB,OAAA,GAEaK,GAAG;AAClBe,MAAM,CAACD,OAAO,GAAGd,GAAG"}
|
||||
3
node_modules/tedious/lib/data-types/bitn.d.ts
generated
vendored
Normal file
3
node_modules/tedious/lib/data-types/bitn.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const BitN: DataType;
|
||||
export default BitN;
|
||||
29
node_modules/tedious/lib/data-types/bitn.js
generated
vendored
Normal file
29
node_modules/tedious/lib/data-types/bitn.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
const BitN = {
|
||||
id: 0x68,
|
||||
type: 'BITN',
|
||||
name: 'BitN',
|
||||
declaration() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
generateTypeInfo() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
generateParameterLength() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
*generateParameterData() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
validate() {
|
||||
throw new Error('not implemented');
|
||||
}
|
||||
};
|
||||
var _default = exports.default = BitN;
|
||||
module.exports = BitN;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJCaXROIiwiaWQiLCJ0eXBlIiwibmFtZSIsImRlY2xhcmF0aW9uIiwiRXJyb3IiLCJnZW5lcmF0ZVR5cGVJbmZvIiwiZ2VuZXJhdGVQYXJhbWV0ZXJMZW5ndGgiLCJnZW5lcmF0ZVBhcmFtZXRlckRhdGEiLCJ2YWxpZGF0ZSIsIl9kZWZhdWx0IiwiZXhwb3J0cyIsImRlZmF1bHQiLCJtb2R1bGUiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvZGF0YS10eXBlcy9iaXRuLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgRGF0YVR5cGUgfSBmcm9tICcuLi9kYXRhLXR5cGUnO1xuXG5jb25zdCBCaXROOiBEYXRhVHlwZSA9IHtcbiAgaWQ6IDB4NjgsXG4gIHR5cGU6ICdCSVROJyxcbiAgbmFtZTogJ0JpdE4nLFxuXG4gIGRlY2xhcmF0aW9uKCkge1xuICAgIHRocm93IG5ldyBFcnJvcignbm90IGltcGxlbWVudGVkJyk7XG4gIH0sXG5cbiAgZ2VuZXJhdGVUeXBlSW5mbygpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ25vdCBpbXBsZW1lbnRlZCc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UMsT0FBQSxHQUVhWixJQUFJO0FBQ25CYSxNQUFNLENBQUNGLE9BQU8sR0FBR1gsSUFBSSJ9
|
||||
1
node_modules/tedious/lib/data-types/bitn.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/bitn.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bitn.js","names":["BitN","id","type","name","declaration","Error","generateTypeInfo","generateParameterLength","generateParameterData","validate","_default","exports","default","module"],"sources":["../../src/data-types/bitn.ts"],"sourcesContent":["import { type DataType } from '../data-type';\n\nconst BitN: DataType = {\n id: 0x68,\n type: 'BITN',\n name: 'BitN',\n\n declaration() {\n throw new Error('not implemented');\n },\n\n generateTypeInfo() {\n throw new Error('not implemented');\n },\n\n generateParameterLength() {\n throw new Error('not implemented');\n },\n\n * generateParameterData() {\n throw new Error('not implemented');\n },\n\n validate() {\n throw new Error('not implemented');\n }\n};\n\nexport default BitN;\nmodule.exports = BitN;\n"],"mappings":";;;;;;AAEA,MAAMA,IAAc,GAAG;EACrBC,EAAE,EAAE,IAAI;EACRC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EAEZC,WAAWA,CAAA,EAAG;IACZ,MAAM,IAAIC,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDC,gBAAgBA,CAAA,EAAG;IACjB,MAAM,IAAID,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDE,uBAAuBA,CAAA,EAAG;IACxB,MAAM,IAAIF,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAED,CAAEG,qBAAqBA,CAAA,EAAG;IACxB,MAAM,IAAIH,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDI,QAAQA,CAAA,EAAG;IACT,MAAM,IAAIJ,KAAK,CAAC,iBAAiB,CAAC;EACpC;AACF,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaZ,IAAI;AACnBa,MAAM,CAACF,OAAO,GAAGX,IAAI"}
|
||||
5
node_modules/tedious/lib/data-types/char.d.ts
generated
vendored
Normal file
5
node_modules/tedious/lib/data-types/char.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const Char: {
|
||||
maximumLength: number;
|
||||
} & DataType;
|
||||
export default Char;
|
||||
86
node_modules/tedious/lib/data-types/char.js
generated
vendored
Normal file
86
node_modules/tedious/lib/data-types/char.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/data-types/char.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/char.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/tedious/lib/data-types/date.d.ts
generated
vendored
Normal file
3
node_modules/tedious/lib/data-types/date.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const Date: DataType;
|
||||
export default Date;
|
||||
72
node_modules/tedious/lib/data-types/date.js
generated
vendored
Normal file
72
node_modules/tedious/lib/data-types/date.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/data-types/date.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/date.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"date.js","names":["_core","require","globalDate","global","Date","EPOCH_DATE","LocalDate","ofYearDay","NULL_LENGTH","Buffer","from","DATA_LENGTH","id","type","name","declaration","generateTypeInfo","generateParameterLength","parameter","options","value","generateParameterData","date","useUTC","of","getUTCFullYear","getUTCMonth","getUTCDate","getFullYear","getMonth","getDate","days","until","ChronoUnit","DAYS","buffer","alloc","writeUIntLE","validate","collation","parse","year","TypeError","isNaN","_default","exports","default","module"],"sources":["../../src/data-types/date.ts"],"sourcesContent":["import { type DataType } from '../data-type';\nimport { ChronoUnit, LocalDate } from '@js-joda/core';\n\n// globalDate is to be used for JavaScript's global 'Date' object to avoid name clashing with the 'Date' constant below\nconst globalDate = global.Date;\nconst EPOCH_DATE = LocalDate.ofYearDay(1, 1);\nconst NULL_LENGTH = Buffer.from([0x00]);\nconst DATA_LENGTH = Buffer.from([0x03]);\n\nconst Date: DataType = {\n id: 0x28,\n type: 'DATEN',\n name: 'Date',\n\n declaration: function() {\n return 'date';\n },\n\n generateTypeInfo: function() {\n return Buffer.from([this.id]);\n },\n\n generateParameterLength(parameter, options) {\n if (parameter.value == null) {\n return NULL_LENGTH;\n }\n\n return DATA_LENGTH;\n },\n\n * generateParameterData(parameter, options) {\n if (parameter.value == null) {\n return;\n }\n\n const value = parameter.value as any; // Temporary solution. Remove 'any' later.\n\n let date: LocalDate;\n if (options.useUTC) {\n date = LocalDate.of(value.getUTCFullYear(), value.getUTCMonth() + 1, value.getUTCDate());\n } else {\n date = LocalDate.of(value.getFullYear(), value.getMonth() + 1, value.getDate());\n }\n\n const days = EPOCH_DATE.until(date, ChronoUnit.DAYS);\n const buffer = Buffer.alloc(3);\n buffer.writeUIntLE(days, 0, 3);\n yield buffer;\n },\n\n // TODO: value is technically of type 'unknown'.\n validate: function(value, collation, options): null | Date {\n if (value == null) {\n return null;\n }\n\n if (!(value instanceof globalDate)) {\n value = new globalDate(globalDate.parse(value));\n }\n\n value = value as Date;\n\n let year;\n if (options && options.useUTC) {\n year = value.getUTCFullYear();\n } else {\n year = value.getFullYear();\n }\n\n if (year < 1 || year > 9999) {\n throw new TypeError('Out of range.');\n }\n\n if (isNaN(value)) {\n throw new TypeError('Invalid date.');\n }\n\n return value;\n }\n};\n\nexport default Date;\nmodule.exports = Date;\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAI;AAC9B,MAAMC,UAAU,GAAGC,eAAS,CAACC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;AAC5C,MAAMC,WAAW,GAAGC,MAAM,CAACC,IAAI,CAAC,CAAC,IAAI,CAAC,C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C,MAAM,GAAG1B,MAAM,CAAC2B,KAAK,CAAC,CAAC,CAAC;IAC9BD,MAAM,CAACE,WAAW,CAACN,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;IAC9B,MAAMI,MAAM;EACd,CAAC;EAED;EACAG,QAAQ,EAAE,SAAAA,CAASlB,KAAK,EAAEmB,SAAS,EAAEpB,OAAO,EAAe;IACzD,IAAIC,KAAK,IAAI,IAAI,EAAE;MACjB,OAAO,IAAI;IACb;IAEA,IAAI,EAAEA,KAAK,YAAYlB,UAAU,CAAC,EAAE;MAClCkB,KAAK,GAAG,IAAIlB,UAAU,CAACA,UAAU,CAACsC,KAAK,CAACpB,KAAK,CAAC,CAAC;IACjD;IAEAA,KAAK,GAAGA,KAAa;IAErB,IAAIqB,IAAI;IACR,IAAItB,OAAO,IAAIA,OAAO,CAACI,MAAM,EAAE;MAC7BkB,IAAI,GAAGrB,KAAK,CAACK,cAAc,CAAC,CAAC;IAC/B,CAAC,MAAM;MACLgB,IAAI,GAAGrB,KAAK,CAACQ,WAAW,CAAC,CAAC;IAC5B;IAEA,IAAIa,IAAI,GAAG,CAAC,IAAIA,IAAI,GAAG,IAAI,EAAE;MAC3B,MAAM,IAAIC,SAAS,CAAC,eAAe,CAAC;IACtC;IAEA,IAAIC,KAAK,CAACvB,KAAK,CAAC,EAAE;MAChB,MAAM,IAAIsB,SAAS,CAAC,eAAe,CAAC;IACtC;IAEA,OAAOtB,KAAK;EACd;AACF,CAAC;AAAC,IAAAwB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa1C,IAAI;AACnB2C,MAAM,CAACF,OAAO,GAAGzC,IAAI"}
|
||||
3
node_modules/tedious/lib/data-types/datetime.d.ts
generated
vendored
Normal file
3
node_modules/tedious/lib/data-types/datetime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const DateTime: DataType;
|
||||
export default DateTime;
|
||||
93
node_modules/tedious/lib/data-types/datetime.js
generated
vendored
Normal file
93
node_modules/tedious/lib/data-types/datetime.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/data-types/datetime.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/datetime.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
node_modules/tedious/lib/data-types/datetime2.d.ts
generated
vendored
Normal file
5
node_modules/tedious/lib/data-types/datetime2.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const DateTime2: DataType & {
|
||||
resolveScale: NonNullable<DataType['resolveScale']>;
|
||||
};
|
||||
export default DateTime2;
|
||||
118
node_modules/tedious/lib/data-types/datetime2.js
generated
vendored
Normal file
118
node_modules/tedious/lib/data-types/datetime2.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/data-types/datetime2.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/datetime2.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/tedious/lib/data-types/datetimen.d.ts
generated
vendored
Normal file
3
node_modules/tedious/lib/data-types/datetimen.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const DateTimeN: DataType;
|
||||
export default DateTimeN;
|
||||
29
node_modules/tedious/lib/data-types/datetimen.js
generated
vendored
Normal file
29
node_modules/tedious/lib/data-types/datetimen.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
const DateTimeN = {
|
||||
id: 0x6F,
|
||||
type: 'DATETIMN',
|
||||
name: 'DateTimeN',
|
||||
declaration() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
generateTypeInfo() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
generateParameterLength() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
generateParameterData() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
validate() {
|
||||
throw new Error('not implemented');
|
||||
}
|
||||
};
|
||||
var _default = exports.default = DateTimeN;
|
||||
module.exports = DateTimeN;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJEYXRlVGltZU4iLCJpZCIsInR5cGUiLCJuYW1lIiwiZGVjbGFyYXRpb24iLCJFcnJvciIsImdlbmVyYXRlVHlwZUluZm8iLCJnZW5lcmF0ZVBhcmFtZXRlckxlbmd0aCIsImdlbmVyYXRlUGFyYW1ldGVyRGF0YSIsInZhbGlkYXRlIiwiX2RlZmF1bHQiLCJleHBvcnRzIiwiZGVmYXVsdCIsIm1vZHVsZSJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kYXRhLXR5cGVzL2RhdGV0aW1lbi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB0eXBlIERhdGFUeXBlIH0gZnJvbSAnLi4vZGF0YS10eXBlJztcblxuY29uc3QgRGF0ZVRpbWVOOiBEYXRhVHlwZSA9IHtcbiAgaWQ6IDB4NkYsXG4gIHR5cGU6ICdEQVRFVElNTicsXG4gIG5hbWU6ICdEYXRlVGltZU4nLFxuXG4gIGRlY2xhcmF0aW9uKCkge1xuICAgIHRocm93IG5ldyBFcnJvcignbm90IGltcGxlbWVudGVkJyk7XG4gIH0sXG5cbiAgZ2VuZXJhdGVUeXBlSW5mbygpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ25vdCBpbXBsZW1lbnRlZCcpO1xuICB9LFxuXG4gIGdlbmVyYXRlUGFyYW1ldGVyTGVuZ3RoKCkge1xuICAgIHRocm93IG5ldyBFcnJvcignbm90IGltcGxlbWVudGVkJyk7XG4gIH0sXG5cbiAgZ2VuZXJhdGVQYXJhbWV0ZXJEYXRhKCkge1xuICAgIHRocm93IG5ldyBFcnJvcignbm90IGltcGxlbWVudGVkJyk7XG4gIH0sXG5cbiAgdmFsaWRhdGUoKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdub3QgaW1wbGVtZW50ZWQnKTtcbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgRGF0ZVRpbWVOO1xubW9kdWxlLmV4cG9ydHMgPSBEYXRlVGltZU47XG4iXSwibWFwcGluZ3MiOiI7Ozs7OztBQUVBLE1BQU1BLFNBQW1CLEdBQUc7RUFDMUJDLEVBQUUsRUFBRSxJQUFJO0VBQ1JDLElBQUksRUFBRSxVQUFVO0VBQ2hCQyxJQUFJLEVBQUUsV0FBVztFQUVqQkMsV0FBV0EsQ0FBQSxFQUFHO0lBQ1osTUFBTSxJQUFJQyxLQUFLLENBQUMsaUJBQWlCLENBQUM7RUFDcEMsQ0FBQztFQUVEQyxnQkFBZ0JBLENBQUEsRUFBRztJQUNqQixNQUFNLElBQUlELEtBQUssQ0FBQyxpQkFBaUIsQ0FBQztFQUNwQyxDQUFDO0VBRURFLHVCQUF1QkEsQ0FBQSxFQUFHO0lBQ3hCLE1BQU0sSUFBSUYsS0FBSyxDQUFDLGlCQUFpQixDQUFDO0VBQ3BDLENBQUM7RUFFREcscUJBQXFCQSxDQUFBLEVBQUc7SUFDdEIsTUFBTSxJQUFJSCxLQUFLLENBQUMsaUJBQWlCLENBQUM7RUFDcEMsQ0FBQztFQUVESSxRQUFRQSxDQUFBLEVBQUc7SUFDVCxNQUFNLElBQUlKLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQztFQUNwQztBQUNGLENBQUM7QUFBQyxJQUFBSyxRQUFBLEdBQUFDLE9BQUEsQ0FBQUMsT0FBQSxHQUVhWixTQUFTO0FBQ3hCYSxNQUFNLENBQUNGLE9BQU8sR0FBR1gsU0FBUyJ9
|
||||
1
node_modules/tedious/lib/data-types/datetimen.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/datetimen.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"datetimen.js","names":["DateTimeN","id","type","name","declaration","Error","generateTypeInfo","generateParameterLength","generateParameterData","validate","_default","exports","default","module"],"sources":["../../src/data-types/datetimen.ts"],"sourcesContent":["import { type DataType } from '../data-type';\n\nconst DateTimeN: DataType = {\n id: 0x6F,\n type: 'DATETIMN',\n name: 'DateTimeN',\n\n declaration() {\n throw new Error('not implemented');\n },\n\n generateTypeInfo() {\n throw new Error('not implemented');\n },\n\n generateParameterLength() {\n throw new Error('not implemented');\n },\n\n generateParameterData() {\n throw new Error('not implemented');\n },\n\n validate() {\n throw new Error('not implemented');\n }\n};\n\nexport default DateTimeN;\nmodule.exports = DateTimeN;\n"],"mappings":";;;;;;AAEA,MAAMA,SAAmB,GAAG;EAC1BC,EAAE,EAAE,IAAI;EACRC,IAAI,EAAE,UAAU;EAChBC,IAAI,EAAE,WAAW;EAEjBC,WAAWA,CAAA,EAAG;IACZ,MAAM,IAAIC,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDC,gBAAgBA,CAAA,EAAG;IACjB,MAAM,IAAID,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDE,uBAAuBA,CAAA,EAAG;IACxB,MAAM,IAAIF,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDG,qBAAqBA,CAAA,EAAG;IACtB,MAAM,IAAIH,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDI,QAAQA,CAAA,EAAG;IACT,MAAM,IAAIJ,KAAK,CAAC,iBAAiB,CAAC;EACpC;AACF,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaZ,SAAS;AACxBa,MAAM,CAACF,OAAO,GAAGX,SAAS"}
|
||||
5
node_modules/tedious/lib/data-types/datetimeoffset.d.ts
generated
vendored
Normal file
5
node_modules/tedious/lib/data-types/datetimeoffset.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const DateTimeOffset: DataType & {
|
||||
resolveScale: NonNullable<DataType['resolveScale']>;
|
||||
};
|
||||
export default DateTimeOffset;
|
||||
111
node_modules/tedious/lib/data-types/datetimeoffset.js
generated
vendored
Normal file
111
node_modules/tedious/lib/data-types/datetimeoffset.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/data-types/datetimeoffset.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/datetimeoffset.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
node_modules/tedious/lib/data-types/decimal.d.ts
generated
vendored
Normal file
6
node_modules/tedious/lib/data-types/decimal.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const Decimal: DataType & {
|
||||
resolvePrecision: NonNullable<DataType['resolvePrecision']>;
|
||||
resolveScale: NonNullable<DataType['resolveScale']>;
|
||||
};
|
||||
export default Decimal;
|
||||
107
node_modules/tedious/lib/data-types/decimal.js
generated
vendored
Normal file
107
node_modules/tedious/lib/data-types/decimal.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tedious/lib/data-types/decimal.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/decimal.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/tedious/lib/data-types/decimaln.d.ts
generated
vendored
Normal file
3
node_modules/tedious/lib/data-types/decimaln.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const DecimalN: DataType;
|
||||
export default DecimalN;
|
||||
29
node_modules/tedious/lib/data-types/decimaln.js
generated
vendored
Normal file
29
node_modules/tedious/lib/data-types/decimaln.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
const DecimalN = {
|
||||
id: 0x6A,
|
||||
type: 'DECIMALN',
|
||||
name: 'DecimalN',
|
||||
declaration() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
generateTypeInfo() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
generateParameterLength() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
generateParameterData() {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
validate() {
|
||||
throw new Error('not implemented');
|
||||
}
|
||||
};
|
||||
var _default = exports.default = DecimalN;
|
||||
module.exports = DecimalN;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJEZWNpbWFsTiIsImlkIiwidHlwZSIsIm5hbWUiLCJkZWNsYXJhdGlvbiIsIkVycm9yIiwiZ2VuZXJhdGVUeXBlSW5mbyIsImdlbmVyYXRlUGFyYW1ldGVyTGVuZ3RoIiwiZ2VuZXJhdGVQYXJhbWV0ZXJEYXRhIiwidmFsaWRhdGUiLCJfZGVmYXVsdCIsImV4cG9ydHMiLCJkZWZhdWx0IiwibW9kdWxlIl0sInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RhdGEtdHlwZXMvZGVjaW1hbG4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdHlwZSBEYXRhVHlwZSB9IGZyb20gJy4uL2RhdGEtdHlwZSc7XG5cbmNvbnN0IERlY2ltYWxOOiBEYXRhVHlwZSA9IHtcbiAgaWQ6IDB4NkEsXG4gIHR5cGU6ICdERUNJTUFMTicsXG4gIG5hbWU6ICdEZWNpbWFsTicsXG5cbiAgZGVjbGFyYXRpb24oKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdub3QgaW1wbGVtZW50ZWQnKTtcbiAgfSxcblxuICBnZW5lcmF0ZVR5cGVJbmZvKCkge1xuICAgIHRocm93IG5ldyBFcnJvcignbm90IGltcGxlbWVudGVkJyk7XG4gIH0sXG5cbiAgZ2VuZXJhdGVQYXJhbWV0ZXJMZW5ndGgoKSB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LENBQUNGLE9BQU8sR0FBR1gsUUFBUSJ9
|
||||
1
node_modules/tedious/lib/data-types/decimaln.js.map
generated
vendored
Normal file
1
node_modules/tedious/lib/data-types/decimaln.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"decimaln.js","names":["DecimalN","id","type","name","declaration","Error","generateTypeInfo","generateParameterLength","generateParameterData","validate","_default","exports","default","module"],"sources":["../../src/data-types/decimaln.ts"],"sourcesContent":["import { type DataType } from '../data-type';\n\nconst DecimalN: DataType = {\n id: 0x6A,\n type: 'DECIMALN',\n name: 'DecimalN',\n\n declaration() {\n throw new Error('not implemented');\n },\n\n generateTypeInfo() {\n throw new Error('not implemented');\n },\n\n generateParameterLength() {\n throw new Error('not implemented');\n },\n\n generateParameterData() {\n throw new Error('not implemented');\n },\n\n validate() {\n throw new Error('not implemented');\n }\n};\n\nexport default DecimalN;\nmodule.exports = DecimalN;\n"],"mappings":";;;;;;AAEA,MAAMA,QAAkB,GAAG;EACzBC,EAAE,EAAE,IAAI;EACRC,IAAI,EAAE,UAAU;EAChBC,IAAI,EAAE,UAAU;EAEhBC,WAAWA,CAAA,EAAG;IACZ,MAAM,IAAIC,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDC,gBAAgBA,CAAA,EAAG;IACjB,MAAM,IAAID,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDE,uBAAuBA,CAAA,EAAG;IACxB,MAAM,IAAIF,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDG,qBAAqBA,CAAA,EAAG;IACtB,MAAM,IAAIH,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;EAEDI,QAAQA,CAAA,EAAG;IACT,MAAM,IAAIJ,KAAK,CAAC,iBAAiB,CAAC;EACpC;AACF,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaZ,QAAQ;AACvBa,MAAM,CAACF,OAAO,GAAGX,QAAQ"}
|
||||
3
node_modules/tedious/lib/data-types/float.d.ts
generated
vendored
Normal file
3
node_modules/tedious/lib/data-types/float.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { type DataType } from '../data-type';
|
||||
declare const Float: DataType;
|
||||
export default Float;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user