mirror of
https://github.com/knex/knex.git
synced 2025-07-08 01:21:05 +00:00
18 lines
468 B
JavaScript
18 lines
468 B
JavaScript
![]() |
const Formatter = require('../../formatter');
|
||
|
|
||
|
class MSSQL_Formatter extends Formatter {
|
||
|
// Accepts a string or array of columns to wrap as appropriate.
|
||
|
columnizeWithPrefix(prefix, target) {
|
||
|
const columns = typeof target === 'string' ? [target] : target;
|
||
|
let str = '',
|
||
|
i = -1;
|
||
|
while (++i < columns.length) {
|
||
|
if (i > 0) str += ', ';
|
||
|
str += prefix + this.wrap(columns[i]);
|
||
|
}
|
||
|
return str;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = MSSQL_Formatter;
|