Series: API with NestJS

NestJS SQL

API with NestJS #181. Prepared statements in PostgreSQL with Drizzle ORM

This entry is part 181 of 183 in the API with NestJS

When we execute an SQL query, PostgreSQL follows a process that consists of multiple steps. First, it parses the SQL statement, checking for syntax errors. Next, it analyzes whether the tables and columns used in the query exist. Then, it plans the instructions necessary to achieve the desired result. Finally, it executes the instructions based on […]

NestJS SQL

API with NestJS #182. Storing coordinates in PostgreSQL with Drizzle ORM

This entry is part 182 of 183 in the API with NestJS

Many applications rely on geographical data to calculate distances and track locations. PostgreSQL offers several ways to store geospatial data, each designed with different goals. In this article, we learn how to store coordinates when working with PostgreSQL and the Drizzle ORM. Latitude and longitude A coordinate consists of two numbers that pinpoint a location […]

NestJS SQL

API with NestJS #183. Distance and radius in PostgreSQL with Drizzle ORM

This entry is part 183 of 183 in the API with NestJS

PostgreSQL provides many options for working with geographical data, especially with the PostGIS extension. In this article, we’ll explore how to calculate the distance between two coordinates and how to identify locations within a specific radius. If you want to check out the basics of storing coordinates in PostgreSQL with the Drizzle ORM, check out […]