Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
user_var_as_out_param.h
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
*
4
* Copyright (C) 2008 Sun Microsystems, Inc.
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
#pragma once
21
22
#include <drizzled/function/func.h>
23
24
namespace
drizzled {
25
26
/*
27
This item represents user variable used as out parameter (e.g in LOAD DATA),
28
and it is supposed to be used only for this purprose. So it is simplified
29
a lot. Actually you should never obtain its value.
30
31
The only two reasons for this thing being an Item is possibility to store it
32
in List<Item> and desire to place this code somewhere near other functions
33
working with user variables.
34
*/
35
class
Item_user_var_as_out_param
:
public
Item
36
{
37
str_ref
name;
38
user_var_entry
*entry;
39
public
:
40
Item_user_var_as_out_param
(
str_ref
a) : name(a) {}
41
/* We should return something different from FIELD_ITEM here */
42
Type type()
const
{
return
STRING_ITEM;}
43
double
val_real
();
44
int64_t
val_int
();
45
String
*
val_str
(
String
*);
46
type::Decimal
*
val_decimal
(
type::Decimal
*decimal_buffer);
47
/* fix_fields() binds variable name with its entry structure */
48
bool
fix_fields(
Session
*,
Item
**ref);
49
virtual
void
print
(
String
*);
50
void
set_null_value(
const
charset_info_st
*);
51
void
set_value(
str_ref
,
const
charset_info_st
*);
52
};
53
54
}
/* namespace drizzled */
drizzled
function
user_var_as_out_param.h
Generated on Tue Oct 29 2013 17:05:37 for drizzle by
1.8.4