~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_list.h

  • Committer: Olaf van der Spek
  • Date: 2011-03-28 14:32:36 UTC
  • mto: (2257.1.1 build) (2276.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: olafvdspek@gmail.com-20110328143236-4ge1d793iqaktfq0
Common fwd

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef DRIZZLED_TABLE_LIST_H
22
 
#define DRIZZLED_TABLE_LIST_H
 
21
#pragma once
23
22
 
 
23
#include <drizzled/nested_join.h>
24
24
#include <drizzled/table.h>
25
25
 
26
26
namespace drizzled
41
41
  class StorageEngine;
42
42
}
43
43
 
44
 
struct nested_join_st;
45
 
 
46
44
/**
47
45
 * A Table referenced in the FROM clause.
48
46
 *
151
149
  const char *alias;
152
150
 
153
151
private:
154
 
  char *table_name;
 
152
  const char *table_name;
155
153
 
156
154
public:
157
155
  const char *getTableName()
159
157
    return table_name;
160
158
  }
161
159
 
162
 
  char **getTableNamePtr()
163
 
  {
164
 
    return &table_name;
165
 
  }
166
 
 
167
 
  void setTableName(char *arg)
 
160
  void setTableName(const char *arg)
168
161
  {
169
162
    table_name= arg;
170
163
  }
259
252
   * 
260
253
   * @param str   string where table should be printed
261
254
   */
262
 
  void print(Session *session, String *str, enum_query_type query_type);
 
255
  void print(Session *session, String *str);
263
256
  /**
264
257
   * Sets insert_values buffer
265
258
   *
462
455
    embedding= in_embedding;
463
456
  }
464
457
 
465
 
  void setNestedJoin(nested_join_st *in_nested_join)
 
458
  void setNestedJoin(NestedJoin *in_nested_join)
466
459
  {
467
460
    nested_join= in_nested_join;
468
461
  }
512
505
    return join_list;
513
506
  }
514
507
 
515
 
  nested_join_st *getNestedJoin() const
 
508
  NestedJoin *getNestedJoin() const
516
509
  {
517
510
    return nested_join;
518
511
  }
531
524
  void unlock_table_names(TableList *last_table= NULL);
532
525
 
533
526
private:
534
 
 
535
527
  table_map dep_tables; ///< tables the table depends on
536
528
  table_map on_expr_dep_tables; ///< tables on expression depends on
537
 
  nested_join_st *nested_join; ///< if the element is a nested join
 
529
  NestedJoin *nested_join; ///< if the element is a nested join
538
530
  TableList *embedding; ///< nested join containing the table
539
531
  List<TableList> *join_list; ///< join list the table belongs to
540
532
  plugin::StorageEngine *db_type; ///< table_type for handler
541
 
  char timestamp_buffer[20]; ///< buffer for timestamp (19+1)
542
533
  bool internal_tmp_table;
 
534
 
543
535
  /** true if an alias for this table was specified in the SQL. */
544
536
  bool is_alias;
545
537
 
548
540
   * qualified name (<db_name>.<table_name>).
549
541
   */
550
542
  bool is_fqtn;
 
543
 
551
544
  /**
552
545
   * This TableList object corresponds to the table to be created
553
546
   * so it is possible that it does not exist (used in CREATE TABLE
561
554
 
562
555
} /* namespace drizzled */
563
556
 
564
 
#endif /* DRIZZLED_TABLE_LIST_H */