Releases: sensedeep/dynamodb-onetable
v2.0.3
Minor Patch Release
Features
- Unify error handling with OneTable error instances. Add more context and details to error messages.
- Add properties to params.transform to all properties are visible
- Add @{...list} substitutions to support lists with filterExpressions and IN
- Add Table.update
Fixes
- Refactor transform* routines to clean up
- Fix orderFields with nested value templates
- Fix table transformer function
- Fix missing TypeScript definitions for transform functions
- Clarify README doc on transform
- Fix Table.assign to handle recursive Object.assign
- Fix zeroing metric counters after flush
- Fix remove Nulls for plain objects only
- Fix table transform for read #168
- Update sample package.json versions
See
v2.0.2
v2.0.1
v2.0.0
Major Feature Release
The 2.0.0 release is to mark a stability milestone and to remove deprecated / legacy code.
The key new feature is a move to "Self Describing Tables" where the table schema is store internally in the table so the data can be self-describing by tools such as migration managers, data browsers and single table designers. This is an optional, but recommended feature. The normal operation of using a coded schema is still the recommended pattern (faster startup), but persisting the schema in the table itself opens this new world of capabilities.
Features
- Added the OneTable Schema Specification
- Remove previously deprecated code and features
- Fully support in-table schemas so tables can be self-describing. This necessitates making schemas more declarative and removing some in-schema callback functions.
- Added Table.getKeys to read the table key structure.
- Improved Documentation
- Code modularized for schema & metrics
###Breaking Compatibility
- The
delimiter
parameter to the Table constructor has been removed. Delimiters are now determined implicitly by the value templates used by the schema keys. - The schema field
transform
and Tableintercept
callbacks are removed. Use the Tabletransform
and API params.transform instead. - The schema field.value and field.default parameters should be literal values. While this code has been previously deprecated, to give users more time to transition, this will emit a console warning indicating that this is deprecated.
- Removed find
items.start
useitems.next
instead. - Remove
legacyUnique
workaround. - If using a delimiter other than '#' with unique properties, the unique items may change and you may need to read/write such items to re-create the unique items.
Fixes
See
v1.9.4
v1.9.3
v1.9.2
Minor Patch Release
Features
- Continued development of schema in-table storage and APIs.
Fixes
- Fix TS types for get() APIs to permit returning undefined.
- Fix for nested schema using defaults and UUIDs. #140
- Fix for find with unresolved value template references. #156
- General fixes for Schema read/write APIs.
See
v1.9.1
Minor Patch Release
Features
- Continued development of schema in-table storage and APIs.
Fixes
- Fixes for schema read / write
- Ensure item type is set when hidden: true on read
- Make next/prev of find() results non-enumerable
- Set updateIndexes if exists: true on update() (incase actually doing create).
- (Re)Fix nested properties. #140
See
v1.9.0
Major Feature Release
This release adds support to save the OneTable schema in the database along with any migrations. This permits a DynamoDB table to be self-describing without requiring external code or schemas. This enables support for better tooling such as entity level data browsers, schema designers, entity level monitoring and high level data migrations.
The goal is to make Single Table design much easier and more productive.
SenseDeep and other products are adding support for such OneTable integrations.
Features
- Support saving and persisting schema: Table.setSchema, readSchema, saveSchema
- Define Schema and Migration models internally
- Add schema.params to provide Table constructor params from persistent storage
Breaking Compatibility
- The type field is now hidden by default. Use {hidden: true} in the params to return it. If using
fetch
or groupByType, you will probably need to include {hidden: true} in the params to return items with the type. - Refactor transforms via:
- Deprecate Table.intercept and rename as Table.transform
- Remove Params.transform (was undocumented)
- Remove Schema Fields.transform and add Params.transform
Persisting Schemas
To assist better tooling for Single Table designs support is added to persist schemas in the table using the _Schema keys. The schema will also contain the Table constructor parameters including the typeField and delimiter. This permits auto-discovery of table items by reading the schema and from there, the item keys can be decoded.
Refactored Transforms
The previous ad-hoc scheme of transformers has been cleaned up and centralized as the Table params.transform and general API params.transform. Performing Schema field.transform is problematic if persisting schemas. So this functionality should be moved to the Table transformer which operates on the entire item rather than per field.
Enhanced metrics with:
- Add metrics.env for dynamic control via the LOG_FILTER env var
- Add metrics.enable to control emission of metrics
- Add metrics.queries to enable query profiling
- Add Tenant dimension
- Add metrics.dimensions for configurable dimensions
- Add metrics.properties for additional properties to add to the EMF record.
Fixes
- Stop doing a get and transaction on unique property updates.
- Nested unique properties inside transactions. #134
- Optimize handling of unique property updates. #129
- Make the typeField hidden by default.
- Convert Date objects when writing without a schema.
See
v1.8.2
Minor Feature Release
Features
- Improved TS definitions to support
required
attributes