~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/thread_context.h

  • Committer: Lee
  • Date: 2008-10-30 22:02:01 UTC
  • mto: (572.1.2 devel)
  • mto: This revision was merged to the branch mainline in revision 573.
  • Revision ID: lbieber@lbieber-desktop-20081030220201-elb6qprbzpn7c5a4
add my name to the AUTHORS file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 *  Copyright (C) 2010 Vijay Samuel
5
 
 *  Copyright (C) 2008 MySQL
6
 
 *
7
 
 *  This program is free software; you can redistribute it and/or modify
8
 
 *  it under the terms of the GNU General Public License as published by
9
 
 *  the Free Software Foundation; either version 2 of the License, or
10
 
 *  (at your option) any later version.
11
 
 *
12
 
 *  This program is distributed in the hope that it will be useful,
13
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 *  GNU General Public License for more details.
16
 
 *
17
 
 *  You should have received a copy of the GNU General Public License
18
 
 *  along with this program; if not, write to the Free Software
19
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20
 
 */
21
 
 
22
 
#ifndef CLIENT_THREAD_CONTEXT_H
23
 
#define CLIENT_THREAD_CONTEXT_H
24
 
 
25
 
#include "client_priv.h"
26
 
#include "statement.h"
27
 
#include <string>
28
 
#include <iostream>
29
 
 
30
 
class ThreadContext 
31
 
{
32
 
public:
33
 
  ThreadContext(Statement *in_stmt,
34
 
                uint64_t in_limit) :
35
 
    stmt(in_stmt),
36
 
    limit(in_limit)
37
 
  { }
38
 
 
39
 
  ThreadContext() :
40
 
    stmt(),
41
 
    limit(0)
42
 
  { }
43
 
 
44
 
  Statement *getStmt() const
45
 
  {
46
 
    return stmt;
47
 
  }
48
 
 
49
 
  uint64_t getLimit() const
50
 
  {
51
 
    return limit;
52
 
  }
53
 
 
54
 
  void setStmt(Statement *in_stmt)
55
 
  {
56
 
    stmt= in_stmt;
57
 
  }
58
 
 
59
 
  void setLimit(uint64_t in_limit)
60
 
  {
61
 
    limit= in_limit;
62
 
  }  
63
 
 
64
 
private:
65
 
  Statement *stmt;
66
 
  uint64_t limit;
67
 
};
68
 
 
69
 
#endif /* CLIENT_THREAD_CONTEXT_H */