MCPcopy
hub / github.com/sequelize/sequelize / formatBindParameters

Method formatBindParameters

lib/dialects/db2/query.js:168–183  ·  view source on GitHub ↗
(sql, values, dialect)

Source from the content-addressed store, hash-verified

166 }
167
168 static formatBindParameters(sql, values, dialect) {
169 let bindParam = {};
170 const replacementFunc = (match, key, values) => {
171 if (values[key] !== undefined) {
172 bindParam[key] = values[key];
173 return '?';
174 }
175 return undefined;
176 };
177 sql = AbstractQuery.formatBindParameters(sql, values, dialect, replacementFunc)[0];
178 if (Array.isArray(values) && typeof values[0] === 'object') {
179 bindParam = values;
180 }
181
182 return [sql, bindParam];
183 }
184
185 filterSQLError(err, sql, connection) {
186 if (err.message.search('SQL0204N') != -1 && _.startsWith(sql, 'DROP ')) {

Callers 2

queryMethod · 0.45
query.test.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected