Sophie

Sophie

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

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.10. column_rename &mdash; groonga v3.0.5 documentation</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>
    <link rel="shortcut icon" href="../../_static/favicon.ico"/>
    <link rel="top" title="groonga v3.0.5 documentation" href="../../index.html" />
    <link rel="up" title="8.3. Command" href="../command.html" />
    <link rel="next" title="8.3.11. define_selector" href="define_selector.html" />
    <link rel="prev" title="8.3.9. column_remove" href="column_remove.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">An open-source fulltext search engine and column store.</span>
    </a>
  </h1>

  <div class="other-language-links">
    <ul>
      <li><a href="../../../../ja/html/reference/commands/column_rename.html"><img src="../../_static/jp.png" alt="日本語">日本語版はこちら</a></li>
    </ul>
  </div>
</div>
  

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="define_selector.html" title="8.3.11. define_selector"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="column_remove.html" title="8.3.9. column_remove"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">groonga v3.0.5 documentation</a> &raquo;</li>
          <li><a href="../../reference.html" >8. リファレンスマニュアル</a> &raquo;</li>
          <li><a href="../command.html" accesskey="U">8.3. Command</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="column-rename">
<h1>8.3.10. <tt class="docutils literal"><span class="pre">column_rename</span></tt><a class="headerlink" href="#column-rename" title="Permalink to this headline">¶</a></h1>
<div class="section" id="summary">
<h2>8.3.10.1. Summary<a class="headerlink" href="#summary" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">column_rename</span></tt> command renames specified column name of table.</p>
</div>
<div class="section" id="syntax">
<h2>8.3.10.2. Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">column_rename</span></tt> command takes two parameters.</p>
<p>The required parameter is <tt class="docutils literal"><span class="pre">table</span></tt> and <tt class="docutils literal"><span class="pre">column_name</span></tt>:</p>
<div class="highlight-none"><div class="highlight"><pre>column_rename table column
</pre></div>
</div>
</div>
<div class="section" id="usage">
<h2>8.3.10.3. Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<p>Here is a simple example of <tt class="docutils literal"><span class="pre">column_rename</span></tt> command.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>table_create Users TABLE_PAT_KEY ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Users score COLUMN_SCALAR Int32
# [[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]
column_rename Users score point
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_list Users
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         &quot;id&quot;,
#         &quot;UInt32&quot;
#       ],
#       [
#         &quot;name&quot;,
#         &quot;ShortText&quot;
#       ],
#       [
#         &quot;path&quot;,
#         &quot;ShortText&quot;
#       ],
#       [
#         &quot;type&quot;,
#         &quot;ShortText&quot;
#       ],
#       [
#         &quot;flags&quot;,
#         &quot;ShortText&quot;
#       ],
#       [
#         &quot;domain&quot;,
#         &quot;ShortText&quot;
#       ],
#       [
#         &quot;range&quot;,
#         &quot;ShortText&quot;
#       ],
#       [
#         &quot;source&quot;,
#         &quot;ShortText&quot;
#       ]
#     ],
#     [
#       256,
#       &quot;_key&quot;,
#       &quot;&quot;,
#       &quot;&quot;,
#       &quot;COLUMN_SCALAR&quot;,
#       &quot;Users&quot;,
#       &quot;ShortText&quot;,
#       []
#     ],
#     [
#       257,
#       &quot;point&quot;,
#       &quot;/tmp/groonga-databases/commands_column_rename.0000101&quot;,
#       &quot;fix&quot;,
#       &quot;COLUMN_SCALAR|PERSISTENT&quot;,
#       &quot;Users&quot;,
#       &quot;Int32&quot;,
#       []
#     ]
#   ]
# ]
select Users
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         3
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;point&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         1,
#         &quot;Alice&quot;,
#         2
#       ],
#       [
#         2,
#         &quot;Bob&quot;,
#         0
#       ],
#       [
#         3,
#         &quot;Carlos&quot;,
#         -1
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
</div>
<div class="section" id="parameters">
<h2>8.3.10.4. Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
<p>This section describes parameters of <tt class="docutils literal"><span class="pre">column_rename</span></tt>.</p>
<div class="section" id="required-parameter">
<h3>8.3.10.4.1. Required parameter<a class="headerlink" href="#required-parameter" title="Permalink to this headline">¶</a></h3>
<p>There are required parameters, <tt class="docutils literal"><span class="pre">table_name</span></tt> and <tt class="docutils literal"><span class="pre">column_name</span></tt>.</p>
<div class="section" id="table-name">
<h4>8.3.10.4.1.1. <tt class="docutils literal"><span class="pre">table_name</span></tt><a class="headerlink" href="#table-name" title="Permalink to this headline">¶</a></h4>
<p>It specifies the name of table.</p>
</div>
<div class="section" id="column-name">
<h4>8.3.10.4.1.2. <tt class="docutils literal"><span class="pre">column_name</span></tt><a class="headerlink" href="#column-name" title="Permalink to this headline">¶</a></h4>
<p>It specifies the name of column.</p>
</div>
</div>
</div>
<div class="section" id="return-value">
<h2>8.3.10.5. Return value<a class="headerlink" href="#return-value" title="Permalink to this headline">¶</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>The format of HEADER is [0, UNIX_TIME_WHEN_COMMAND_IS_STARTED, ELAPSED_TIME].
See <a class="reference internal" href="../command/output_format.html"><em>Output format</em></a> about HEADER.</div></blockquote>
<p><tt class="docutils literal"><span class="pre">SUCCEEDED_OR_NOT</span></tt></p>
<blockquote>
<div>If command succeeded, it returns true, otherwise it returns false on error.</div></blockquote>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">8.3.10. <tt class="docutils literal"><span class="pre">column_rename</span></tt></a><ul>
<li><a class="reference internal" href="#summary">8.3.10.1. Summary</a></li>
<li><a class="reference internal" href="#syntax">8.3.10.2. Syntax</a></li>
<li><a class="reference internal" href="#usage">8.3.10.3. Usage</a></li>
<li><a class="reference internal" href="#parameters">8.3.10.4. Parameters</a><ul>
<li><a class="reference internal" href="#required-parameter">8.3.10.4.1. Required parameter</a><ul>
<li><a class="reference internal" href="#table-name">8.3.10.4.1.1. <tt class="docutils literal"><span class="pre">table_name</span></tt></a></li>
<li><a class="reference internal" href="#column-name">8.3.10.4.1.2. <tt class="docutils literal"><span class="pre">column_name</span></tt></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#return-value">8.3.10.5. Return value</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="column_remove.html"
                        title="previous chapter">8.3.9. column_remove</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="define_selector.html"
                        title="next chapter">8.3.11. define_selector</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/reference/commands/column_rename.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="define_selector.html" title="8.3.11. define_selector"
             >next</a> |</li>
        <li class="right" >
          <a href="column_remove.html" title="8.3.9. column_remove"
             >previous</a> |</li>
        <li><a href="../../index.html">groonga v3.0.5 documentation</a> &raquo;</li>
          <li><a href="../../reference.html" >8. リファレンスマニュアル</a> &raquo;</li>
          <li><a href="../command.html" >8.3. Command</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2013, Brazil, Inc.
    </div>
  </body>
</html>