forked from DebaucheryLibrarian/traxxx
14 lines
269 B
JavaScript
Executable File
14 lines
269 B
JavaScript
Executable File
'use strict';
|
|
|
|
const knex = require('../knex');
|
|
|
|
async function init() {
|
|
const result = await knex.raw('SELECT * FROM json_to_recordset(:ids) AS x(id int)', {
|
|
ids: JSON.stringify([{ id: 1, foo: 'bar' }, { id: 2 }, { id: 3 }]),
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
init();
|