LCOV - code coverage report
Current view: top level - home/snapwebsites/snapcpp/snapwebsites/snapdatabase/snapdatabase/block - block_secondary_index.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 1 0.0 %
Date: 2019-12-15 17:13:15 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Copyright (c) 2019  Made to Order Software Corp.  All Rights Reserved
       2             : //
       3             : // https://snapwebsites.org/project/snapdatabase
       4             : // contact@m2osw.com
       5             : //
       6             : // This program is free software; you can redistribute it and/or modify
       7             : // it under the terms of the GNU General Public License as published by
       8             : // the Free Software Foundation; either version 2 of the License, or
       9             : // (at your option) any later version.
      10             : //
      11             : // This program is distributed in the hope that it will be useful,
      12             : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      13             : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14             : // GNU General Public License for more details.
      15             : //
      16             : // You should have received a copy of the GNU General Public License along
      17             : // with this program; if not, write to the Free Software Foundation, Inc.,
      18             : // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      19             : #pragma once
      20             : 
      21             : 
      22             : /** \file
      23             :  * \brief This block is used to define secondary indexes.
      24             :  *
      25             :  * Our database model allows for any number of indexes to be defined on
      26             :  * each table. This is quite practical because it is always going to be
      27             :  * a lot faster to have the low level system to handle the sorting of
      28             :  * your data.
      29             :  *
      30             :  * Secondary indexes are defined in the schema, but they require their
      31             :  * own blocks to actually generate the indexes. The entries make use
      32             :  * of your data as the index key. The key generation can make use of
      33             :  * C-like computations (i.e. just like an SQL `WHERE` can make use
      34             :  * of expressions to filter your data, although on our end we use this
      35             :  * feature to also sort the data).
      36             :  */
      37             : 
      38             : // self
      39             : //
      40             : #include    "snapdatabase/data/structure.h"
      41             : 
      42             : 
      43             : 
      44             : 
      45             : 
      46             : namespace snapdatabase
      47             : {
      48             : 
      49             : 
      50             : 
      51           0 : class block_secondary_index
      52             :     : public block
      53             : {
      54             : public:
      55             :     typedef std::shared_ptr<block_secondary_index>       pointer_t;
      56             : 
      57             :                                 block_secondary_index(dbfile::pointer_t f, reference_t offset);
      58             : 
      59             :     uint32_t                    get_id() const;
      60             :     void                        set_id(uint32_t id);
      61             :     uint64_t                    get_number_of_rows() const;
      62             :     void                        set_number_of_rows(uint64_t count);
      63             :     reference_t                 get_top_index() const;
      64             :     void                        set_top_index(reference_t offset);
      65             :     uint32_t                    get_bloom_filter_flags() const;
      66             :     void                        set_bloom_filter_flags(uint32_t flags);
      67             : 
      68             : private:
      69             : };
      70             : 
      71             : 
      72             : 
      73             : } // namespace snapdatabase
      74             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.13