| 1 |
.. -*- rst -*- |
| 2 |
|
| 3 |
.. groonga-command |
| 4 |
.. database: columns_scalar |
| 5 |
|
| 6 |
Scalar column |
| 7 |
============= |
| 8 |
|
| 9 |
Summary |
| 10 |
------- |
| 11 |
|
| 12 |
Scalar column is a data store object. |
| 13 |
|
| 14 |
It can store one scalar value per record. Scalar value is one of the |
| 15 |
following type values: |
| 16 |
|
| 17 |
* ``Bool`` |
| 18 |
* ``Int8`` |
| 19 |
* ``Int16`` |
| 20 |
* ``Int32`` |
| 21 |
* ``Int64`` |
| 22 |
* ``UInt8`` |
| 23 |
* ``UInt16`` |
| 24 |
* ``UInt32`` |
| 25 |
* ``UInt64`` |
| 26 |
* ``BFloat16`` |
| 27 |
* ``Float32`` |
| 28 |
* ``Float`` |
| 29 |
* ``Time`` |
| 30 |
* ``ShortText`` |
| 31 |
* ``Text`` |
| 32 |
* ``LongText`` |
| 33 |
* ``TokyoGeoPoint`` |
| 34 |
* ``WGS84GeoPoint`` |
| 35 |
|
| 36 |
If you want to store zero or more values per record, you can use |
| 37 |
multiple scalar columns or one :doc:`vector`. If these values are |
| 38 |
related and use the same types such as tags (zero or more strings), |
| 39 |
:doc:`vector` is suitable. If these values aren't related such as |
| 40 |
title and location, multiple scalar columns are suitable. |
| 41 |
|
| 42 |
Usage |
| 43 |
----- |
| 44 |
|
| 45 |
See :doc:`../commands/column_create` how to create a column. |
| 46 |
|
| 47 |
There are three scalar column types: |
| 48 |
|
| 49 |
* Normal scalar column |
| 50 |
* Reference scalar column |
| 51 |
* Generated scalar column |
| 52 |
|
| 53 |
This section describes how to use these types. |
| 54 |
|
| 55 |
.. _normal-scalar-column: |
| 56 |
|
| 57 |
Normal scalar column |
| 58 |
^^^^^^^^^^^^^^^^^^^^ |
| 59 |
|
| 60 |
TODO |
| 61 |
|
| 62 |
.. _reference-scalar-column: |
| 63 |
|
| 64 |
Reference scalar column |
| 65 |
^^^^^^^^^^^^^^^^^^^^^^^ |
| 66 |
|
| 67 |
TODO |
| 68 |
|
| 69 |
.. _generated-scalar-column: |
| 70 |
|
| 71 |
Generated scalar column |
| 72 |
^^^^^^^^^^^^^^^^^^^^^^^ |
| 73 |
|
| 74 |
You can use a scalar column as a :ref:`generated-column`. |
| 75 |
|
| 76 |
How to create |
| 77 |
""""""""""""" |
| 78 |
|
| 79 |
See :ref:`column-create-generated-column` for details. |
| 80 |
|
| 81 |
See also |
| 82 |
-------- |
| 83 |
|
| 84 |
* :doc:`vector` |
| 85 |
* :doc:`../commands/column_create` |