~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/thread_context.h

  • Committer: Daniel Nichter
  • Date: 2011-10-23 16:01:37 UTC
  • mto: This revision was merged to the branch mainline in revision 2448.
  • Revision ID: daniel@percona.com-20111023160137-7ac3blgz8z4tf8za
Add Administration Getting Started and Logging.  Capitalize SQL clause keywords.

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
#pragma once
 
23
 
 
24
#include "client_priv.h"
 
25
#include "statement.h"
 
26
#include <string>
 
27
#include <iosfwd>
 
28
 
 
29
class ThreadContext 
 
30
{
 
31
public:
 
32
  ThreadContext(Statement *in_stmt,
 
33
                uint64_t in_limit) :
 
34
    stmt(in_stmt),
 
35
    limit(in_limit)
 
36
  { }
 
37
 
 
38
  ThreadContext() :
 
39
    stmt(),
 
40
    limit(0)
 
41
  { }
 
42
 
 
43
  Statement *getStmt() const
 
44
  {
 
45
    return stmt;
 
46
  }
 
47
 
 
48
  uint64_t getLimit() const
 
49
  {
 
50
    return limit;
 
51
  }
 
52
 
 
53
  void setStmt(Statement *in_stmt)
 
54
  {
 
55
    stmt= in_stmt;
 
56
  }
 
57
 
 
58
  void setLimit(uint64_t in_limit)
 
59
  {
 
60
    limit= in_limit;
 
61
  }  
 
62
 
 
63
private:
 
64
  Statement *stmt;
 
65
  uint64_t limit;
 
66
};