June 2024
Intermediate to advanced
456 pages
11h 34m
English
In this section, you’ll work with database views in PostgreSQL and manage them from Rails.
A database view encapsulates[144] a query, gives it a name, and is stored as an object within PostgreSQL. The query text itself is stored, not the query results. Each invocation runs as a “live” query.
Database views are not supported natively by Active Record, however, they can be integrated into Rails using a Ruby gem.
Since views have a query definition that may change over time, you’ll evolve your database views in Rideshare the same way that you evolve other database objects like tables. PostgreSQL views do not have a versioning concept, so versioning will be added.
Database views, while not offering performance ...
Read now
Unlock full access