electrodb 1.10.0 → 1.11.0
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 +6 -3
- package/index.d.ts +1824 -3
- package/package.json +6 -9
- package/src/clauses.js +5 -3
- package/src/entity.js +125 -14
- package/src/schema.js +14 -3
- package/src/types.js +6 -0
- package/src/util.js +6 -2
- package/src/entity.d.ts +0 -94
- package/src/entity.test-d.ts +0 -110
- package/src/parse.js +0 -45
- package/src/service.d.ts +0 -17
- package/src/types/client.ts +0 -15
- package/src/types/collections.ts +0 -243
- package/src/types/events.ts +0 -47
- package/src/types/index.ts +0 -67
- package/src/types/model.ts +0 -132
- package/src/types/options.ts +0 -81
- package/src/types/schema.test-d.ts +0 -2507
- package/src/types/schema.ts +0 -1016
- package/src/types/tests.test-d.ts +0 -3
- package/src/types/types.test-d.ts +0 -142
- package/src/types/where.test-d.ts +0 -1939
- package/src/types/where.ts +0 -94
package/README.md
CHANGED
|
@@ -2607,9 +2607,10 @@ const formattedQueryResults = myEntity.parse(formattedQueryResults);
|
|
|
2607
2607
|
|
|
2608
2608
|
Parse also accepts an optional `options` object as a second argument (see the section [Query Options](#query-options) to learn more). Currently, the following query options are relevant to the `parse()` method:
|
|
2609
2609
|
|
|
2610
|
-
Option | Default
|
|
2611
|
-
----------------- :
|
|
2612
|
-
|
|
2610
|
+
Option | Type | Default | Notes
|
|
2611
|
+
----------------- : -------- : ------------------ | -----
|
|
2612
|
+
ignoreOwnership | boolean | `true` | This property defaults to `true` here, unlike elsewhere in the application when it defaults to `false`. You can overwrite the default here with your own preference.
|
|
2613
|
+
attributes | string[] | _(all attributes)_ | The `attributes` option allows you to specify a subset of attributes to return
|
|
2613
2614
|
|
|
2614
2615
|
# Building Queries
|
|
2615
2616
|
> For hands-on learners: the following example can be followed along with **and** executed on runkit: https://runkit.com/tywalch/electrodb-building-queries
|
|
@@ -4300,6 +4301,7 @@ By default, **ElectroDB** enables you to work with records as the names and prop
|
|
|
4300
4301
|
logger?: (event) => void;
|
|
4301
4302
|
listeners Array<(event) => void>;
|
|
4302
4303
|
preserveBatchOrder?: boolean;
|
|
4304
|
+
attributes?: string[];
|
|
4303
4305
|
};
|
|
4304
4306
|
```
|
|
4305
4307
|
|
|
@@ -4307,6 +4309,7 @@ Option | Default | Description
|
|
|
4307
4309
|
------------------ | :------------------: | -----------
|
|
4308
4310
|
params | `{}` | Properties added to this object will be merged onto the params sent to the document client. Any conflicts with **ElectroDB** will favor the params specified here.
|
|
4309
4311
|
table | _(from constructor)_ | Use a different table than the one defined in the [Service Options](#service-options)
|
|
4312
|
+
attributes | _(all attributes)_ | The `attributes` query option allows you to specify ProjectionExpression Attributes for your `get` or `query` operation. As of `1.11.0` only root attributes are allowed to be specified.
|
|
4310
4313
|
raw | `false` | Returns query results as they were returned by the docClient.
|
|
4311
4314
|
includeKeys | `false` | By default, **ElectroDB** does not return partition, sort, or global keys in its response.
|
|
4312
4315
|
pager | `"named"` | Used in with pagination (`.pages()`) calls to override ElectroDBs default behaviour to break apart `LastEvaluatedKeys` records into composite attributes. See more detail about this in the sections for [Pager Query Options](#pager-query-options).
|