Database.fetch_latest_value¶
- Database.fetch_latest_value(table_name: str, column_name: Optional[List[str]] = None) → tuple[source]¶
Retrieves the latest values of a time-ordered table. If paramref:’column_name’ is not given, all values of the table are retrieved.
- Parameters
- Returns
Latest data. First element is the time of the latest entry. Consecutive elements are the value of each column.
- Return type
- Raises
psycopg2.Error – Base exception for all kind of database errors.