Skip to content

Releases: event-driven-io/Pongo

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 = "test@test.com";
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 = "test@test.com";
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

0.9.0

03 Aug 14:16
Compare
Choose a tag to compare

🚀 What's New

  • Added support for Mongo Sessions and Transactions. by @oskardudycz in #40
  • Introduced abstractions for Pool, Connection, and Transaction. This will enable the introduction of other database types (e.g. SQLite or MySQL) and drivers like Postgres. by @oskardudycz in #40
  • Made easier disabling connection pool by passing { pooled: false } options to Pongo Client creation. Now, for database hostings with internal pooling (e.g. Cloudflare HyperDriver, Supabase, Neon), you can just disable default pooling by this simple setting. by @oskardudycz in #40

Full Changelog: 0.8.0...0.9.0

0.8.0

29 Jul 13:43
Compare
Choose a tag to compare

🚀 What's New

📄 Docs

  • Added new Discord invitation link. Now it won't expire as the previous one. by @oskardudycz in #37

Full Changelog: 0.7.0...0.8.0

0.7.0

12 Jul 18:10
Compare
Choose a tag to compare

🚀 What's New

  • Exposed option to inject pg.PoolClient I made mishap earlier and not exposed it fully. by @oskardudycz in #34

Full Changelog: 0.6.1...0.7.0

0.6.1

12 Jul 17:10
Compare
Choose a tag to compare

📝 What's Changed

Full Changelog: 0.6.0...0.6.1

0.6.0

12 Jul 17:01
Compare
Choose a tag to compare

Something went wrong with 0.5.0 publishing, had to republish again 🤦‍♂️

0.5.0

12 Jul 16:53
Compare
Choose a tag to compare

🚀 What's New

Full Changelog: 0.4.0...0.5.0

0.4.0

12 Jul 16:06
Compare
Choose a tag to compare

🚀 What's New

  • Added missing implementations of methods:
    • replaceOne
    • drop
    • rename,
    • countDocuments, count, estimatedDocumentCount,
    • findOneAndDelete, findOneAndReplace, findOneAndUpdate
      That closes the basic coverage of the methods. They're not yet fully compatible in behaviour to Mongo, but we'll get there! by @oskardudycz in #28, #29, #31
  • Added option to inject PoolClient to PongoClient as the first step for transaction handling. Now you can create transaction outside and inject pool client. It's not yet fully the same as Mongo API; it'll be delivered in follow-up PR, but it's already enabling Emmett inline projections. by @oskardudycz in #26
  • Changed _id type to TEXT. In PostgreSQL, this should be almost equally the same indexable. Of course, it'll take a bit more storage, but let's live with that for now. Changing from uuid to text will allow more sophisticated key strategies. Most importantly, it'll reuse the stream ID as a document ID for Emmett projections. by @oskardudycz in #30

Full Changelog: 0.3.0...0.4.0

0.3.0

12 Jul 08:41
Compare
Choose a tag to compare

📝 What's Changed

  • Added Dumbo - utilities for PostgreSQL handling. This is technically a breaking change for the imports of internal PostgreSQL handling. Now endAllPools should be imported from @event-driven-io/dumbo by @oskardudycz in #25

📄 Docs

  • Added sample using YugabyteDB as a distributed alternative to PostgreSQL by @FranckPachot in #24

New Contributors

Full Changelog: 0.2.4...0.3.0