Skip to content

Releases: samhuk/ts-pg-orm

v5.1.0

Choose a tag to compare

@samhuk samhuk released this 10 Oct 23:48
4d8f1f9

Summary

This version contains breaking changes. This minor version bump had 4 primary goals:

  1. Create a public API for the package so that users don't have to import from nested directories within ts-pg-orm/dist/...
  2. Fix bug with related data properties not showing for get() and getMany() store functions.
  3. Support for circular relations when provisioning and unprovisioning stores.
  4. Incremental quality improvements, e.g. less reliance on @ts-ignore' and better createRelation()` code.

New Features:

  • Support for circular relations (this required a lot of changes to the store provisioning code).

Improvements:

  • Reduce dependence on @ts-ignore and instead use Access<T> and Cast<T> "forcer generics".
  • Providing a simplified single-level public API for all of the functions, enums, types, etc. that are required to use the package. This is at the root level index.ts file, so they are all easily accessible.
  • Fix a bug with 5.0.x where related data props were not included in get() and getMany() store functions due to how the name property of the Relation type was declared.
  • Ensure only absolutely required typescript is included in typescript dist directory (for npm publishing)
  • Improve ts build npm commands
  • Improvement in the createRelation() code.
  • Etc.

v5.0.1

Choose a tag to compare

@samhuk samhuk released this 05 Oct 12:48
42f12f2

This patch uses prepared statements (i..e numbered parameters) for queries instead of inlined values. This improves security and standardised value serialization.

v5.0.0

Choose a tag to compare

@samhuk samhuk released this 03 Oct 08:30
d01db86

V5 of ts-pg-orm primarily focuses on improving two areas:

  • How data formats and relations are defined:
    • Require less use of as const
    • Make data type and sub-type names more terse
    • (Generally make defining data formats and relations easier)
    • Simplify the typing code of data formats and relations
    • Improve the performance of typing code to make tsc compilation (=> intellisense) faster
  • How stores are created, provisioned, and accessed.

V5 also refactors all of the core typing code to be simpler and more accessible (e.g. less use of vaguely-named generics like "I, J, K, L", etc.)

v4.3.2

Choose a tag to compare

@samhuk samhuk released this 21 Sep 18:22

4.3.1 and 4.3.2 have focused on various minor fixes and begins introducing some essential integration tests to cover data store functionality. These tests connect to a real postgresql database and runs some store functions with some assertions on the results.

v4.3.0

Choose a tag to compare

@samhuk samhuk released this 19 Sep 16:03
90d3a4a

Existing store function changes:

  • Rename getSingle to get
  • Rename getMultiple to getMany
  • Rename updateSingle to update, and include handling for queries with and without LIMIT, OFFSET, and ORDER BY
  • Rename deleteSingle to delete, and include handling for queries with and without LIMIT, OFFSET, and ORDER BY

New store functions:

  • exists
  • count

Additionally, large store code organizational improvement and README simplification.

v4.2.0

Choose a tag to compare

@samhuk samhuk released this 15 Sep 19:29
81c3990
  • Related data paging
    • See the PR for information about this change

v4.1.4

Choose a tag to compare

@samhuk samhuk released this 15 Aug 12:20
29928b7
  • Join table store updates:
    • createLink() -> create()
    • deleteLinkById() -> deleteById()
    • typing for includeDateCreated
    • fix sql for includeDateCreated

v4.1.3

Choose a tag to compare

@samhuk samhuk released this 15 Aug 09:27
  • Early beta join table store functionality.
    • Has createLink, createLinks, and deleteLinkById
    • real-db-test example includes a basic test of it
  • Fixes some incorrect join table SQL.