8 #ifndef IBIS_FROMCLAUSE_H
9 #define IBIS_FROMCLAUSE_H
49 int parse(
const char *cl);
52 const char*
getString(
void)
const {
return clause_.c_str();}
54 const char*
operator*(
void)
const {
return clause_.c_str();}
57 bool empty()
const {
return names_.empty();}
59 uint32_t
size()
const {
return names_.size();}
65 void print(std::ostream&)
const;
68 const char*
realName(
const char*)
const;
69 const char*
alias(
const char*)
const;
70 size_t position(
const char*)
const;
83 clause_.swap(rhs.clause_);
96 std::map<const char*, size_t, ibis::lessi>
ordered_;
109 friend class ibis::fromParser;
uint32_t size() const
Returns the number of valid names.
Definition: fromClause.h:59
const char * operator*(void) const
Dereferences to the string form of the from clause.
Definition: fromClause.h:54
const char * alias(const char *) const
Given a name find its alias.
Definition: fromClause.cpp:217
bool empty() const
Is it empty? Returns true or false.
Definition: fromClause.h:57
ibis::compRange * jcond_
The join condition.
Definition: fromClause.h:104
const char * getString(void) const
Return a pointer to the string form of the from clause.
Definition: fromClause.h:52
The current implementation of FastBit is code named IBIS; most data structures and functions are in t...
Definition: bord.h:16
Defines a new class with the desired lex function for C++ output of bison.
Definition: fromLexer.h:33
const char * realName(const char *) const
Given an alias find its real name.
Definition: fromClause.cpp:187
Define the query expression.
void reorderNames(const char *, const char *)
Reorder the table names.
Definition: fromClause.cpp:262
const ibis::compRange * getJoinCondition() const
Report the join condition.
Definition: fromClause.h:63
std::vector< std::string > aliases_
The aliases.
Definition: fromClause.h:94
int parse(const char *cl)
Parse a new string.
Definition: fromClause.cpp:72
std::vector< std::string > names_
The names of data tables.
Definition: fromClause.h:92
void print(std::ostream &) const
Print the content.
Definition: fromClause.cpp:144
void swap(fromClause &rhs)
Swap the content of two from clauses.
Definition: fromClause.h:80
std::map< const char *, size_t, ibis::lessi > ordered_
The ordered version of the names.
Definition: fromClause.h:96
void clear()
Remove the current content.
Definition: fromClause.cpp:61
fromClause & operator=(const fromClause &rhs)
Assignment operator.
Definition: fromClause.h:74
void getNames(ibis::table::stringArray &) const
Fill the array nms with the known names.
Definition: fromClause.cpp:133
fromClause(const char *cl=0)
Parse a new string as a from clause.
Definition: fromClause.cpp:10
A class to represent the from clause.
Definition: fromClause.h:40
ibis::fromLexer * lexer
!< String version of the from clause.
Definition: fromClause.h:107
The class compRange stores computed ranges.
Definition: qExpr.h:1167