oracle / oracle/dotnet-db-samples
Oracle.EntityFrameworkCore update statement and checking rows affected
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 434
- Forks
- 191
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 1
Description
When creating an update the following SQL is generated:
DECLARE
v_RowCount INTEGER;
BEGIN
UPDATE "MyTable" SET "Processed" = :p0, "Updated" = :p1
WHERE "Id" = :p2 AND "Type" = :p3 AND "MessageId" = :p4;
v_RowCount := SQL%ROWCOUNT;
OPEN :cur1 FOR SELECT v_RowCount FROM DUAL;
END;
This code is not efficient because it requires context switching and setting up a new cursor.
is there no other way within the framework that can process the return value of the UPDATE statement?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides a generated Oracle update statement but names no repository file or test. Start by tracing the Oracle.EntityFrameworkCore update path that emits this PL/SQL block, then determine whether the affected-row count can be obtained without the cursor and context switch. Done means documenting or implementing a supported approach and verifying the resulting SQL and row-count behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100