Drizzled Public API Documentation

thread_context.h
00001 /* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2010 Vijay Samuel
00005  *  Copyright (C) 2008 MySQL
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  (at your option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020  */
00021 
00022 #ifndef CLIENT_THREAD_CONTEXT_H
00023 #define CLIENT_THREAD_CONTEXT_H
00024 
00025 #include "client_priv.h"
00026 #include "statement.h"
00027 #include <string>
00028 #include <iostream>
00029 
00030 class ThreadContext 
00031 {
00032 public:
00033   ThreadContext(Statement *in_stmt,
00034                 uint64_t in_limit) :
00035     stmt(in_stmt),
00036     limit(in_limit)
00037   { }
00038 
00039   ThreadContext() :
00040     stmt(),
00041     limit(0)
00042   { }
00043 
00044   Statement *getStmt() const
00045   {
00046     return stmt;
00047   }
00048 
00049   uint64_t getLimit() const
00050   {
00051     return limit;
00052   }
00053 
00054   void setStmt(Statement *in_stmt)
00055   {
00056     stmt= in_stmt;
00057   }
00058 
00059   void setLimit(uint64_t in_limit)
00060   {
00061     limit= in_limit;
00062   }  
00063 
00064 private:
00065   Statement *stmt;
00066   uint64_t limit;
00067 };
00068 
00069 #endif /* CLIENT_THREAD_CONTEXT_H */