I just can't figure out how returning should work.
Builder config:
{ dialect: 'mssql', separatedValues: false }
Query:
const query = {
table: 'Messages',
type: 'insert',
returning: ['ID'],
values: {
Name: 'Blah',
Text: 'Some text'
}
}
Yeilds:
insert into "Messages" ("Name", "Text") values ('Blah', 'Some text') returning "ID";
Error:
RequestError: Incorrect syntax near 'returning'.
Obviously this will fail, as is not valid MSSQL syntax.
Am just trying to output the inserted row's primary key. It doesn't seem like valid
I just can't figure out how
returningshould work.Builder config:
{ dialect: 'mssql', separatedValues: false }Query:
Yeilds:
insert into "Messages" ("Name", "Text") values ('Blah', 'Some text') returning "ID";Error:
RequestError: Incorrect syntax near 'returning'.Obviously this will fail, as is not valid MSSQL syntax.
Am just trying to output the inserted row's primary key. It doesn't seem like valid