Skip to content

Commit 1fb54d8

Browse files
Copilothl662
andcommitted
Resolve merge conflict in NextVersion.md for backport PR #9059
Co-authored-by: hl662 <50554904+hl662@users.noreply.github.com>
1 parent acc61c1 commit 1fb54d8

1 file changed

Lines changed: 0 additions & 66 deletions

File tree

docs/changehistory/NextVersion.md

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,74 +3,8 @@ publish: false
33
---
44
# NextVersion
55

6-
<<<<<<< HEAD
7-
=======
8-
- [NextVersion](#nextversion)
9-
- [@itwin/core-backend](#itwincore-backend)
10-
- [WithQueryReader API](#withqueryreader-api)
11-
- [Display](#display)
12-
- [Fixes](#fixes)
13-
14-
## @itwin/core-backend
15-
16-
### WithQueryReader API
17-
18-
A new [withQueryReader]($docs/learning/backend/WithQueryReaderCodeExamples.md) method has been added to both [ECDb]($backend) and [IModelDb]($backend), providing true row-by-row behavior for ECSQL queries with synchronous execution. This API introduces a new [ECSqlSyncReader]($backend) through the [ECSqlRowExecutor]($backend) and supports configuration via [SynchronousQueryOptions]($backend).
19-
20-
**Key Features:**
21-
22-
- **True row-by-row streaming**: Unlike the existing async reader APIs, `withQueryReader` provides synchronous row-by-row access to query results
23-
- **Consistent API across databases**: The same interface is available on both `ECDb` and `IModelDb` instances
24-
- **Configurable behavior**: Support for various query options through `SynchronousQueryOptions`
25-
26-
**Usage Examples:**
27-
28-
```typescript
29-
// ECDb usage
30-
db.withQueryReader("SELECT ECInstanceId, UserLabel FROM bis.Element LIMIT 100", (reader) => {
31-
while (reader.step()) {
32-
const row = reader.current;
33-
console.log(`ID: ${row.id}, Label: ${row.userLabel}`);
34-
}
35-
});
36-
37-
// IModelDb usage with options
38-
iModelDb.withQueryReader(
39-
"SELECT ECInstanceId, CodeValue FROM bis.Element",
40-
(reader) => {
41-
while (reader.step()) {
42-
const row = reader.current;
43-
processElement(row);
44-
}
45-
}
46-
);
47-
```
48-
49-
**Migration from deprecated APIs:**
50-
51-
This API serves as the recommended replacement for synchronous query scenarios previously handled by the deprecated `ECSqlStatement` for read-only operations:
52-
53-
```typescript
54-
// Before - using deprecated ECSqlStatement
55-
db.withPreparedStatement(query, (stmt) => {
56-
while (stmt.step() === DbResult.BE_SQLITE_ROW) {
57-
const row = stmt.getRow();
58-
processRow(row);
59-
}
60-
});
61-
62-
// Now - using withQueryReader
63-
db.withQueryReader(query, (reader) => {
64-
while (reader.step()) {
65-
const row = reader.current;
66-
processRow(row);
67-
}
68-
});
69-
```
70-
716
## Display
727

738
### Fixes
749

7510
- Fixed reality data geometry not being reprojected correctly when the reality data is in a different CRS than the iModel.
76-
>>>>>>> d122ee67a0 (Fix reality data not being reprojected correctly when its CRS is different than iModel (#9059))

0 commit comments

Comments
 (0)