dyno-table 2.3.0 → 2.3.1
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.
- package/README.md +0 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -163,24 +163,6 @@ await table.transaction(tx => [
|
|
|
163
163
|
```
|
|
164
164
|
**[Transactions Guide →](docs/transactions.md)**
|
|
165
165
|
|
|
166
|
-
### Type-Safe Field Selection
|
|
167
|
-
*Get exactly what you need with automatic TypeScript inference*
|
|
168
|
-
|
|
169
|
-
```ts
|
|
170
|
-
// Select specific fields - TypeScript knows the result type!
|
|
171
|
-
const basicInfo = await dinoRepo.query
|
|
172
|
-
.getDinosaursByDiet({ diet: "herbivore" })
|
|
173
|
-
.select(["species", "period", "diet"])
|
|
174
|
-
.execute();
|
|
175
|
-
|
|
176
|
-
for await (const dino of basicInfo) {
|
|
177
|
-
console.log(dino.species); // ✅ string
|
|
178
|
-
console.log(dino.period); // ✅ "triassic" | "jurassic" | "cretaceous"
|
|
179
|
-
// console.log(dino.weight); // ❌ TypeScript error - not selected
|
|
180
|
-
}
|
|
181
|
-
```
|
|
182
|
-
**[Type Safety Guide →](docs/type-safety.md)**
|
|
183
|
-
|
|
184
166
|
### Pagination & Memory Management
|
|
185
167
|
*Handle large datasets efficiently*
|
|
186
168
|
|