Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > e450e7f3d6075c4a54de19e68d38177f > files > 619

groonga-doc-3.0.5-1.fc18.x86_64.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>8.3.30. truncate &mdash; groonga v3.0.5ドキュメント</title>
    
    <link rel="stylesheet" href="../../_static/groonga.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '3.0.5',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/translations.js"></script>
    <link rel="shortcut icon" href="../../_static/favicon.ico"/>
    <link rel="top" title="groonga v3.0.5ドキュメント" href="../../index.html" />
    <link rel="up" title="8.3. コマンド" href="../command.html" />
    <link rel="next" title="8.4. データ型" href="../types.html" />
    <link rel="prev" title="8.3.29. tokenize" href="tokenize.html" /> 
  </head>
  <body>
<div class="header">
  <h1 class="title">
    <a id="top-link" href="../../index.html">
      <span class="project">groonga</span>
      <span class="separator">-</span>
      <span class="description">オープンソースのカラムストア機能付き全文検索エンジン</span>
    </a>
  </h1>

  <div class="other-language-links">
    <ul>
      <li><a href="../../../../en/html/reference/commands/truncate.html"><img src="../../_static/us.png" alt="English">English page</a></li>
    </ul>
  </div>
</div>
  

    <div class="related">
      <h3>ナビゲーション</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="総合索引"
             accesskey="I">索引</a></li>
        <li class="right" >
          <a href="../types.html" title="8.4. データ型"
             accesskey="N">次へ</a> |</li>
        <li class="right" >
          <a href="tokenize.html" title="8.3.29. tokenize"
             accesskey="P">前へ</a> |</li>
        <li><a href="../../index.html">groonga v3.0.5ドキュメント</a> &raquo;</li>
          <li><a href="../../reference.html" >8. リファレンスマニュアル</a> &raquo;</li>
          <li><a href="../command.html" accesskey="U">8.3. コマンド</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="truncate">
<h1>8.3.30. <tt class="docutils literal"><span class="pre">truncate</span></tt><a class="headerlink" href="#truncate" title="このヘッドラインへのパーマリンク">¶</a></h1>
<div class="section" id="summary">
<h2>8.3.30.1. 概要<a class="headerlink" href="#summary" title="このヘッドラインへのパーマリンク">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">truncate</span></tt> コマンドは指定したテーブルのレコードをすべて削除します。</p>
</div>
<div class="section" id="syntax">
<h2>8.3.30.2. 構文<a class="headerlink" href="#syntax" title="このヘッドラインへのパーマリンク">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">truncate</span></tt> コマンドの引数は1つだけです:</p>
<p><tt class="docutils literal"><span class="pre">table</span></tt> だけが必須の引数です。</p>
<div class="highlight-none"><div class="highlight"><pre>truncate table
</pre></div>
</div>
</div>
<div class="section" id="usage">
<h2>8.3.30.3. 使い方<a class="headerlink" href="#usage" title="このヘッドラインへのパーマリンク">¶</a></h2>
<p>以下は <tt class="docutils literal"><span class="pre">truncate</span></tt> コマンドの簡単な使用例です。</p>
<p>実行例:</p>
<div class="highlight-none"><div class="highlight"><pre>table_create Users TABLE_PAT_KEY ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
load --table Users
[
{&quot;_key&quot;: &quot;Alice&quot;,  &quot;score&quot;: 2},
{&quot;_key&quot;: &quot;Bob&quot;,    &quot;score&quot;: 0},
{&quot;_key&quot;: &quot;Carlos&quot;, &quot;score&quot;: -1}
]
# [[0, 1337566253.89858, 0.000355720520019531], 3]
select Users
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         3
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ]
#       ],
#       [
#         1,
#         &quot;Alice&quot;
#       ],
#       [
#         2,
#         &quot;Bob&quot;
#       ],
#       [
#         3,
#         &quot;Carlos&quot;
#       ]
#     ]
#   ]
# ]
truncate Users
# [[0, 1337566253.89858, 0.000355720520019531], true]
select Users
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         0
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ]
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
</div>
<div class="section" id="parameters">
<h2>8.3.30.4. 引数<a class="headerlink" href="#parameters" title="このヘッドラインへのパーマリンク">¶</a></h2>
<p>このセクションでは <tt class="docutils literal"><span class="pre">truncate</span></tt> の引数について説明します。</p>
<div class="section" id="required-parameter">
<h3>8.3.30.4.1. 必須引数<a class="headerlink" href="#required-parameter" title="このヘッドラインへのパーマリンク">¶</a></h3>
<p><tt class="docutils literal"><span class="pre">table_name</span></tt> だけが必須の引数です。</p>
<div class="section" id="table-name">
<h4>8.3.30.4.1.1. <tt class="docutils literal"><span class="pre">table_name</span></tt><a class="headerlink" href="#table-name" title="このヘッドラインへのパーマリンク">¶</a></h4>
<p>テーブルの名前を指定します。</p>
</div>
</div>
</div>
<div class="section" id="return-value">
<h2>8.3.30.5. 戻り値<a class="headerlink" href="#return-value" title="このヘッドラインへのパーマリンク">¶</a></h2>
<div class="highlight-none"><div class="highlight"><pre>[HEADER, SUCCEEDED_OR_NOT]
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">HEADER</span></tt></p>
<blockquote>
<div><p>HEADERのフォーマットは  [0, UNIX_TIME_WHEN_COMMAND_IS_STARTED, ELAPSED_TIME] です。HEADERについては <a class="reference internal" href="../command/output_format.html"><em>出力形式</em></a> を参照してください。</p>
</div></blockquote>
<p><tt class="docutils literal"><span class="pre">SUCCEEDED_OR_NOT</span></tt></p>
<blockquote>
<div><p>コマンドの実行が成功するとtrueを返します。失敗するとエラーとしてfalseを返します。</p>
</div></blockquote>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../index.html">目次</a></h3>
  <ul>
<li><a class="reference internal" href="#">8.3.30. <tt class="docutils literal"><span class="pre">truncate</span></tt></a><ul>
<li><a class="reference internal" href="#summary">8.3.30.1. 概要</a></li>
<li><a class="reference internal" href="#syntax">8.3.30.2. 構文</a></li>
<li><a class="reference internal" href="#usage">8.3.30.3. 使い方</a></li>
<li><a class="reference internal" href="#parameters">8.3.30.4. 引数</a><ul>
<li><a class="reference internal" href="#required-parameter">8.3.30.4.1. 必須引数</a><ul>
<li><a class="reference internal" href="#table-name">8.3.30.4.1.1. <tt class="docutils literal"><span class="pre">table_name</span></tt></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#return-value">8.3.30.5. 戻り値</a></li>
</ul>
</li>
</ul>

  <h4>前のトピックへ</h4>
  <p class="topless"><a href="tokenize.html"
                        title="前の章へ">8.3.29. <tt class="docutils literal docutils literal docutils literal docutils literal"><span class="pre">tokenize</span></tt></a></p>
  <h4>次のトピックへ</h4>
  <p class="topless"><a href="../types.html"
                        title="次の章へ">8.4. データ型</a></p>
  <h3>このページ</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/reference/commands/truncate.txt"
           rel="nofollow">ソースコードを表示</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>クイック検索</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="検索" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    モジュール、クラス、または関数名を入力してください
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>ナビゲーション</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="総合索引"
             >索引</a></li>
        <li class="right" >
          <a href="../types.html" title="8.4. データ型"
             >次へ</a> |</li>
        <li class="right" >
          <a href="tokenize.html" title="8.3.29. tokenize"
             >前へ</a> |</li>
        <li><a href="../../index.html">groonga v3.0.5ドキュメント</a> &raquo;</li>
          <li><a href="../../reference.html" >8. リファレンスマニュアル</a> &raquo;</li>
          <li><a href="../command.html" >8.3. コマンド</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2013, Brazil, Inc.
    </div>
  </body>
</html>