~drizzle-trunk/drizzle/development

850 by Brian Aker
More class creation.
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.
850 by Brian Aker
More class creation.
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
2234 by Brian Aker
Mass removal of ifdef/endif in favor of pragma once.
20
#pragma once
850 by Brian Aker
More class creation.
21
2154.2.17 by Brian Aker
Additional removal of session
22
#include <drizzled/select_insert.h>
23
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
24
namespace drizzled
25
{
26
850 by Brian Aker
More class creation.
27
class select_create: public select_insert {
1892.3.3 by tdavies
struct order_st changed and renamed to c++ class named:Order
28
  Order *group;
850 by Brian Aker
More class creation.
29
  TableList *create_table;
1222.2.3 by Brian Aker
Remove a few more options, from options in HA_CREATE_INFO.
30
  bool is_if_not_exists;
850 by Brian Aker
More class creation.
31
  HA_CREATE_INFO *create_info;
1320.1.2 by Brian Aker
More reference counting.
32
  message::Table &table_proto;
850 by Brian Aker
More class creation.
33
  TableList *select_tables;
1126.3.3 by Jay Pipes
Moves Alter_info out into its own header and source file, cleans up some related include mess in sql_lex.h, and renames Alter_info to AlterInfo.
34
  AlterInfo *alter_info;
850 by Brian Aker
More class creation.
35
  Field **field;
36
  /* lock data for tmp table */
1711.6.1 by Brian Aker
Style on structure cleanup
37
  DrizzleLock *m_lock;
850 by Brian Aker
More class creation.
38
  /* m_lock or session->extra_lock */
1711.6.1 by Brian Aker
Style on structure cleanup
39
  DrizzleLock **m_plock;
2246.4.10 by Olaf van der Spek
Remove const_reference and reference from identifier::Table
40
  const identifier::Table& identifier;
1340.1.1 by Brian Aker
Length usage of identifier down the tree.
41
850 by Brian Aker
More class creation.
42
public:
43
  select_create (TableList *table_arg,
1222.2.3 by Brian Aker
Remove a few more options, from options in HA_CREATE_INFO.
44
                 bool is_if_not_exists_arg,
45
                 HA_CREATE_INFO *create_info_par,
1320.1.2 by Brian Aker
More reference counting.
46
                 message::Table &proto,
1126.3.3 by Jay Pipes
Moves Alter_info out into its own header and source file, cleans up some related include mess in sql_lex.h, and renames Alter_info to AlterInfo.
47
                 AlterInfo *alter_info_arg,
1222.2.3 by Brian Aker
Remove a few more options, from options in HA_CREATE_INFO.
48
                 List<Item> &select_fields,enum_duplicates duplic, bool ignore,
1340.1.1 by Brian Aker
Length usage of identifier down the tree.
49
                 TableList *select_tables_arg,
2246.4.10 by Olaf van der Spek
Remove const_reference and reference from identifier::Table
50
                 const identifier::Table& identifier_arg)
850 by Brian Aker
More class creation.
51
    :select_insert (NULL, NULL, &select_fields, 0, 0, duplic, ignore),
52
    create_table(table_arg),
1222.2.3 by Brian Aker
Remove a few more options, from options in HA_CREATE_INFO.
53
    is_if_not_exists(is_if_not_exists_arg),
850 by Brian Aker
More class creation.
54
    create_info(create_info_par),
1067.1.1 by Stewart Smith
Beginning of create table proto in parser: pass which Engine is being used for CREATE TABLE in table proto.
55
    table_proto(proto),
850 by Brian Aker
More class creation.
56
    select_tables(select_tables_arg),
57
    alter_info(alter_info_arg),
1340.1.1 by Brian Aker
Length usage of identifier down the tree.
58
    m_plock(NULL),
59
    identifier(identifier_arg)
850 by Brian Aker
More class creation.
60
    {}
61
  int prepare(List<Item> &list, Select_Lex_Unit *u);
62
63
  void store_values(List<Item> &values);
2087.3.1 by Brian Aker
Entire convert over to time_t.
64
  void send_error(drizzled::error_t errcode,const char *err);
850 by Brian Aker
More class creation.
65
  bool send_eof();
66
  void abort();
1340.1.1 by Brian Aker
Length usage of identifier down the tree.
67
  virtual bool can_rollback_data() { return true; }
850 by Brian Aker
More class creation.
68
69
  // Needed for access from local class MY_HOOKS in prepare(), since session is proteted.
70
  const Session *get_session(void) { return session; }
1891.2.1 by Monty Taylor
Fixed things to make things compile with clang
71
  const HA_CREATE_INFO *get_create_info() { return create_info; }
850 by Brian Aker
More class creation.
72
  int prepare2(void) { return 0; }
73
};
74
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
75
} /* namespace drizzled */
76