Is returnValues a necessary functionality of a dialect #17264
-
Hi, I am developing a new dialect SAP HANA. HANA does not natively support But when running integration tests, I find that in the I am a bit confused. Could you please confirm if it is necessary? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Supporting The current implementation of |
Beta Was this translation helpful? Give feedback.
-
Thank you @ephys for the reply. Then I have a further question: async insert(instance, tableName, values, options) {
// ...
const results = await this.sequelize.queryRaw(query, options);
if (instance) {
results[0].isNewRecord = false; // error here, results[0] is undefined
}
return results;
} When implement the Do you have any suggestion to solve this error? Should I rewrite the |
Beta Was this translation helpful? Give feedback.
-
In case you were working on an implementation with the goal of opening a PR to Sequelize, I want to make sure to avoid bad surprises so I took a minute to document our current process to access new dialects on our website It's still a draft, but it should accurately represent our current process - https://6613cff1f540a100a20dbfd3--sequelize-site.netlify.app/docs/v7/databases/new/ (PR sequelize/website#742) |
Beta Was this translation helpful? Give feedback.
Supporting
returnValues
is not necessary and indeed only a couple of dialects support itThe current implementation of
insertQuery
will ignore thereturning
option if thesupports.returnValues
config of the dialect is false