Skip to content

Schema

Choose a tag to compare

@LCluber LCluber released this 06 Mar 20:46
· 71 commits to main since this release
  • add schema parameter to entity constructor to support multiple schemas in the same database
  • Update Property interface to align with @dwtechs/antity 0.15.0
    • Remove methods property (REST methods like GET, POST, PUT, DELETE)
    • Remove required boolean property
    • Remove safe boolean property
    • Remove sanitize boolean property
    • Remove normalize boolean property
    • Remove validate boolean property
    • Add need property: array of REST methods (POST, PUT, PATCH) that require this property in request body
    • Add send property: boolean to indicate if property should be sent in response
  • Add convenience express substack middlewares :
    • addArraySubstack: Returns [normalizeArray, validateArray, add] middleware chain
    • addOneSubstack: Returns [normalizeOne, validateOne, add] middleware chain
    • updateArraySubstack: Returns [normalizeArray, validateArray, update] middleware chain
    • updateOneSubstack: Returns [normalizeOne, validateOne, update] middleware chain
  • change queryArchived function name to queryByDate to better reflect its purpose of generating queries for deleting archived rows based on a date condition
    • queryByDate function now generates a query that uses a hard_delete() function in postgreSQL in order to delete rows and their history in a single query
  • Add history getter to entity that generates a query to retrieve the history of changes for a specific row based on its ID
  • Update dependencies:
    • "@dwtechs/antity": "0.15.0"