How to use the getRecordValuesForSQL function from mssql

Find comprehensive JavaScript mssql.getRecordValuesForSQL code examples handpicked from public code repositorys.

250
251
252
253
254
255
256
257
258
259
        .join(',')))
        .join(`)\n,(`)})`;
    return `INSERT INTO ${schemaAndTable} (${insertFieldsList}) ${addOutputInserted ? ' OUTPUT inserted.* ' : ''} VALUES ${values}`;
},
getUpdateSQL (record) {
    const recordForSQL = sql.getRecordValuesForSQL(record, this.schema);
    const setArray = [];
    updateFields.forEach((fName) => {
        if (recordForSQL[fName] !== undefined) {
            setArray.push(`[${fName}] = ${recordForSQL[fName]}`);
fork icon0
star icon0
watch icon0