Hey all, I’ve had this issue opened in Github on the boxlang repository for a little while now, hoping to gain some more traction
opened 03:16PM - 01 May 26 UTC
In Progress
## What are the steps to reproduce this issue?
1. Execute INSERT query with the… RETURNING clause to retrieve the data from the row(s) that were just inserted
```
function test() {
var q = queryExecute(
"
INSERT INTO
users (email, password)
VALUES ('test_#createUUID()#@gmail.com', createUUID())
RETURNING id
",
{},
{ result: "local.result" }
);
writedump(q);
writedump(local);
abort;
}
```
## What happens?
The variable `local.result` (QB uses this Line 131 in qb/models/Grammars/BaseGrammar.cfc) does not populate the keys specified in the 'RETURNING' clause - in this case it should be populating `result.local.id` with the primary key of the generated record.
## Any logs, error output, etc?
Here we can compare the two exact same queryExecute calls in boxlang vs lucee
<img width="954" height="862" alt="Image" src="https://github.com/user-attachments/assets/d89cfa11-53f1-4146-98e1-91107e7df5b1" />
<img width="1021" height="767" alt="Image" src="https://github.com/user-attachments/assets/3a0315ac-854e-4a9c-a20f-4611a544fee3" />
## What versions are you using?
**Operating System:** Windows 11 64-bit
**Package Version:** boxlang@1.12.0+49, PostgreSQL 18.3 on x86_64-windows, compiled by msvc-19.44.35225, 64-bit
I saw this when you entered it, but haven’t had any time to do a proper review. The same logic will need to be tested across all our supported JDBC drivers.
Ok thanks, let me know if you need help testing with Postgres