Sha256: e94536f0e90a47e633d2c89dbcbc751a5159f64e6c11686864e18b9461d55b82

Contents?: true

Size: 1.14 KB

Versions: 28

Compression:

Stored size: 1.14 KB

Contents

.. -*- rst -*-

.. highlightlang:: none

.. groonga-command
.. database: commands_truncate

``truncate``
============

Summary
-------

``truncate`` command deletes all records from specified table.

Syntax
------

``truncate`` command takes only one parameter.

The required parameter is only ``table``::

  truncate table

Usage
-----

Here is a simple example of ``truncate`` command.

.. groonga-command
.. include:: ../../example/reference/commands/truncate/truncate.log
.. table_create Users TABLE_PAT_KEY ShortText
.. load --table Users
.. [
.. {"_key": "Alice",  "score": 2},
.. {"_key": "Bob",    "score": 0},
.. {"_key": "Carlos", "score": -1}
.. ]
.. select Users
.. truncate Users
.. select Users

Parameters
----------

This section describes parameters of ``truncate``.

Required parameter
^^^^^^^^^^^^^^^^^^

There is required parameter, ``table_name``.

``table_name``
""""""""""""""

It specifies the name of table.

Return value
------------

::

 [HEADER, SUCCEEDED_OR_NOT]

``HEADER``

  See :doc:`/reference/command/output_format` about ``HEADER``.

``SUCCEEDED_OR_NOT``

  If command succeeded, it returns true, otherwise it returns false on error.

Version data entries

28 entries across 14 versions & 1 rubygems

Version Path
rroonga-4.0.7-x64-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt
rroonga-4.0.7-x64-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt
rroonga-4.0.7-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt
rroonga-4.0.7-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt
rroonga-4.0.6-x64-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt
rroonga-4.0.6-x64-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt
rroonga-4.0.6-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt
rroonga-4.0.6-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt
rroonga-4.0.5-x64-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt
rroonga-4.0.5-x64-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt
rroonga-4.0.5-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt
rroonga-4.0.5-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt
rroonga-4.0.4-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt
rroonga-4.0.4-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt
rroonga-4.0.4-x64-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt
rroonga-4.0.4-x64-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt
rroonga-4.0.3-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt
rroonga-4.0.3-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt
rroonga-4.0.3-x64-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt
rroonga-4.0.3-x64-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt