@mikro-orm/core 7.1.0-dev.11 → 7.1.0-dev.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -110,6 +110,20 @@ export interface FindAllOptions<T, P extends string = never, F extends string =
110
110
  }
111
111
  /** Options for streaming query results via `em.stream()`. */
112
112
  export interface StreamOptions<Entity, Populate extends string = never, Fields extends string = never, Exclude extends string = never> extends Omit<FindAllOptions<Entity, Populate, Fields, Exclude>, 'cache' | 'before' | 'after' | 'first' | 'last' | 'overfetch' | 'strategy'> {
113
+ /**
114
+ * How many rows to fetch in one round-trip.
115
+ * Lower values will result in more queries and network bandwidth, but less memory usage.
116
+ * Higher values will result in fewer queries and network bandwidth, but higher memory usage.
117
+ * Note that the results are iterated one row at a time regardless of this value.
118
+ *
119
+ * Honored on PostgreSQL (cursor-based fetch), MSSQL (tedious stream chunk size),
120
+ * Oracle (mapped to `fetchArraySize`) and MongoDB (mapped to `batchSize`). Ignored
121
+ * on MySQL, MariaDB, SQLite and libSQL, where the underlying driver already streams
122
+ * row-by-row with no batching knob.
123
+ *
124
+ * @default 100 (on dialects that honor it)
125
+ */
126
+ chunkSize?: number;
113
127
  /**
114
128
  * When populating to-many relations, the ORM streams fully merged entities instead of yielding every row.
115
129
  * You can opt out of this behavior by specifying `mergeResults: false`. This will yield every row from
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "7.1.0-dev.11",
3
+ "version": "7.1.0-dev.12",
4
4
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
5
5
  "keywords": [
6
6
  "data-mapper",
package/utils/Utils.js CHANGED
@@ -141,7 +141,7 @@ export function parseJsonSafe(value) {
141
141
  /** Collection of general-purpose utility methods used throughout the ORM. */
142
142
  export class Utils {
143
143
  static PK_SEPARATOR = '~~~';
144
- static #ORM_VERSION = '7.1.0-dev.11';
144
+ static #ORM_VERSION = '7.1.0-dev.12';
145
145
  /**
146
146
  * Checks if the argument is instance of `Object`. Returns false for arrays.
147
147
  */