-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Description
Issue description
Google Spanner not return after insert
Expected Behavior
Hi,
I'm using Spanner database and it has returning option supported.
Documentation Spanner Returning data after insert:
https://cloud.google.com/spanner/docs/reference/postgresql/dml-syntax#insert-returning
Actual Behavior
But typeorm is give error:
'OUTPUT or RETURNING clause only supported by Microsoft SQL Server or PostgreSQL or MariaDB databases.'
Steps to reproduce
const result = await queryRunner.manager
.createQueryBuilder()
.insert()
.into(CostCenter)
.values(entity)
.updateEntity(false)
.returning(['id'])
.execute(); // Executes pure INSERT/**/
OR/AND
const result = await queryRunner.manager.insert(CostCenter, entity);
My Environment
| Dependency | Version |
|---|---|
| Operating System | |
| Node.js version | 22 |
| Typescript version | x.y.zzz |
| TypeORM version | x.y.zzz |
Additional Context
No response
Relevant Database Driver(s)
- aurora-mysql
- aurora-postgres
- better-sqlite3
- cockroachdb
- cordova
- expo
- mongodb
- mysql
- nativescript
- oracle
- postgres
- react-native
- sap
- spanner
- sqlite
- sqlite-abstract
- sqljs
- sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.