~drizzle-trunk/drizzle/development

851 by Brian Aker
Class rewrite of Session (aka get all of the junk out)
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
851 by Brian Aker
Class rewrite of Session (aka get all of the junk out)
5
 *
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.
9
 *
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.
14
 *
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
18
 */
19
20
2234 by Brian Aker
Mass removal of ifdef/endif in favor of pragma once.
21
#pragma once
851 by Brian Aker
Class rewrite of Session (aka get all of the junk out)
22
2154.2.17 by Brian Aker
Additional removal of session
23
#include <drizzled/dtcollation.h>
2239.1.10 by Olaf van der Spek
Refactor includes
24
#include <drizzled/item_result.h>
851 by Brian Aker
Class rewrite of Session (aka get all of the junk out)
25
2239.1.10 by Olaf van der Spek
Refactor includes
26
namespace drizzled {
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
27
851 by Brian Aker
Class rewrite of Session (aka get all of the junk out)
28
class user_var_entry
29
{
30
 public:
1089.1.5 by Brian Aker
Cleanup of user_var
31
  user_var_entry(const char *arg, query_id_t id) :
32
    value(0),
33
    length(0),
34
    size(0),
35
    update_query_id(0),
36
    used_query_id(id),
37
    type(STRING_RESULT),
38
    unsigned_flag(false),
39
    collation(NULL, DERIVATION_IMPLICIT)
40
  { 
2430.1.1 by Olaf van der Spek
Use lex_string assign(), data() and size()
41
    name.assign(strdup(arg), strlen(arg));
1891.2.1 by Monty Taylor
Fixed things to make things compile with clang
42
  }
1089.1.5 by Brian Aker
Cleanup of user_var
43
44
  ~user_var_entry()
45
  {
2430.1.1 by Olaf van der Spek
Use lex_string assign(), data() and size()
46
    free(const_cast<char*>(name.data()));
2239.1.10 by Olaf van der Spek
Refactor includes
47
    free(value);
48
  }
1089.1.5 by Brian Aker
Cleanup of user_var
49
2371.1.2 by Brian Aker
Remove the typedef on lexkey
50
  lex_string_t name;
851 by Brian Aker
Class rewrite of Session (aka get all of the junk out)
51
  char *value;
52
  ulong length;
1089.1.5 by Brian Aker
Cleanup of user_var
53
  size_t size;
54
  query_id_t update_query_id;
55
  query_id_t used_query_id;
851 by Brian Aker
Class rewrite of Session (aka get all of the junk out)
56
  Item_result type;
57
  bool unsigned_flag;
58
59
  double val_real(bool *null_value);
60
  int64_t val_int(bool *null_value) const;
61
  String *val_str(bool *null_value, String *str, uint32_t decimals);
2030.1.4 by Brian Aker
Change my_decimal to Decimal
62
  type::Decimal *val_decimal(bool *null_value, type::Decimal *result);
851 by Brian Aker
Class rewrite of Session (aka get all of the junk out)
63
  DTCollation collation;
1089.1.5 by Brian Aker
Cleanup of user_var
64
2246.3.4 by Olaf van der Spek
Propogate return void
65
  void update_hash(bool set_null, void *ptr, uint32_t length,
2254 by Brian Aker
Shift CHARSET_INFO to charset_info_st
66
                   Item_result type, const charset_info_st * const cs, Derivation dv,
1089.1.5 by Brian Aker
Cleanup of user_var
67
                   bool unsigned_arg);
851 by Brian Aker
Class rewrite of Session (aka get all of the junk out)
68
};
69
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
70
} /* namespace drizzled */
71