예제 #1
0
    def truncate_table(self, table_name, database=None):
        """
        Delete all rows from, but do not drop, an existing table

        Parameters
        ----------
        table_name : string
        database : string, default None (optional)
        """
        statement = TruncateTable(table_name, database=database)
        self._execute(statement.compile())
예제 #2
0
    def truncate_table(
        self,
        table_name: str,
        database: str | None = None,
    ) -> None:
        """Delete all rows from an existing table.

        Parameters
        ----------
        table_name
            Table name
        database
            Database name
        """
        statement = TruncateTable(table_name, database=database)
        self.raw_sql(statement.compile())
예제 #3
0
파일: __init__.py 프로젝트: jelitox/ibis
    def truncate_table(self, table_name, database=None):
        """Delete all rows from an existing table.

        Parameters
        ----------
        table_name
            Table name
        database
            Database name
        """
        statement = TruncateTable(table_name, database=database)
        self.raw_sql(statement)