Releases: event-driven-io/Pongo
0.13.1
📝 What's Changed
- Updated TS config to fix debugging by @oskardudycz in #70
Full Changelog: 0.13.0...0.13.1
0.13.0
🚀 What's New
- Bumped dependencies to the latest versions, some of them by major by @oskardudycz in #65
📝 What's Changed
- Added basic benchmarks for Dumbo by @oskardudycz in #68, #69
Full Changelog: 0.12.5...0.13.0
0.12.5
📝 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
📝 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
📝 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
📝 What's Changed
- Fixed inserting document when _id is provided by @oskardudycz in #59
Full Changelog: 0.12.1...0.12.2
0.12.1
📝 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
🚀 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
🚀 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
🚀 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