Skip to content

Releases: event-driven-io/Pongo

0.13.1

27 Aug 19:37
Compare
Choose a tag to compare

📝 What's Changed

Full Changelog: 0.13.0...0.13.1

0.13.0

27 Aug 07:26
Compare
Choose a tag to compare

🚀 What's New

  • Bumped dependencies to the latest versions, some of them by major by @oskardudycz in #65

📝 What's Changed

Full Changelog: 0.12.5...0.13.0

0.12.5

27 Aug 07:24
Compare
Choose a tag to compare

📝 What's Changed

  • Fixed pool with ambient connection when pooled is set to false Previously, it wasn't using dumbo connection but falling back to non-pooled mode recreating pg connection on each request by @oskardudycz in #64

Full Changelog: 0.12.4...0.12.5

0.12.4

08 Aug 16:33
Compare
Choose a tag to compare

📝 What's Changed

  • Moved shim exports to the top level instead of a nested folder to make types import possible without dist by @oskardudycz in #62

Full Changelog: 0.12.3...0.12.4

0.12.3

08 Aug 16:25
Compare
Choose a tag to compare

📝 What's Changed

  • Updated sample to latest improvements between 0.4.0 and 0.12.2 by @oskardudycz in #60
  • Added typesVersion for shim to allow using shim imports without dist by @oskardudycz in #61

Full Changelog: 0.12.2...0.12.3

0.12.2

08 Aug 14:46
Compare
Choose a tag to compare

📝 What's Changed

Full Changelog: 0.12.1...0.12.2

0.12.1

08 Aug 13:00
Compare
Choose a tag to compare

📝 What's Changed

  • Fixed findOne, countDocuments and other queries that don't have a filter by @oskardudycz in #58

Full Changelog: 0.12.0...0.12.1

0.12.0

08 Aug 11:42
Compare
Choose a tag to compare

🚀 What's New

  • Ported pg-format directly into dumbo It's working but is not maintained and is causing compatibility issues in Cloudflare Workers. Eventually, we'll need something smarter and modern, e.g. like PostgreSQL SQL template literal. by @oskardudycz in #57

Full Changelog: 0.11.0...0.12.0

0.11.0

08 Aug 11:37
Compare
Choose a tag to compare

🚀 What's New

  • Moved shim to separate bundle to remove automatic dependency to MongoDB package. Now it won't be always loading. Loading it automatically caused compatibility issues in Cloudflare Workers, plus increased bundle size. Now you can access it by `@event-driven-io/pongo/shim' by @oskardudycz in #56

📝 What's Changed

  • Adjusted transaction typing in Dumbo to include DBClient type Thanks to that, transaction's connection typing will be correctly resolved by @oskardudycz in #55

Full Changelog: 0.10.0...0.11.0

0.10.0

07 Aug 10:16
Compare
Choose a tag to compare

🚀 What's New

Refactored pooling, connection, transaction setup. Most of the work was made in Dumbo to enable future use of other databases or PostgreSQL drivers.

Now Dumbo should be usable even as a standalone package. You can do the following:

import { dumbo, rawSql } from '@event-driven-io/dumbo';

const pool = dumbo({ connectionString });

const result = await pool.execute.query<User>(rawSql('SELECT * from users'));

or with transactions:

import { dumbo, sql } from '@event-driven-io/dumbo';

const userId = 32;
const userName = "[email protected]";
const pool = dumbo({ connectionString });

await pool.withTransaction(async ({ execute }) => {
  await execute.command(sql('INSERT INTO users VALUES(%s, %L)', userId, userName));
  await execute.command(sql('INSERT INTO user_roles VALUES(%s, %L)', userId, 'admin') );
})

You can now also share the connection and transaction between your tool and Pongo, e.g. by doing:

import { dumbo, sql } from '@event-driven-io/dumbo';

const userId = 32;
const userName = "[email protected]";
const pool = dumbo({ connectionString });

await pool.withTransaction(async ({ execute }) => {
  // sharing transaction connection with pongo
  const pongo = pongoClient(connectionString, { connection });
  
  const users = pongo.db().collection<User>('users');
  await users.insertOne({ name: randomUUID() });
  await users.insertOne({ name: randomUUID() });

  // doing also insert outside of pongo
  await execute.command(sql('INSERT INTO user_roles VALUES(%s, %L)', userId, 'admin') );
})

That will be a basis for extended integration between Pongo and Emmett. A new projection type will be easier to add (e.g. for doing custom SQL based on events).

by @oskardudycz in #54

Full Changelog: 0.9.0...0.10.0