class_docstr: Extend PostgresHook for working with PostgreSQL and pgvector extension for vector data types.
docstr: Truncate a table, removing all rows.
  
  :param table_name: The name of the table to truncate.
  :param restart_identity: If True, restart the serial sequence if the table has one.
code: def truncate_table(
      self, table_name: str, restart_identity: bool = True
  ) -> None:
      """
      Truncate a table, removing all rows.
  
      :param table_name: The name of the table to truncate.
      :param restart_identity: If True, restart the serial sequence if the table has one.
      """
      truncate_sql = f"TRUNCATE TABLE {table_name}"
      if restart_identity:
          truncate_sql = f"{truncate_sql} RESTART IDENTITY"
      self.run(truncate_sql)
  
file_path: airflow/airflow/providers/pgvector/hooks/pgvector.py
imports: from __future__ import annotations
  from airflow.providers.postgres.hooks.postgres import PostgresHook
label_desc: Use image node_id 5 for calling the PgVectorHook obj's underlying member method code with example usage: obj.truncate_table(table_name, restart_identity) without return types