JavaScript SQL

Range types in PostgreSQL and TypeORM

Sometimes when working with databases, we need to represent a range of values. For example, we might want to define a set of available numbers or a range of dates. One way to do that would be to create two columns that hold the bound values.

Above, we are using the timestamp with timezone […]

JavaScript

Uncaught errors in Node.js and the browser

When writing code, we can expect a wide range of errors to happen. We should handle it by writing our code with that in mind. Even though that’s the case, some errors might slip through the cracks. This article looks into what happens with unhandled errors both in Node.js and in the browser. Errors in […]

JavaScript React

Comparing the HashRouter and the BrowserRouter in React applications

We can determine what page the user sees based on the visited URL in a web application with routes. There is more than one way of managing routes with modern single-page applications (SPA). In this article, we look into how hash routing works. We also explain the more modern approach to routing using the history […]

JavaScript NestJS TypeScript

API with NestJS #33. Managing PostgreSQL relationships with Prisma

This entry is part 33 of 42 in the API with NestJS

As applications grow, the number of different entities also increases. A crucial part of learning how to design a database is creating relationships between them. This is because our entities will often relate to each other in some way. Relational databases such as PostgreSQL are an industry standard for quite some time now. Although there […]

JavaScript Node.js SQL

Time intervals with PostgreSQL and TypeORM

In the previous article, we’ve looked into various ways to store the date and time with PostgreSQL and TypeORM. Postgres can also manage intervals. With them, we can store a period of time. Ways to store and display intervals in PostgreSQL There are various ways we can input and view interval values. By default, PostgresSQL represents […]