~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.h

modifying folder structure

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
44
44
namespace drizzled
45
45
{
46
46
 
 
47
class st_lex_symbol;
47
48
class select_result_interceptor;
48
49
 
49
50
/* YACC and LEX Definitions */
294
295
  {}
295
296
 
296
297
  friend class Select_Lex_Unit;
297
 
  friend bool mysql_new_select(LEX *lex, bool move_down);
 
298
  friend bool new_select(LEX *lex, bool move_down);
298
299
private:
299
300
  void fast_exclude();
300
301
};
628
629
    order_list.next= (unsigned char**) &order_list.first;
629
630
  }
630
631
  /*
631
 
    This method created for reiniting LEX in mysql_admin_table() and can be
 
632
    This method created for reiniting LEX in admin_table() and can be
632
633
    used only if you are going remove all Select_Lex & units except belonger
633
634
    to LEX (LEX::unit & LEX::select, for other purposes there are
634
635
    Select_Lex_Unit::exclude_level & Select_Lex_Unit::exclude_tree
850
851
  List<Lex_Column>    columns;
851
852
  List<Item>          *insert_list,field_list,value_list,update_list;
852
853
  List<List_item>     many_values;
853
 
  List<set_var_base>  var_list;
 
854
  SetVarVector  var_list;
854
855
  /*
855
856
    A stack of name resolution contexts for the query. This stack is used
856
857
    at parse time to set local name resolution contexts for various parts
930
931
     statement in a session. It's re-used by doing lex_end, lex_start
931
932
     in sql_lex.cc
932
933
  */
933
 
  virtual ~LEX()
934
 
  {
935
 
  }
 
934
  virtual ~LEX();
936
935
 
937
936
  TableList *unlink_first_table(bool *link_to_local);
938
937
  void link_first_table_back(TableList *first, bool link_to_local);
995
994
  void reset()
996
995
  {
997
996
    sum_expr_used= false;
 
997
    _exists= false;
998
998
  }
999
999
 
1000
1000
  void setSumExprUsed()
1010
1010
  void start(Session *session);
1011
1011
  void end();
1012
1012
 
 
1013
  message::Table *table()
 
1014
  {
 
1015
    if (not _create_table)
 
1016
      _create_table= new message::Table;
 
1017
 
 
1018
    return _create_table;
 
1019
  }
 
1020
 
 
1021
  message::Table::Field *field()
 
1022
  {
 
1023
    return _create_field;
 
1024
  }
 
1025
 
 
1026
  void setField(message::Table::Field *arg)
 
1027
  {
 
1028
    _create_field= arg;
 
1029
  }
 
1030
 
 
1031
  void setExists()
 
1032
  {
 
1033
    _exists= true;
 
1034
  }
 
1035
 
 
1036
  bool exists() const
 
1037
  {
 
1038
    return _exists;
 
1039
  }
 
1040
 
1013
1041
private: 
1014
1042
  bool cacheable;
1015
1043
  bool sum_expr_used;
 
1044
  message::Table *_create_table;
 
1045
  message::Table::Field *_create_field;
 
1046
  bool _exists;
1016
1047
};
1017
1048
 
1018
1049
extern void lex_start(Session *session);
1019
1050
extern void trim_whitespace(const CHARSET_INFO * const cs, LEX_STRING *str);
1020
1051
extern bool is_lex_native_function(const LEX_STRING *name);
1021
1052
 
 
1053
bool check_for_sql_keyword(drizzled::st_lex_symbol const&);
 
1054
bool check_for_sql_keyword(drizzled::lex_string_t const&);
 
1055
 
1022
1056
/**
1023
1057
  @} (End of group Semantic_Analysis)
1024
1058
*/