Well designed software is often composed of multiple modules. This means that some modules need to depend on other modules in order to function. …continue reading »
PostgreSql is a relational database
which adheres to ACID principles -
atomicity, consistency, isolation, durability -
and supports server-side joins between multiple entities (tables).
Interestingly, in addition to this,
it also supports a JSON data type natively,
and provides a rich set of functions and operators
to work with its
What is an upsert, anyway?
An upsert is short for “update or insert” in the context of SQL statements for databases.
The typical use case for an upsert, is when you have some data that needs to be in a row, but you are not sure if that row already exists - based on its primary key - then you would need to either insert a new row, or update the existing row.
However, upsert is not a command that was part of the SQL ‘99 standard, and therefore many database vendors either do not support it, …continue reading »
Having previously tested a NodeJs API server using
I have migrated a very large numbers of tests over to Jest recently.
There were several hard-won lessons along the way,
which requires one to change the way one approaches writing tests,
and even thinking about tests.
jest is a test runner that has all batteries included.
Previously I have been using
mocha, which is only a test runner.
mocha, on the other hand, has assertions, mocking,
and all the other bells and whistles, all baked in.
mocha, you would need to
require() these in,
from other modules - my go to ones were
Further to this,
jest adds snapshot testing,
which is something I have not previously done in
that is perhaps something for a another article.
Suffice to say that
jest testing covers a huge surface area. …
Copyright © 2008-present Brendan Graetz