1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
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; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
#ifndef DRIZZLED_PLUGIN_NULL_CLIENT_H
21
#define DRIZZLED_PLUGIN_NULL_CLIENT_H
23
#include <drizzled/plugin/client.h>
31
* This class is an empty client implementation for internal used.
33
class NullClient: public Client
36
virtual int getFileDescriptor(void) { return -1; }
37
virtual bool isConnected(void) { return true; }
38
virtual bool isReading(void) { return false; }
39
virtual bool isWriting(void) { return false; }
40
virtual bool flush(void) { return false; }
41
virtual void close(void) {}
42
virtual bool authenticate(void) { return true; }
43
virtual bool readCommand(char **packet, uint32_t *packet_length)
49
virtual void sendOK(void) {}
50
virtual void sendEOF(void) {}
51
virtual void sendError(uint32_t sql_errno, const char *err)
56
virtual bool sendFields(List<Item> *list)
62
virtual bool store(Field *from)
67
virtual bool store(void) { return false; }
68
virtual bool store(int32_t from)
73
virtual bool store(uint32_t from)
78
virtual bool store(int64_t from)
83
virtual bool store(uint64_t from)
88
virtual bool store(double from, uint32_t decimals, String *buffer)
95
virtual bool store(const DRIZZLE_TIME *from)
100
virtual bool store(const char *from, size_t length)
106
virtual bool haveMoreData(void) { return false; }
107
virtual bool haveError(void) { return false; }
108
virtual bool wasAborted(void) { return false; }
111
} /* end namespace drizzled::plugin */
112
} /* end namespace drizzled */
114
#endif /* DRIZZLED_PLUGIN_NULL_CLIENT_H */