Fetching Data
The Trongate Model class provides several methods for fetching data from your database tables. These methods are designed to retrieve records efficiently based on various criteria.
- get(): Retrieves all records from a table.
- get_where(): Retrieves records based on a specific condition.
- get_where_custom(): Retrieves records based on custom SQL conditions.
- get_one_where(): Retrieves a single record based on a specific condition.
- get_many_where(): Retrieves multiple records based on specific conditions.
- get_where_in(): Retrieves records where a column value is in a specified array.
- get_max(): Retrieves the maximum value of a column.
Video Tutorial: Basic Data Fetching
The following video demonstrates how to fetch data using Trongate's in-built data fetching methods.