Drizzled Public API Documentation

tableprototester.h

00001 /*
00002   Copyright (C) 2010 Stewart Smith
00003 
00004   This program is free software; you can redistribute it and/or
00005   modify it under the terms of the GNU General Public License
00006   as published by the Free Software Foundation; either version 2
00007   of the License, or (at your option) any later version.
00008 
00009   This program is distributed in the hope that it will be useful,
00010   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012   GNU General Public License for more details.
00013 
00014   You should have received a copy of the GNU General Public License
00015   along with this program; if not, write to the Free Software
00016   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00017 */
00018 
00019 #pragma once
00020 
00021 #include <drizzled/cursor.h>
00022 
00023 class TableProtoTesterCursor: public drizzled::Cursor
00024 {
00025 public:
00026   TableProtoTesterCursor(drizzled::plugin::StorageEngine &engine, drizzled::Table &table_arg);
00027   ~TableProtoTesterCursor()
00028   {}
00029 
00030   /*
00031     The name of the index type that will be used for display
00032     don't implement this method unless you really have indexes
00033   */
00034   const char *index_type(uint32_t key_number);
00035   uint32_t index_flags(uint32_t inx) const;
00036   int open(const char *name, int mode, uint32_t test_if_locked);
00037   int close(void);
00038   int doInsertRecord(unsigned char * buf);
00039   int doStartTableScan(bool scan);
00040   int rnd_next(unsigned char *buf);
00041   int rnd_pos(unsigned char * buf, unsigned char *pos);
00042 
00043   int index_read_map(unsigned char * buf, const unsigned char * key, drizzled::key_part_map keypart_map,
00044                      drizzled::ha_rkey_function find_flag);
00045   int index_read_idx_map(unsigned char * buf, uint32_t idx, const unsigned char * key,
00046                          drizzled::key_part_map keypart_map,
00047                          drizzled::ha_rkey_function find_flag);
00048   int index_read_last_map(unsigned char * buf, const unsigned char * key, drizzled::key_part_map keypart_map);
00049   int index_next(unsigned char * buf);
00050   int index_prev(unsigned char * buf);
00051   int index_first(unsigned char * buf);
00052   int index_last(unsigned char * buf);
00053   void position(const unsigned char *record);
00054   int info(uint32_t flag);
00055 
00056   void get_auto_increment(uint64_t, uint64_t,
00057                           uint64_t,
00058                           uint64_t *,
00059                           uint64_t *)
00060   {}
00061 };
00062