Sha256: 4e6008f173fc6af991769ca25367dbf05c7dfafa3dd2de71388e659f94fc4ed1
Contents?: true
Size: 1.22 KB
Versions: 38
Compression:
Stored size: 1.22 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`` The format of HEADER is [0, UNIX_TIME_WHEN_COMMAND_IS_STARTED, ELAPSED_TIME]. 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
38 entries across 19 versions & 1 rubygems