~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/tableprototester/tableprototester.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-03-18 12:12:31 UTC
  • Revision ID: james.westby@ubuntu.com-20100318121231-k6g1xe6cshbwa0f8
Tags: upstream-2010.03.1347
ImportĀ upstreamĀ versionĀ 2010.03.1347

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (C) 2010 Stewart Smith
 
3
 
 
4
  This program is free software; you can redistribute it and/or
 
5
  modify it under the terms of the GNU General Public License
 
6
  as published by the Free Software Foundation; either version 2
 
7
  of the License, or (at your option) any later version.
 
8
 
 
9
  This program is distributed in the hope that it will be useful,
 
10
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
  GNU General Public License for more details.
 
13
 
 
14
  You should have received a copy of the GNU General Public License
 
15
  along with this program; if not, write to the Free Software
 
16
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
17
*/
 
18
 
 
19
#ifndef PLUGIN_TABLEPROTOTESTER_TABLEPROTOTESTER_H
 
20
#define PLUGIN_TABLEPROTOTESTER_TABLEPROTOTESTER_H
 
21
 
 
22
#include <drizzled/cursor.h>
 
23
 
 
24
class TableProtoTesterCursor: public drizzled::Cursor
 
25
{
 
26
public:
 
27
  TableProtoTesterCursor(drizzled::plugin::StorageEngine &engine, drizzled::TableShare &table_arg);
 
28
  ~TableProtoTesterCursor()
 
29
  {}
 
30
 
 
31
  /*
 
32
    The name of the index type that will be used for display
 
33
    don't implement this method unless you really have indexes
 
34
  */
 
35
  const char *index_type(uint32_t key_number);
 
36
  uint32_t index_flags(uint32_t inx) const;
 
37
  int open(const char *name, int mode, uint32_t test_if_locked);
 
38
  int close(void);
 
39
  int write_row(unsigned char * buf);
 
40
  int rnd_init(bool scan);
 
41
  int rnd_next(unsigned char *buf);
 
42
  int rnd_pos(unsigned char * buf, unsigned char *pos);
 
43
 
 
44
  int index_read_map(unsigned char * buf, const unsigned char * key, drizzled::key_part_map keypart_map,
 
45
                     drizzled::ha_rkey_function find_flag);
 
46
  int index_read_idx_map(unsigned char * buf, uint32_t idx, const unsigned char * key,
 
47
                         drizzled::key_part_map keypart_map,
 
48
                         drizzled::ha_rkey_function find_flag);
 
49
  int index_read_last_map(unsigned char * buf, const unsigned char * key, drizzled::key_part_map keypart_map);
 
50
  int index_next(unsigned char * buf);
 
51
  int index_prev(unsigned char * buf);
 
52
  int index_first(unsigned char * buf);
 
53
  int index_last(unsigned char * buf);
 
54
  void position(const unsigned char *record);
 
55
  int info(uint32_t flag);
 
56
};
 
57
 
 
58
#endif /* PLUGIN_TABLEPROTOTESTER_TABLEPROTOTESTER_H */