55
55
virtual int getFileDescriptor(void) { return -1; }
56
56
virtual bool isConnected(void) { return true; }
57
virtual bool isReading(void) { return false; }
58
virtual bool isWriting(void) { return false; }
59
57
virtual bool flush(void) { return false; }
60
58
virtual void close(void) {}
61
59
virtual bool authenticate(void) { return true; }
65
63
while(not to_execute.empty())
67
65
Queue::value_type next= to_execute.front();
68
packet_buffer.assign(next.c_str(), next.size());
70
*packet= packet_buffer.c_str();
68
*packet= packet_buffer.data();
71
69
packet_length= next.size();
110
108
void pushSQL(const std::string &arg)
112
110
::drizzled::error_t err_msg;
113
::drizzled::execute::Context *context= new ::drizzled::execute::Context(arg.c_str(), arg.length(), err_msg);
111
::drizzled::execute::Context *context= new ::drizzled::execute::Context(arg.data(), arg.size(), err_msg);
114
112
std::vector<std::string> parsed_tokens= context->start();
117
115
drizzled::util::String byte;
118
byte.assign(1, char(COM_QUERY)); // Insert our COM_QUERY
116
byte.assign(1, COM_QUERY); // Insert our COM_QUERY
119
117
byte.append(drizzle_literal_parameter("START TRANSACTION")); // +1 for the COM_QUERY, provided by null count from sizeof()
120
118
to_execute.push(byte);
123
for (vector<string>::iterator iter= parsed_tokens.begin(); iter != parsed_tokens.end(); ++iter)
121
BOOST_FOREACH(const string& iter, parsed_tokens)
125
123
drizzled::util::String byte;
126
byte.assign(1, char(COM_QUERY)); // Insert our COM_QUERY
127
byte.append(iter->c_str(), iter->size());
124
byte.assign(1, COM_QUERY); // Insert our COM_QUERY
125
byte.append(iter.data(), iter.size());
128
126
to_execute.push(byte);
132
130
drizzled::util::String byte;
133
byte.assign(1, char(COM_QUERY)); // Insert our COM_QUERY
131
byte.assign(1, COM_QUERY); // Insert our COM_QUERY
134
132
byte.append(drizzle_literal_parameter("COMMIT")); // +1 for the COM_QUERY, provided by null count from sizeof()
135
133
to_execute.push(byte);