-
-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Method .returning() working incorrect with .get() method #158
Comments
I can confirm, I was also seeing this issue! I have to |
1. Issue link - #158 2. Add test cases for SQLite Proxy Driver
@Bulbang @Sandy-Garrido this issue was fixed and released in Have added additional test cases for Please confirm it's worked for you and I'll close this issue |
Hmm 🤔 it doesn't look to have been fixed. I triple checked the version etc. export const createApiKey = (): ApiKey => {
const uuid = uuidv4();
const apiKey = db
.insert(apiKeys)
.values({
apiKey: uuid,
createdAt: new Date()
})
.returning();
console.log(apiKey.all()[0]);
console.log(apiKey.get());
return apiKey.all()[0];
};
|
@Sandy-Garrido is it |
@AndriiSherman That's a good point! No, this test repository is using |
Good, so I have fixed this one only for |
Will ping you here after release |
@AndriiSherman Yep, it seems to be working well now. Thanks. |
1. Issue link - drizzle-team/drizzle-orm#158 2. Add test cases for SQLite Proxy Driver
1. Issue link - drizzle-team#158 2. Add test cases for SQLite Proxy Driver
What version of
drizzle-orm
are you using?0.17.4
Describe the Bug
Method
.returning()
is not working properly with method.get()
Full context you can find in these files:
schema.ts
SqliteJson.ts
schema.ts
SqliteJson.ts
Code with bug
Log:
But when I changed
const result = query.get()
toconst result = query.all()
it seems to be working wellLog with
.all()
method:The text was updated successfully, but these errors were encountered: