Skip to content

Releases: Entity-Access/entity-access

v1.0.411

21 Apr 10:30
Compare
Choose a tag to compare

Full Changelog: v1.0.408...v1.0.411

Simple Join

You can join two tables only as a where clause. Selecting combined mapping will be released in future.

The following example shows how to join two tables with no relations and with on clause for like method.

const fp = db.filePermissions.where({ userID} , (p) => (x) => x.useID === p.userID);

q = db.files.innerJoin(fp, (fq) => (x) => Sql.text.startsWith(x.path, fq.path));

Union All

You can union multiple queries a single query for improved performance instead of using OR clause.

const ownedFiles = db.files.where({userID}, (p) => (x) => x.ownerID === p.userID);
const sharedFiles = db.files.where({userID}, (p) => (x) => x.fileShares.some((fs) => fs.ownerID === p.userID));

const allFiles = sharedFiles.unionAll(ownedFiles);

v1.0.408

06 Mar 06:13
Compare
Choose a tag to compare

Full Changelog: v1.0.403...v1.0.408

Added RANK, DENSE_RANK, ROW_NUMBER window functions.

(p) => (x) => Sql.window.denseRank.orderBy(x.marks) => DENSE_RANK() OVER (ORDER BY marks)

(p) => (x) => Sql.window.denseRank.partitionByOrderBy(x.class, x.marks) => DENSE_RANK() OVER (PARTITION BY class ORDER BY marks)

v1.0.403

15 Feb 09:53
Compare
Choose a tag to compare

Full Changelog: v1.0.376...v1.0.403

  1. Added isJson in Sql Functions.
  2. Added updateSelect to perform select after updating values.
  3. Added High performance Json Serialization, which serializes json asynchronously.
  4. Json Serialization is non recursive function which reduces pressure on stack.
  5. Added preJson event that is executed before json serilalization

v1.0.376

22 Nov 04:00
Compare
Choose a tag to compare

Full Changelog: v1.0.365...v1.0.376

  1. Added register disposable in DI Scope
  2. ForeignKeyConstraint added for RelateOne
  3. Multiple transactions in single scope fixed
  4. Added error message parameter for firstOrFail

v1.0.365

17 Oct 06:55
Compare
Choose a tag to compare

Full Changelog: v1.0.364...v1.0.365

  1. QueryExpander's parentType fixed.

v1.0.364

10 Oct 05:24
Compare
Choose a tag to compare

Full Changelog: v1.0.346...v1.0.364

  1. Made null not distinct on Postgres as default.
  2. Index creation issue fixed on Postgres.
  3. Null check made explicit in direct statements.
  4. Added unit test for insertInto.
  5. Added ThrottleGroup for workflows.
  6. Duplicate ChangeSet detection fixed.
  7. Added DateTime as Default type for Postgres and Sql Server drivers.

v1.0.346

23 Jul 12:30
Compare
Choose a tag to compare

What's Changed

  1. Added simple statements for direct execution instead of saveDirect.
  2. Added missing negate experession

Full Changelog: v1.0.320...v1.0.346

v1.0.320

06 Jul 10:06
Compare
Choose a tag to compare

Full Changelog: v1.0.301...v1.0.320

  1. Added sum of items, see below.
  2. Projection with filter fixed.
  3. Sql transformer rewritten to improve speed.
  4. Added transaction save points.
  5. likeAny query improved for Postgres.
  6. Added text length function like Sql.text.length(.)
  7. Added updateSelect
  8. Improved SaveChanges with directly generated queries instead of query expressions
Sql.coll.sum( (x) => x.products
      .map((p) => ({
         total: 1,
         paid: p.orders
               .filter((o) => o.status === "paid")
               .some((o) => true) ? 1 : 0
      }) )

This way you can get count of all orders and paid ones in a single call.

v1.0.301

20 Jun 04:51
Compare
Choose a tag to compare

Full Changelog: v1.0.290...v1.0.301

  1. Added trace in save options, you can view every query executed in save changes.
  2. Constraint name check fixed for postgres.
  3. Added FK constraint name.
  4. Include relation fixed.

v1.0.290

01 Jun 14:39
Compare
Choose a tag to compare

What's Changed

  • Added Check Constraints

  • Added task groups in workflows

  • Added throttle group in workflows

  • Fixed limit/offset in projections

  • Transaction auto commit on error replaced with rollback

  • Dev by @ackava in #56

  • Merge main by @ackava in #58

Full Changelog: v1.0.260...v1.0.290