Drizzled Public API Documentation

order.h

00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2008 Sun Microsystems, Inc.
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; version 2 of the License.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  */
00019 
00020 #pragma once
00021 
00022 #include <drizzled/field.h>
00023 
00024 namespace drizzled
00025 {
00026 
00027 class Item;
00028 
00029 /* Order clause list element */
00030 
00031 /* Order clause list element */
00032 class Order{
00033 public:
00034   struct Order *next;
00035   Item **item;          /* Point at item in select fields */
00036   Item *item_ptr;       /* Storage for initial item */
00037   Item **item_copy;     /* For SPs; the original item ptr */
00038   int  counter;         /* position in SELECT list, correct
00039                            only if counter_used is true*/
00040   bool asc;             /* true if ascending */
00041   bool free_me;         /* true if item isn't shared  */
00042   bool in_field_list;   /* true if in select field list */
00043   bool counter_used;    /* parameter was counter of columns */
00044   Field  *field;        /* If tmp-table group */
00045   char   *buff;         /* If tmp-table group */
00046   table_map used, depend_map;
00047 
00048   Order():
00049     next(NULL),
00050     item(NULL),
00051     item_ptr(NULL),
00052     item_copy(NULL),
00053     counter(0),
00054     asc(false),
00055     free_me(false),
00056     in_field_list(false),
00057     counter_used(false),
00058     field(NULL),
00059     buff(NULL),
00060     used(0),
00061     depend_map(0)
00062   {}
00063 };
00064 } /* namespace drizzled */
00065